<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Prajwol KC on Medium]]></title>
        <description><![CDATA[Stories by Prajwol KC on Medium]]></description>
        <link>https://medium.com/@prajwolpkc?source=rss-ac71555529c2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*x-qHWpXWktnRE562</url>
            <title>Stories by Prajwol KC on Medium</title>
            <link>https://medium.com/@prajwolpkc?source=rss-ac71555529c2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 08:52:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@prajwolpkc/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Publishing private NPM packages via GitHub]]></title>
            <link>https://articles.readytowork.jp/publishing-private-npm-packages-via-github-8060a01144e4?source=rss-ac71555529c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/8060a01144e4</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[npm-package]]></category>
            <dc:creator><![CDATA[Prajwol KC]]></dc:creator>
            <pubDate>Sun, 19 Mar 2023 16:49:13 GMT</pubDate>
            <atom:updated>2023-03-19T16:52:54.467Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/660/0*LvHEbKHzIsEWKVw3.png" /></figure><p>When using the NPM package, there are certain conditions where we need to install the NPM package that is private and only specific to our use case. This package is tagged as private which is not installed by the public user except our own entity.</p><p>We can create a package and test it as private. We can follow the following step.</p><p>The first step is to Publish the Package to Github</p><p>Create a file release-package.yml inside .github/workflows folder.</p><pre>.github/workflows/release-package.yml</pre><p>A sample file as</p><pre>name: Node.js Package relase<br><br>on:<br>  release:<br>    types: [created]<br><br>jobs:<br>  build:<br>    runs-on: ubuntu-latest<br>    steps:<br>      - uses: actions/checkout@v3<br>      - uses: actions/setup-node@v3<br>        with:<br>          node-version: 16<br>      - run: npm ci<br><br>  publish-gpr:<br>    needs: build<br>    runs-on: ubuntu-latest<br>    permissions:<br>      packages: write<br>      contents: read<br>    steps:<br>      - uses: actions/checkout@v3<br>      - uses: actions/setup-node@v3<br>        with:<br>          node-version: 16<br>          registry-url: https://npm.pkg.github.com/<br>      - run: npm ci<br>      - run: npm publish<br>        env:<br>          NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}${{secrets.GITHUB_TOKEN}}</pre><p><strong>${{secrets.GITHUB_TOKEN}}</strong> — This should be generated from the GitHub token generator. <a href="https://github.com/settings/tokens">https://github.com/settings/tokens</a></p><p>We can add an npm test if needed as <strong>— run: npm test</strong></p><p>Just commit the changes to the package and push it to our private repo.</p><p>The work on the package is done. The publishing package is now private.</p><p>Now we need to add the private package to our project. Create .npmrc file</p><p>Inside <strong>npmrc</strong> file, the content will be like this</p><pre># In case of scripbox packages, scope is going to be scripbox<br>@&lt;scope&gt;:registry = https://npm.pkg.github.com<br><br>_authToken = &lt;AUTH_TOKEN&gt;<br>always-auth = true&lt;scope&gt; should be the repo owner label</pre><p>&lt;AUTH_TOKEN&gt; should be generated from <a href="https://github.com/settings/tokens">https://github.com/settings/tokens</a> with proper permission.</p><p>Now just need to add the private package which will be an authorized repo, as</p><pre>yarn add @xyz/xyz-abc@1.0.0</pre><p>The version number will be fetched from the publishing package as a tag.</p><p>Now we are using the private package, in our project which won’t be accessed by the public.</p><p><em>Ref: </em><a href="https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#installing-a-package"><em>https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#installing-a-package</em></a></p><p><em>Originally published at </em><a href="https://prajwol-kc.com.np/2023/03/19/publishing-private-npm-packages-via-github/"><em>https://prajwol-kc.com.np</em></a><em> on March 19, 2023.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8060a01144e4" width="1" height="1" alt=""><hr><p><a href="https://articles.readytowork.jp/publishing-private-npm-packages-via-github-8060a01144e4">Publishing private NPM packages via GitHub</a> was originally published in <a href="https://articles.readytowork.jp/">readytowork, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pinging on Google Cloud VPNs]]></title>
            <link>https://articles.readytowork.jp/pinging-on-google-cloud-vpns-c981e4ada56?source=rss-ac71555529c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/c981e4ada56</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[google-cloud]]></category>
            <category><![CDATA[pinging]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devsecops-solutions]]></category>
            <dc:creator><![CDATA[Prajwol KC]]></dc:creator>
            <pubDate>Fri, 30 Sep 2022 04:20:47 GMT</pubDate>
            <atom:updated>2022-09-30T04:20:47.757Z</atom:updated>
            <content:encoded><![CDATA[<p>Here we will establish VPN tunnels between two networks in separate regions such that a VM in one network can ping a VM in the other network over its internal IP address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*olZqUrWStyixVOVDDhl3TA.jpeg" /></figure><h3>Explore the networks and instances</h3><p>Verify that <strong>vpn-network-1</strong> and <strong>vpn-network-2</strong> have been created with subnets in separate regions.</p><ol><li>In the Cloud Console, on the <strong>Navigation menu</strong>, click <strong>VPC network</strong> &gt; <strong>VPC networks</strong>.</li></ol><h3>Explore the firewall rules</h3><ol><li>In the navigation pane, click <strong>Firewall</strong>.</li></ol><ul><li>Note the <strong>network-1-allow-ssh</strong> and <strong>network-1-allow-icmp</strong> rules for <strong>vpn-network-1</strong>.</li><li>Note the <strong>network-2-allow-ssh</strong> and <strong>network-2-allow-icmp</strong> rules for <strong>vpn-network-2</strong>.</li></ul><p>These firewall rules allow <strong>SSH</strong> and <strong>ICMP</strong> traffic from anywhere.</p><h3>Explore the instances and their connectivity</h3><p>Currently, the VPN connection between the two networks is not established. Explore the connectivity options between the instances in the networks.</p><ol><li>In the Cloud Console, on the <strong>Navigation menu</strong>, click <strong>Compute Engine</strong> &gt; <strong>VM instances </strong>.</li><li>Click <strong>Columns</strong>, and select <strong>Network</strong>.</li></ol><p>From server-1, you should be able to ping the following IP addresses of server-2:Internal IP address<em>check</em>External IP addressSubmit</p><ol><li>Note the external and internal IP addresses for <strong>server-2</strong>.</li><li>For <strong>server-1</strong>, click <strong>SSH</strong> to launch a terminal and connect.</li><li>To test connectivity to server-2’s external IP address, run the following command, replacing server-2’s external IP address with the value noted earlier:</li></ol><pre>ping -c 3 &lt;Enter server-2&#39;s external IP address here&gt;<br><em>content_copy</em></pre><p>This works because the VM instances can communicate over the internet.</p><ol><li>To test connectivity to server-2’s internal IP address, run the following command, replacing server-2’s internal IP address with the value noted earlier:</li></ol><pre>ping -c 3 &lt;Enter server-2&#39;s internal IP address here&gt;<br><em>content_copy</em></pre><p>You should see 100% packet loss when pinging the internal IP address because you don’t have VPN connectivity yet.</p><ol><li>Exit the SSH terminal.</li></ol><p>Let’s try the same from <strong>server-2</strong>.</p><ol><li>Note the external and internal IP addresses for <strong>server-1</strong>.</li><li>For <strong>server-2</strong>, click <strong>SSH</strong> to launch a terminal and connect.</li><li>To test connectivity to server-1’s external IP address, run the following command, replacing server-1’s external IP address with the value noted earlier:</li></ol><pre>ping -c 3 &lt;Enter server-1&#39;s external IP address here&gt;<br><em>content_copy</em></pre><ol><li>To test connectivity to server-1’s internal IP address, run the following command, replacing server-1’s internal IP address with the value noted earlier:</li></ol><pre>ping -c 3 &lt;Enter server-1&#39;s internal IP address here&gt;<br><em>content_copy</em></pre><p>See similar results.</p><ol><li>Exit the SSH terminal.</li></ol><p>Why are we testing both <strong>server-1</strong> to <strong>server-2</strong> and <strong>server-2</strong> to <strong>server-1</strong>?</p><p>The path from subnet-a to subnet-b is not the same as the path from subnet-b to subnet-a. You are using one tunnel to pass traffic in each direction. And if both tunnels are not established, you won’t be able to ping the remote server on its internal IP address. The ping might reach the remote server, but the response can’t be returned.</p><p>In practice, a single tunnel could be used with a symmetric configuration. However, it is more common to have multiple tunnels or multiple gateways and VPNs for production work, because a single tunnel could be a single point of failure.</p><h3>Task 2: Create the VPN gateways and tunnels</h3><p>Establish private communication between the two VM instances by creating VPN gateways and tunnels between the two networks.</p><h3>Reserve two static IP addresses</h3><p>Reserve one static IP address for each VPN gateway.</p><ol><li>In the Cloud Console, on the <strong>Navigation menu</strong>, click <strong>VPC network</strong> &gt; <strong>External IP addresses</strong>.</li><li>Click <strong>Reserve static address</strong>.</li><li>Specify the following, and leave the remaining settings as their defaults:PropertyValue (type value or select option as specified)Namevpn-1-static-ipIP versionIPv4Regionus-central1</li><li>Click <strong>Reserve</strong>.</li></ol><p>Repeat the same for <strong>vpn-2-static-ip</strong>.</p><ol><li>Click <strong>Reserve static address</strong>.</li><li>Specify the following, and leave the remaining settings as their defaults:PropertyValue (type value or select option as specified)Namevpn-2-static-ipIP versionIPv4Regioneurope-west1</li><li>Click <strong>Reserve</strong>.</li></ol><p>Note both IP addresses for the next step. They will be referred to us [VPN-1-STATIC-IP] and [VPN-2-STATIC-IP].</p><h3>Create the vpn-1 gateway and tunnel1to2</h3><ol><li>In the Cloud Console, on the <strong>Navigation menu</strong>, click <strong>Hybrid Connectivity</strong> &gt; <strong>VPN</strong>.</li><li>Click <strong>Create VPN Connection</strong>.</li><li>If asked, select <strong>Classic VPN</strong>, and then click <strong>Continue</strong>.</li><li>Specify the following in the <strong>VPN gateway</strong> section, and leave the remaining settings as their defaults:PropertyValue (type value or select option as specified)Namevpn-1Networkvpn-network-1Regionus-central1IP addressvpn-1-static-ip</li><li>Specify the following in the <strong>Tunnels</strong> section, and leave the remaining settings as their defaults:PropertyValue (type value or select option as specified)Nametunnel1to2Remote peer IP address[VPN-2-STATIC-IP]IKE pre-shared keygcprocksRouting optionsRoute-basedRemote network IP ranges10.1.3.0/24</li></ol><p>Make sure to replace [VPN-2-STATIC-IP] it with your reserved IP address for <strong>europe-west1</strong>.</p><ol><li>Click the <strong>command line</strong>.</li></ol><p>The <strong>gcloud command line</strong> window shows the gcloud commands to create the <strong>VPN gateway</strong> and <strong>VPN tunnels</strong> and it illustrates that three forwarding rules are also created.</p><ol><li>Click <strong>Close</strong>.</li><li>Click <strong>Create</strong>.</li></ol><p>Click Check my progress to verify the objective.</p><p>Create the ‘vpn-1’ gateway and tunnelCheck my progress</p><h3>Create the vpn-2 gateway and tunnel2to1</h3><ol><li>Click <strong>VPN setup wizard</strong>.</li><li>If asked, select <strong>Classic VPN</strong>, and then click <strong>Continue</strong>.</li><li>Specify the following in the <strong>VPN gateway</strong> section, and leave the remaining settings as their defaults:PropertyValue (type value or select option as specified)Namevpn-2Networkvpn-network-2Regioneurope-west1IP addressvpn-2-static-ip</li><li>Specify the following in the <strong>Tunnels</strong> section, and leave the remaining settings as their defaults:PropertyValue (type value or select option as specified)Nametunnel2to1Remote peer IP address[VPN-1-STATIC-IP]IKE pre-shared keygcprocksRouting optionsRoute-basedRemote network IP ranges10.5.4.0/24</li></ol><p>Make sure to replace [VPN-1-STATIC-IP] with your reserved IP address for <strong>us-central1</strong>.</p><ol><li>Click <strong>Create</strong>.</li><li>Click <strong>Cloud VPN Tunnels</strong>.</li></ol><p>Click Check my progress to verify the objective.</p><p>Create the ‘vpn-2’ gateway and tunnelCheck my progress</p><p>Wait for the <strong>VPN tunnels status</strong> to change to <strong>Established</strong> for both tunnels before continuing.</p><p>Click Check my progress to verify the objective.</p><p>Tunnel establishmentCheck my progress</p><h3>Task 3: Verify VPN connectivity</h3><p>From server-1, you should be able to ping the following IP addresses of server-2:<em>check</em>External IP address<em>check</em>Internal IP addressSubmit</p><h3>Verify server-1 to server-2 connectivity</h3><ol><li>In the Cloud Console, on the <strong>Navigation menu</strong>, click <strong>Compute Engine</strong> &gt; <strong>VM instances</strong>.</li><li>For <strong>server-1</strong>, click <strong>SSH</strong> to launch a terminal and connect.</li><li>To test connectivity to <strong>server-2</strong>‘s internal IP address, run the following command:</li></ol><pre>ping -c 3 &lt;insert server-2&#39;s internal IP address here&gt;<br><em>content_copy</em></pre><ol><li>Exit the <strong>server-1</strong> SSH terminal.</li><li>For <strong>server-2</strong>, click <strong>SSH</strong> to launch a terminal and connect.</li><li>To test connectivity to <strong>server-1</strong>‘s internal IP address, run the following command:</li></ol><pre>ping -c 3 &lt;insert server-1&#39;s internal IP address here&gt;<br><em>content_copy</em></pre><h3>Remove the external IP addresses</h3><p>Now that you verified VPN connectivity, you can remove the instances’ external IP addresses. For demonstration purposes, just do this for the <strong>server-1</strong> instance.</p><ol><li>On the <strong>Navigation menu</strong>, click <strong>Compute Engine</strong> &gt; <strong>VM instances</strong>.</li><li>Select the <strong>server-1</strong> instance and click <strong>Stop</strong>. Wait for the instance to stop.</li></ol><p>Instances need to be stopped before you can make changes to their network interfaces.</p><ol><li>Click on the name of the <strong>server-1</strong> instance to open the <strong>VM instance details</strong> page.</li><li>Click <strong>Edit</strong>.</li><li>For <strong>Network interfaces</strong>, click the <strong>Edit</strong> icon</li><li>Change <strong>External IP</strong> to <strong>None</strong>.</li><li>Click <strong>Done</strong>.</li><li>Click <strong>Save</strong> and wait for the instance details to update.</li><li>Click <strong>Start</strong>.</li><li>Click <strong>Start</strong> again to confirm that you want to start the VM instance.</li><li>Return to the <strong>VM instances</strong> page and wait for the instance to start.</li><li>Notice that <strong>External IP</strong> is set to <strong>None</strong> for the <strong>server-1</strong> instance.</li></ol><p>Feel free to SSH to <strong>server-2</strong> and verify that you can still ping the <strong>server-1</strong> instance’s internal IP address. You won’t be able to SSH to <strong>server-1</strong> from the Cloud Console but you can do so from Cloud Shell using Cloud IAP as described <a href="https://cloud.google.com/solutions/building-internet-connectivity-for-private-vms#configuring_iap_tunnels_for_interacting_with_instances">here</a>.External IP addresses that don’t fall under the <a href="https://cloud.google.com/free/docs/gcp-free-tier#always-free-usage-limits">Free Tier</a> will incur a <a href="https://cloud.google.com/compute/network-pricing#ipaddress">small cost</a>. Also, as a general security best practice, it’s a good idea to use internal IP addresses where applicable and since you configured Cloud VPN you no longer need to communicate between instances using their external IP address.</p><p>The VPN communication between two subnetwork networks in separate regions has been configured here. Then we tested the VPN link by pinching VMs to various networks using their internal IP addresses.</p><p>We also set up the Cloud Console for the VPN gateways and tunnels. This process, however, obscured the development of transmission rules that are discussed in the console using the command line button. This will help to resolve a setup problem.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c981e4ada56" width="1" height="1" alt=""><hr><p><a href="https://articles.readytowork.jp/pinging-on-google-cloud-vpns-c981e4ada56">Pinging on Google Cloud VPNs</a> was originally published in <a href="https://articles.readytowork.jp/">readytowork, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud Monitoring under GCP]]></title>
            <link>https://articles.readytowork.jp/cloud-monitoring-under-gcp-ca03fde9545c?source=rss-ac71555529c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca03fde9545c</guid>
            <category><![CDATA[google-gcp]]></category>
            <category><![CDATA[cloud-monitoring]]></category>
            <dc:creator><![CDATA[Prajwol KC]]></dc:creator>
            <pubDate>Tue, 27 Sep 2022 18:23:47 GMT</pubDate>
            <atom:updated>2022-09-27T18:23:47.057Z</atom:updated>
            <content:encoded><![CDATA[<p>GCP Cloud monitoring provides visibility into the performance, availability, and overall health of cloud-based applications. Cloud Monitoring collects metrics, events, and metadata from Google Cloud, Amazon Web Services, hosted availability probes, application metrics, and various common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch, and many more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3cVacZlAU8yeqNCw6TuTVQ.jpeg" /></figure><p>Cloud monitoring ingests this data and generates insights through dashboards, charts, and alerts. Cloud Monitoring Alerts helps us collaborate by integrating with Slack, PagerDuty, HipChat, Campfire, and more.</p><p>Here we will be monitoring a Compute Engine virtual machine (VM) instance with Cloud Monitoring. We will also install monitoring and logging agents for our virtual machine to collect additional information from our instance, which may include third-party metrics and logs. application.</p><p>Now let&#39;s go step by step to implement the cloud monitoring approach.</p><h3>Create a Compute Engine instance</h3><ol><li>In the Cloud Console dashboard, go to <strong>Navigation menu</strong> &gt; <strong>Compute Engine</strong> &gt; <strong>VM instances</strong>, then click <strong>Create instance</strong>.</li><li>Fill in the fields as follows, leaving all other fields at the default value:</li></ol><pre>Name: monitor-instance<br>Region: us-central1<br>Zone: us-central1-a<br>Series: N1Machine<br>type: n1-standard-2<br>Boot disk: Click Change. Select version Debian GNU/Linux 11 for Debian OS and click Select. <br>Firewall: check Allow HTTP traffic</pre><p>3. Click <strong>Create</strong>.</p><h3>Add Apache2 HTTP Server to instance</h3><ol><li>In the Console, click <strong>SSH</strong> to open a terminal to instance.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eWZV3ZYjGsOmVDfJp6fEAw.png" /></figure><ol><li>Click <strong>Connect</strong>.</li><li>Run the following commands in the SSH window to set up Apache2 HTTP Server:</li></ol><pre>$ sudo apt-get update<br>$ sudo apt-get install -y apache2 php7.0<br>$ sudo service apache2 restart</pre><p>3. Return to the Cloud Console, on the VM instances page. Click the External IP for moniter-instance instance to see the Apache2 default page for this instance like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/0*fwKCipqK3EmIYEf3" /><figcaption>apache2 default page.</figcaption></figure><h3>Create a Monitoring Metrics Scope</h3><p>Set up a Monitoring Metrics Scope that’s tied to our Google Cloud Project. The following steps create a new account that has a free trial of Monitoring.</p><ul><li>In the Cloud Console, click the <strong>Navigation menu </strong>&gt; <strong>Monitoring</strong>.</li></ul><p>When the Monitoring <strong>Overview</strong> page opens, the metrics scope project is ready.</p><h3>Install the Ops agents</h3><p>The Ops Agent collects logs and metrics on Compute Engine instances, sending logs to Cloud Logging and metrics to Cloud Monitoring.</p><ol><li>Run the Monitoring agent install script command in the SSH terminal of VM instance to install the Cloud Monitoring agent and verify its installation.</li></ol><pre>$ curl -sSO <a href="https://dl.google.com/cloudagents/add-google-cloud-ops-agent-repo.sh">https://dl.google.com/cloudagents/add-google-cloud-ops-agent-repo.sh</a><br>$ sudo bash add-google-cloud-ops-agent-repo.sh --also-install<br>$ sudo systemctl status google-cloud-ops-agent&quot;*&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pQgop4PtZGilEtn6bAtkNg.png" /></figure><h3>Create an uptime check</h3><p>Uptime checks verify that a resource is always accessible. For practice, create an uptime check to verify VM is up.</p><ol><li>In the Cloud Console, in the left menu, click <strong>Uptime checks</strong>, and then click <strong>+Create Uptime Check</strong>.</li><li>Set the following fields:</li></ol><pre>Title: Monitor Uptime Check, then click Next.</pre><pre>Protocol: HTTP</pre><pre>Resource Type: Instance</pre><pre>Applies to: Single, monitor-instance</pre><pre>Path: leave at default</pre><pre>Check Frequency: 1 min</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YobSlke-4_wywZQosYG-2Q.png" /></figure><p>3. When we see a green check mark everything can connect. Click Create.<br>The uptime check that we have configured takes a while for it to become active. Continue with the lab, we will check for results later.</p><p>While we wait, create an alerting policy for a different resource.</p><h3>Create an alerting policy</h3><p>Use Cloud Monitoring to create one or more alerting policies.</p><ol><li>In the left menu, click <strong>Alerting</strong>, and then click <strong>+Create Policy</strong>.</li><li>Click on the <strong>Select a metric</strong> dropdown. Disable the <strong>Show only active resources &amp; metrics</strong>.</li><li>Type <strong>Network traffic</strong> in filter by resource and metric name and click on <strong>VM instance &gt; interface</strong>. Select Network traffic (agent.googleapis.com/interface/traffic) and click <strong>Apply</strong>. Leave all other fields at the default value.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M39LtR-vgC5hwH-f" /></figure><p>4. Click <strong>Next</strong>.</p><p>5. Set the <strong>Threshold position</strong> to Above threshold, <strong>Threshold value</strong> to 500 and <strong>Advanced Options &gt; Retest window</strong> to 1 min. Click <strong>Next</strong>.</p><p>6. Click on drop-down arrow next to <strong>Notification Channels</strong>, then click on <strong>Manage Notification Channels</strong>.</p><p>7. A Notification channels page will open in a new tab.</p><p>8. Scroll down the page and click on ADD NEW for Email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a_LTugQXhDstDXEd63hxjw.png" /></figure><p>9. In Create Email Channel dialog box, enter any email address in the Email Address field and a Display name.</p><p>10. Click on Save.</p><p>11. Go back to the previous Create alerting policy tab.</p><p>12. Click on Notification Channels again, then click on the Refresh icon to get the display name we mentioned in the previous step.</p><p>13. Click on Notification Channels again if necessary, select the display name and click OK.</p><p>14. Add a message in documentation, which will be included in the emailed alert.</p><p>15. Mention the Alert name as <em>Inbound Traffic Alert.</em></p><p>16. Click <strong>Next</strong>.</p><p>17. Review the alert and click Create Policy.</p><p>We have created an alert! While we wait for the system to trigger an alert, create a dashboard and chart, and then check out Cloud Logging.</p><h3>Create a dashboard and chart</h3><p>We can display the metrics collected by Cloud Monitoring in our own charts and dashboards. We willcreate the charts for the lab metrics and a custom dashboard.</p><ol><li>In the left menu select <strong>Dashboards</strong>, and then <strong>+Create Dashboard</strong>.</li><li>Name the dashboard Cloud Monitoring Instance Dashboard.</li></ol><p>Add the first chart</p><ol><li>Click Line option in Chart library.</li><li>Name the chart title <em>CPU Load</em>.</li><li>Click on Resource &amp; Metric dropdown. Disable the Show-only active resources &amp; metrics.</li><li>Type CPU load (1m) in filter by resource and metric name and click on VM instance &gt; Cpu. Select CPU load (1m) and click Apply. Leave all other fields at the default value. Refresh the tab to view the graph.</li></ol><h3>Check the uptime check results and triggered alerts</h3><ol><li>In the Cloud Logging window, select <strong>Navigation menu</strong> &gt; <strong>Monitoring</strong> &gt; <strong>Uptime checks</strong>. This view provides a list of all active uptime checks and the status of each in different locations.</li></ol><p>We will see Monitor Instance Uptime Check listed. Since we have just restarted our instance, the regions are in a failed status. It may take up to 5 minutes for the regions to become active. Reload our browser window as necessary until the regions are active.</p><ol><li>Click the name of the uptime check, Monitor Uptime Check.</li></ol><p>Since we have just restarted our instance, it may take some minutes for the regions to become active. Reload browser window as necessary.</p><h3>Check if alerts have been triggered</h3><ol><li>In the left menu, click <strong>Alerting</strong>.</li><li>We will see incidents and events listed in the Alerting window.</li><li>Check the email account. We should see Cloud Monitoring Alerts.</li></ol><h3>Remove alerting policy</h3><p>If we have set up an email alert as part of our alerting policy, there is a chance that we will receive a few emails about our resources. To avoid this, we will remove the alerting policy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OrtCUtL_w8YwwVxjdpCtjQ.png" /></figure><p>Thank you. Hope this will help to establish the cloud monitoring setup for further instances of all the GCP services.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca03fde9545c" width="1" height="1" alt=""><hr><p><a href="https://articles.readytowork.jp/cloud-monitoring-under-gcp-ca03fde9545c">Cloud Monitoring under GCP</a> was originally published in <a href="https://articles.readytowork.jp/">readytowork, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lets Deploy Dockerized Golang App to Google Cloud Run — PKC Blog Hub]]></title>
            <link>https://articles.readytowork.jp/lets-deploy-dockerized-golang-app-to-google-cloud-run-pkc-blog-hub-ecff82394354?source=rss-ac71555529c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/ecff82394354</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[google-cloud-run]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Prajwol KC]]></dc:creator>
            <pubDate>Wed, 27 Jul 2022 17:29:44 GMT</pubDate>
            <atom:updated>2022-07-28T02:41:09.168Z</atom:updated>
            <content:encoded><![CDATA[<h3>Lets Deploy Dockerized Golang App to Google Cloud Run</h3><p>In this article, we will create a simple golang webapp using microframework fiber. Then we will run in our local system using the docker container. Then after is done on our local system, we will deploy it to Google Cloud Platform Google Container Registry (GCR). Then we will connect the GCR container to be deployed to Google Cloud Run. So let’s begin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*DA8-nc2fOWxsyF6fNeoVeQ.jpeg" /></figure><p>We will create a simple golang web app using fiber web framework which shows a simple hello world text on the screen.</p><p>This is <strong>main.go</strong></p><pre>package main <br>import ( <br>  &quot;log&quot; <br>  &quot;github.com/gofiber/fiber/v2&quot; <br>) </pre><pre>func main() { <br>  app := fiber.New() <br>  app.Get(&quot;/&quot;, func(c *fiber.Ctx) error { <br>    return c.SendString(&quot;Hello, World!&quot;) <br>  }) <br>  log.Fatal(app.Listen(&quot;:8080&quot;))<br>}</pre><p>Here we just imported fiber web framework which is basically a nestjs like a framework under golang. We are using a GET method to get all the incoming requests under root and show a hello world text. We are listening to the container to port 8080.</p><p>Next, we create a Dockerfile on the root directory to actually dockerized the application. <strong>Dockerfile</strong></p><pre>FROM golang:1.16-alpine <br>WORKDIR /app <br>COPY go.mod . <br>COPY go.sum . <br>RUN go mod download <br>COPY . . <br>RUN go build -o ./out/dist . <br>CMD ./out/dist</pre><p>We can run the app locally by building the container and running the following under the system cli. Here <strong>golangrun</strong> is the name of the app</p><pre>docker build --platform linux/amd64 -t golangrun .</pre><pre>docker run -p 8888:8080 golangrun</pre><p>If we go to <a href="http://localhost:8888/">http://localhost:8888/</a> then we will see our Hello World.</p><p>Now next step is to deploy the same web app to GCR and run it on Cloud Run. To initiate the process the container has to be tagged and push to GCR.</p><p>Let’s tag our container for Google Docker Registry with GCR name as <strong>readytoworkjapan</strong> followed by app name</p><pre>docker tag golangrun gcr.io/readytoworkjapan/golangrun</pre><p>Now let’s push our tagged container to GCR and can see it on our GCR portal</p><pre>docker push gcr.io/readytoworkjapan/golangrun</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*o4UfcUTTdrQX1giR.png" /></figure><p>The container is in my GCR, We can deploy the container to our preferred Cloud Run, GKE, or GCE. For our use, we will deploy to Cloud Run.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7W6Q0qqhjkNMFQNT.png" /></figure><p>Create Cloud Run Service, by selecting the latest container tag which was just pushed. Name the service name with general selections. The ingress can be for now all incoming traffic and authentication can be unauthenticated invocations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gfgcKpQHm-pdwS14.png" /></figure><p>After the cloud run service is created, we can see all the details with logs. Just open the URL that is given in the top section. When we open it voila we just get the dockerized golang run running on Cloud Run. The URL, in this case, is<a href="https://golangrun-ok-24wnkzib7q-uc.a.run.app/"> https://golangrun-ok-24wnkzib7q-uc.a.run.app/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*s5Lk7OaRe41mfvCJ.png" /></figure><p>This article is only the tip of the iceberg. There are many other sections and topics that can be modified and configured.</p><p>If we want to change anything let’s say change hello world to <strong>hello Golang</strong>, then we just change the code</p><ol><li>Build the container -&gt; docker build --platform linux/amd64 -t golangrun .</li><li>Tag the container with change -&gt; docker tag golangrun gcr.io/readytoworkjapan/golangrun</li><li>Push the container -&gt; docker push gcr.io/readytoworkjapan/golangrun</li><li>ReDeploy on the same Cloud Run Service and see the changes with the same URL</li></ol><p>Note:</p><pre>docker build --platform linux/amd64 -t golangrun .</pre><p><em>For this use case, we are using mac m1 so the container build is expected to run on linux/amd64 rather than arm64 which is the default case under mac m1.</em></p><p><em>Originally published at </em><a href="https://prajwol-kc.com.np/2022/07/27/lets-deploy-dockerized-golang-app-to-google-cloud-run/"><em>https://prajwol-kc.com.np</em></a><em> on July 27, 2022.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ecff82394354" width="1" height="1" alt=""><hr><p><a href="https://articles.readytowork.jp/lets-deploy-dockerized-golang-app-to-google-cloud-run-pkc-blog-hub-ecff82394354">Lets Deploy Dockerized Golang App to Google Cloud Run — PKC Blog Hub</a> was originally published in <a href="https://articles.readytowork.jp/">readytowork, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Firebase as Backend as a Service]]></title>
            <link>https://prajwolpkc.medium.com/google-firebase-as-backend-as-a-service-ee974fc19c39?source=rss-ac71555529c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee974fc19c39</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[firebase]]></category>
            <dc:creator><![CDATA[Prajwol KC]]></dc:creator>
            <pubDate>Wed, 27 Jul 2022 05:26:28 GMT</pubDate>
            <atom:updated>2022-07-27T05:26:28.243Z</atom:updated>
            <content:encoded><![CDATA[<p>Firebase is a backend-as-service (Bass) platform for creating mobile and web applications. In this section, we will learn to build serverless web apps, import data into a serverless database, and build a Google Assistant application with Firebase and its Google Cloud integrations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*jWj-z5UxpMcKdpk4FIFD_g.jpeg" /></figure><p>In this section, we will read through a fictitious business scenario and assist the characters with their serverless migration plan.</p><p>Twelve years ago, Lily started the Pet Theory chain of veterinary clinics. The Pet Theory chain has expanded rapidly over the last few years. However, their old appointment scheduling system is not able to handle the increased load, so Lily is asking we will build a cloud-based system that scales better than the legacy solution.</p><p>Pet Theory’s Ops team is a single person, Patrick, so they need a solution that doesn’t require lots of ongoing maintenance. The team has decided to go with serverless technology.</p><p>Ruby has been hired as a consultant to help Pet Theory make the transition to serverless. After comparing serverless database options, the team decides to go with <a href="https://firebase.google.com/docs/firestore">Cloud Firestore</a>. Since Firestore is serverless, capacity doesn’t have to be provisioned ahead of time which means that there is no risk of running into storage or operations limits. Firestore keeps our data in-sync across client apps through real-time listeners and offers offline support for mobile and web, so a responsive app can be built that works regardless of network latency or Internet connectivity.</p><p>In this lab, we will help Patrick upload Pet Theory’s existing data to a Cloud Firestore database. He will work closely with Ruby to accomplish this.</p><h3>Architecture</h3><p>This diagram gives us an overview of the services we will be using and how they connect to one another:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/0*h0WRglE9iIo-DhWf" /></figure><h3>Here we will check:</h3><ul><li>Set up Firestore in GCP.</li><li>Write database import code.</li><li>Generate a collection of customer data for testing.</li><li>Import the test customer data into Firestore.</li><li>Manipulate data in Firestore through the Console.</li><li>Add a developer to a GCP project without giving them Firestore access.</li></ul><h3>Prerequisites</h3><p>This is a <strong>fundamental level</strong> lab. This assumes familiarity with the GCP Console and shell environments. Experience with Firebase will be helpful but is not required.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/185/0*0kmjD5-e7p7dXxMQ" /></figure><p>Once we are ready, scroll down and follow the steps below to set up our lab environment.</p><h3>Activate Cloud Shell</h3><p>Cloud Shell is a virtual machine that is loaded with development tools. It offers a persistent 5GB home directory and runs on the Google Cloud. Cloud Shell provides command-line access to our Google Cloud resources.</p><p>In the Google Cloud Console, go to the <strong>Navigation menu</strong> and select <strong>Firestore</strong></p><ol><li>Click the <strong>Select Native Mode</strong> button.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/0*1yiYBg4lFKtaNtwa" /></figure><p>Both modes are high performing with strong consistency, but they look different and are optimized for different use cases.</p><ul><li><em>Native Mode</em> is good for getting lots of users to access the same data at the same time (plus, it has features like real-time updates and a direct connection between our database and a web/mobile client</li><li><em>Datastore Mode</em> puts an emphasis on high throughput (lots of reads and writes).</li></ul><p>In the <strong>Select, a location</strong> dropdown, choose a database region closest to our location and then click <strong>Create Database</strong>.</p><ol><li>In Cloud Shell, run the following command to clone the Pet Theory repository:</li></ol><pre>git clone <a href="https://github.com/rosera/pet-theory">https://github.com/rosera/pet-theory</a></pre><ol><li>Use the Cloud Shell Code Editor (or our preferred editor) to edit our files. From the top ribbon of your Cloud Shell session, click on the <strong>Open in new window</strong> icon, it will open a new tab. Then click <strong>Open Editor</strong>:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/0*MBm--i-QjwJRIfdq" /></figure><ol><li>Then change our current working directory to lab01:</li></ol><pre>cd pet-theory/lab01<em>content_copy</em></pre><p>In the directory, we can see Patrick’s package.json. This file lists the packages that our Node.js project depends on and makes your build reproducible, and therefore easier to share with others.</p><ol><li>Run the following command to do so:</li></ol><pre>npm install @google-cloud/firestore<em>content_copy</em></pre><ol><li>To enable the app to write logs to Stackdriver Logging, install an additional module:</li></ol><pre>npm install @google-cloud/logging</pre><pre>const {promisify} = require(&#39;util&#39;);<br>const parse       = promisify(require(&#39;csv-parse&#39;));<br>const {readFile}  = require(&#39;fs&#39;).promises;</pre><pre>if (process.argv.length &lt; 3) {<br>  console.error(&#39;Please include a path to a csv file&#39;);<br>  process.exit(1);<br>}</pre><pre>function writeToDatabase(records) {<br>  records.forEach((record, i) =&gt; {<br>    console.log(`ID: ${record.id} Email: ${record.email} Name: ${record.name} Phone: ${record.phone}`);<br>  });<br>  return ;<br>}</pre><pre>async function importCsv(csvFileName) {<br>  const fileContents = await readFile(csvFileName, &#39;utf8&#39;);<br>  const records = await parse(fileContents, { columns: true });<br>  try {<br>    await writeToDatabase(records);<br>  }<br>  catch (e) {<br>    console.error(e);<br>    process.exit(1);<br>  }<br>  console.log(`Wrote ${records.length} records`);<br>}</pre><pre>importCsv(process.argv[2]).catch(e =&gt; console.error(e));</pre><p>It takes the output from the input CSV file and imports it into the legacy database. Next, update this code to write to Firestore.</p><ol><li>Open the file pet-theory/lab01/importTestData.js.</li></ol><p>To reference the Firestore API via the application, we need to add the peer dependency to the existing codebase.</p><ol><li>Add the following Firestore dependency on line 4 of the file:</li><li>Add the following Firestore dependency on line 4 of the file:</li></ol><pre>const {Firestore} = require(&#39;@google-cloud/firestore&#39;);<br><em>content_copy</em></pre><p>Ensure that our code looks like the following:</p><pre>const {promisify} = require(&#39;util&#39;);<br>const parse       = promisify(require(&#39;csv-parse&#39;));<br>const {readFile}  = require(&#39;fs&#39;).promises;<br>const {Firestore} = require(&#39;@google-cloud/firestore&#39;);   <em>// add this</em></pre><p>Add the following code underneath line 9, or the if (process.argv.length &lt; 3) conditional:</p><pre>const db = new Firestore();</pre><pre>function writeToFirestore(records) {<br>  const batchCommits = [];<br>  let batch = db.batch();<br>  records.forEach((record, i) =&gt; {<br>    var docRef = db.collection(&#39;customers&#39;).doc(record.email);<br>    batch.set(docRef, record);<br>    if ((i + 1) % 500 === 0) {<br>      console.log(`Writing record ${i + 1}`);<br>      batchCommits.push(batch.commit());<br>      batch = db.batch();<br>    }<br>  });<br>  batchCommits.push(batch.commit());<br>  return Promise.all(batchCommits);<br>}</pre><p>The above code snippet declares a new database object, which references the database created earlier in the lab. The function uses a batch process in which each of the records is processed in turn and sets a document reference based on the identifier added. At the end of the function, the batch content is written to the database.</p><p>Finally, we need to add a call to the new function. Update the importCsv function to add the function call writeToFirestore and remove the call to writeToDatabase. It should look like this:</p><pre>async function importCsv(csvFileName) {<br>  const fileContents = await readFile(csvFileName, &#39;utf8&#39;);<br>  const records = await parse(fileContents, { columns: true });<br>  try {<br>    await writeToFirestore(records);<br>    // await writeToDatabase(records);<br>  }<br>  catch (e) {<br>    console.error(e);<br>    process.exit(1);<br>  }<br>  console.log(`Wrote ${records.length} records`);<br>}</pre><p>Next, add logging for the application. To reference the Logging API via the application, add the peer dependency to the existing codebase. Add the line const {Logging} = require(&#39;@google-cloud/logging&#39;); just below the other required statements at the top of the file:</p><p>Add a few constant variables and initialize the Logging client. Add those just below the above lines in the file (~line 5), like this:</p><pre>const logName = &#39;pet-theory-logs-importTestData&#39;;</pre><pre>// Creates a Logging client<br>const logging = new Logging();<br>const log = logging.log(logName);</pre><pre>const resource = {<br>  type: &#39;global&#39;,<br>};</pre><pre>async function importCsv(csvFileName) {<br>  const fileContents = await readFile(csvFileName, &#39;utf8&#39;);<br>  const records = await parse(fileContents, { columns: true });<br>  try {<br>    await writeToFirestore(records);<br>    //await writeToDatabase(records);<br>  }<br>  catch (e) {<br>    console.error(e);<br>    process.exit(1);<br>  }<br>  console.log(`Wrote ${records.length} records`);</pre><pre>  // A text log entry<br>  success_message = `Success: importTestData - Wrote ${records.length} records`<br>  const entry = log.entry({resource: resource}, {message: `${success_message}`});<br>  log.write([entry]);<br>}</pre><p>Now when the application code is run, the Firestore database will be updated with the contents of the CSV file. The function importCsv takes a filename and parses the content on a line-by-line basis. Each line processed is now sent to the Firestore function writeToFirestore, where each new record is written to the “customer” database.</p><p>Add Logging for the codebase. Reference the Logging API module from the application code with the following:</p><pre>const fs = require(&#39;fs&#39;);<br>const faker = require(&#39;faker&#39;);<br>const {Logging} = require(&#39;@google-cloud/logging&#39;);        //add this</pre><p>Now add a few constant variables and initialize the Logging client. Add those just below the const statements:</p><pre>const logName = &#39;pet-theory-logs-createTestData&#39;;</pre><pre>// Creates a Logging client<br>const logging = new Logging();<br>const log = logging.log(logName);</pre><pre>const resource = {<br>  // This example targets the &quot;global&quot; resource for simplicity<br>  type: &#39;global&#39;,<br>};</pre><p>After generating a collection of customer data for testing, we ran a script that imported the data into Firestore. We then got how to manipulate data in Firestore through the GCP Console.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee974fc19c39" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Firebase Serverless Development]]></title>
            <link>https://articles.readytowork.jp/firebase-serverless-development-fa8357218639?source=rss-ac71555529c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa8357218639</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[serverless-computing]]></category>
            <category><![CDATA[google-firebase]]></category>
            <dc:creator><![CDATA[Prajwol KC]]></dc:creator>
            <pubDate>Wed, 27 Jul 2022 04:49:49 GMT</pubDate>
            <atom:updated>2022-07-27T04:52:45.827Z</atom:updated>
            <content:encoded><![CDATA[<p>This section will create a frontend solution using a Rest API and Firestore database. Cloud Firestore is a NoSQL document database that is part of the Firebase platform where we can store, sync, and query data for our mobile and web apps at scale. The content is based on resolving a real-world scenario using Google Cloud serverless infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*rXYRYTiwvlXxGEq6mZFU8g.jpeg" /></figure><p>We will build the following architecture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FqpEd_7HrBJMQ_rW" /></figure><h3>Step 1: Create a Firestore database</h3><p>In this scenario, we create a Firestore Database in Google Cloud. The high-level architecture diagram below summarizes the general architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MnU9U486IyF8-4ln" /></figure><p>Requirements:</p><h3>Create a Firestore database</h3><p>To complete this section successfully, we are required to implement the following:</p><ul><li>Cloud Firestore Database</li><li>Use Firestore Native Mode</li><li>Add location Nam5 (United States)</li></ul><h3>Step 2: Populate the Database</h3><p>In this scenario, populate the database using test data.</p><p>A high-level architecture diagram below summarizes the general architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iUb9Hl0EzFQ5Lwco" /></figure><h3>Populate the Database</h3><p>Example Firestore schema</p><p><a href="https://www.kaggle.com/shivamb/netflix-shows">Netflix Shows Dataset</a> includes the following information</p><p>To complete this section successfully, we are required to implement the following tasks:</p><ul><li>Use the sample code from pet-theory/lab06/firebase-import-csv/solutionnpm install <em>content_copy</em></li><li>To import CSV use the node pet-theory/lab06/firebase-import-csv/solution/index.jsnode index.js netflix_titles_original.csv<em>content_copy</em></li></ul><p>Verify the Firestore Database has been updated by viewing the data in the Firestore UI.</p><p>Click <strong>Check my progress</strong> to verify that we performed the above task.</p><p>Populate the Firestore DatabaseCheck my progress</p><h3>Step 3: Create a REST API</h3><p>In this scenario, create an example REST API.</p><p>A high-level architecture diagram below summarizes the general architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Jfrgw7iuq8vk9RQ0" /></figure><h3>Cloud Run Development</h3><p>To complete this section successfully, we are required to implement the following tasks:</p><ul><li>Access pet-theory/lab06/firebase-rest-api/solution-01</li><li>Build and Deploy the code to Google Container Registry</li><li>Deploy the image as a Cloud Run Service</li><li>curl -X GET $SERVICE_URL should respond with:{&quot;status&quot;:&quot;Netflix Dataset! Make a query.&quot;}</li></ul><h3>Step 4: Firestore API access</h3><p>In this scenario, deploy an updated revision of the code to access the Firestore DB.</p><p>A high-level architecture diagram below summarizes the general architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gyEIinZYw4g-esvK" /></figure><h3>Deploy Cloud Run revision 0.2</h3><p>To complete this section successfully, we are required to implement the following tasks:</p><ul><li>Access pet-theory/lab06/firebase-rest-api/solution-02</li><li>Build the updated application</li><li>Use Cloud Build to tag and deploy image revision to Container Registry</li><li>Deploy the new image as Cloud Run service</li><li>curl -X GET $SERVICE_URL/2019 should respond with json dataset</li></ul><h3>Step 5: Deploy the Staging Frontend</h3><p>In this scenario, deploy the Staging Frontend.</p><p>A high-level architecture diagram below summarizes the general architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UgOxDZ1aoL7EEvfd" /></figure><h3>Deploy Frontend</h3><p>To complete this section successfully, we are required to implement the following tasks:</p><ul><li>Access pet-theory/lab06/firebase-frontend</li><li>Build the frontend staging application</li><li>Use Cloud Build to tag and deploy image revision to Container Registry</li><li>Deploy the new image as Cloud Run service</li><li>Frontend access to Rest API and Firestore Database</li></ul><p>Access the Frontend Service URL.</p><p>Note: It’s using a demo dataset to provide the onscreen entries</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_LWwoiuq1Tz8YvAQ" /></figure><h3>Step 6: Deploy the Production Frontend</h3><p>In this scenario, update the Staging Frontend to use the Firestore database.</p><p>A high-level architecture diagram below summarizes the general architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9HI6ckXuoTt7sZIU" /></figure><h3>Deploy Frontend</h3><p>To complete this section successfully, we are required to implement the following tasks:</p><ul><li>Access pet-theory/lab06/firebase-frontend/public</li><li>Update the frontend application i.e. app.js to use the REST API</li><li>Dont forget to append the year to the SERVICE_URL</li><li>Use Cloud Build to tag and deploy image revision to Container Registry</li><li>Deploy the new image as Cloud Run service</li><li>Frontend access to Rest API and Firestore Database</li></ul><p>Now that the services have been deployed, we can see the contents of the Firestore database using the frontend service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VloSR-2vsQqQMNph" /></figure><p>Thank you and happy Deploying</p><p><em>Originally published at </em><a href="https://prajwol-kc.com.np/2022/07/27/firebase-serverless-development/"><em>https://prajwol-kc.com.np</em></a><em> on July 27, 2022.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa8357218639" width="1" height="1" alt=""><hr><p><a href="https://articles.readytowork.jp/firebase-serverless-development-fa8357218639">Firebase Serverless Development</a> was originally published in <a href="https://articles.readytowork.jp/">readytowork, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enable SSL for local development]]></title>
            <link>https://articles.readytowork.jp/enable-ssl-for-local-development-2ef89db0812b?source=rss-ac71555529c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ef89db0812b</guid>
            <category><![CDATA[https-ssl]]></category>
            <category><![CDATA[mkcert]]></category>
            <category><![CDATA[local-development]]></category>
            <dc:creator><![CDATA[Prajwol KC]]></dc:creator>
            <pubDate>Wed, 11 May 2022 07:19:20 GMT</pubDate>
            <atom:updated>2022-07-15T08:22:28.816Z</atom:updated>
            <content:encoded><![CDATA[<p>This document will guide you through the running application on HTTPS mode for local development.</p><blockquote><em>Environment: Mac OS / Unix</em></blockquote><p>This uses the npm package which redirects HTTPS to our HTTP running app. Install the following npm package globally.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xuTQQNofbAE_sA4wyedeeA.jpeg" /></figure><blockquote><a href="https://github.com/cameronhunter/local-ssl-proxy">GitHub — cameronhunter/local-ssl-proxy: Simple SSL HTTP proxy using a self-signed certificate. Intended for local development only.</a></blockquote><p>Simple SSL HTTP proxy using a self-signed certificate. They are intended for local development only.</p><p>npm install -g local-ssl-proxy</p><p>After installation use</p><p>local-ssl-proxy --source 9001 --target 9000</p><p>Here target port is our running application port and source for HTTPS enabled port.</p><h3>Setup hostname for domain</h3><ol><li>sudo nano /etc/hosts</li><li>Add the following to let our domain redirect to our local server.</li></ol><p>127.0.0.1 xxxproject.local</p><h3>Run SSL proxy with a self-signed trusted certificate for xxxproject.local</h3><p>We can use it to hostname xxxproject.local, and wildcards are also supported.</p><ol><li>Install <a href="https://github.com/FiloSottile/mkcert">mkcert</a> (choco install mkcert / brew install mkcert)</li><li>Run mkcert -install</li><li>Run mkcert xxxproject.local</li><li>Run</li></ol><p>local-ssl-proxy --key xxxproject.local-key.pem --cert xxxproject.local.pem --source 9001 --target 9000</p><p>We should run our project under port 9000 (target port is our application port) whereas 9001 (SSL enabled port for the application)</p><p>You’re all set! Just go to <a href="https://localhost:9001/">https://xxxproject.local:9001</a> and see your project working!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ef89db0812b" width="1" height="1" alt=""><hr><p><a href="https://articles.readytowork.jp/enable-ssl-for-local-development-2ef89db0812b">Enable SSL for local development</a> was originally published in <a href="https://articles.readytowork.jp/">readytowork, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Chunk File Uploading on GoLang]]></title>
            <link>https://prajwolpkc.medium.com/chunk-file-uploading-on-golang-e68698e0d0b7?source=rss-ac71555529c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/e68698e0d0b7</guid>
            <category><![CDATA[file-upload]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[chunk-file]]></category>
            <dc:creator><![CDATA[Prajwol KC]]></dc:creator>
            <pubDate>Sat, 05 Mar 2022 14:37:31 GMT</pubDate>
            <atom:updated>2022-03-05T16:12:57.531Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/686/0*dk_u0472XnTkp2kc.gif" /></figure><p>This is the backend implementation of chunk file upload under golang platform. The backend system is only implemented. The philosophy behind is it attempted to upload everything in a single request. So, with the chunking strategy, they processed fixed-size chunk requests until all of the file parts are uploaded.</p><p>File Chunk data are transmitted from the client-side with the headers like content-type, content-range, content expiry, etc, and file form data (filename, filetype). Therefore each chunk is processed by the server to get uploaded on the desired condition.</p><p><strong>Go lang main.go code</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GjDBCaYBDIChzkO9l83qhw.png" /></figure><p><strong>ChunkUploadHandler.go</strong></p><pre>package controller</pre><pre>import (</pre><pre>&quot;io&quot;</pre><pre>&quot;strconv&quot;</pre><pre>&quot;strings&quot;</pre><pre>&quot;net/http&quot;</pre><pre>&quot;os&quot;</pre><pre>&quot;github.com/gin-gonic/gin&quot;</pre><pre>)</pre><pre><br>// Input -&gt; add binding model for input</pre><pre>type Input struct {</pre><pre>Model string `form:&quot;model,omitempty&quot; binding:&quot;required&quot;`</pre><pre>}</pre><pre>// Response -&gt; response for the util scope</pre><pre>type Response struct {</pre><pre>Success bool   `json:&quot;success&quot;`</pre><pre>Message string `json:&quot;message&quot;`</pre><pre>Name    string `json:&quot;name&quot;`</pre><pre>}</pre><pre>func ChunkUploadHandler(c *gin.Context) {</pre><pre>var f *os.File</pre><pre>file, uploadFile, err := c.Request.FormFile(&quot;file&quot;)</pre><pre>if err != nil {</pre><pre>c.JSON(http.StatusBadRequest, gin.H{&quot;error&quot;: &quot;content-type should be multipart/formdata&quot;})</pre><pre>return</pre><pre>}</pre><pre>contentRangeHeader := c.Request.Header.Get(&quot;Content-Range&quot;)</pre><pre>rangeAndSize := strings.Split(contentRangeHeader, &quot;/&quot;)</pre><pre>rangeParts := strings.Split(rangeAndSize[0], &quot;-&quot;)</pre><pre>rangeMax, err := strconv.Atoi(rangeParts[1])</pre><pre>if err != nil {</pre><pre>c.JSON(http.StatusBadRequest, gin.H{&quot;error&quot;: &quot;Missing range in Content-Range header&quot;})</pre><pre>return</pre><pre>}</pre><pre>fileSize, err := strconv.Atoi(rangeAndSize[1])</pre><pre>if err != nil {</pre><pre>c.JSON(http.StatusBadRequest, gin.H{&quot;error&quot;: &quot;Missing file size in Content-Range header&quot;})</pre><pre>return</pre><pre>}</pre><pre>if fileSize &gt; 100*1024*1024 {</pre><pre>c.JSON(http.StatusBadRequest, gin.H{&quot;error&quot;: &quot;File size should be less than 100MB&quot;})</pre><pre>return</pre><pre>}</pre><pre>var input Input</pre><pre>err = c.ShouldBind(&amp;input)</pre><pre>if err != nil {</pre><pre>c.JSON(http.StatusBadRequest, gin.H{&quot;error&quot;: &quot;Missing model name in header&quot;})</pre><pre>return</pre><pre>}</pre><pre>tempDir, err := os.UserHomeDir()</pre><pre>if err != nil {</pre><pre>c.JSON(http.StatusInternalServerError, gin.H{&quot;error&quot;: &quot;Error resolving home directory&quot;})</pre><pre>return</pre><pre>}</pre><pre>if _, err := os.Stat(tempDir + &quot;/&quot; + input.Model); os.IsNotExist(err) {</pre><pre>err := os.Mkdir(tempDir+&quot;/&quot;+input.Model, 0777)</pre><pre>if err != nil {</pre><pre>c.JSON(http.StatusInternalServerError, gin.H{&quot;error&quot;: &quot;Error creating temporary directory&quot;})</pre><pre>return</pre><pre>}</pre><pre>}</pre><pre>if f == nil {</pre><pre>f, err = os.OpenFile(tempDir+&quot;/&quot;+input.Model+&quot;/&quot;+uploadFile.Filename, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)</pre><pre>if err != nil {</pre><pre>c.JSON(http.StatusInternalServerError, gin.H{&quot;error&quot;: &quot;Error creating file&quot;})</pre><pre>return</pre><pre>}</pre><pre>}</pre><pre>if _, err := io.Copy(f, file); err != nil {</pre><pre>c.JSON(http.StatusInternalServerError, gin.H{&quot;error&quot;: &quot;Error writing to a file&quot;})</pre><pre>return</pre><pre>}</pre><pre>f.Close()</pre><pre>if rangeMax &gt;= fileSize-1 {</pre><pre>combinedFile := tempDir + &quot;/&quot; + input.Model + &quot;/&quot; + uploadFile.Filename</pre><pre>uploadingFile, err := os.Open(combinedFile)</pre><pre>if err != nil {</pre><pre>c.JSON(http.StatusBadRequest, gin.H{&quot;error&quot;: &quot;Failed to upload file &quot;})</pre><pre>return</pre><pre>}</pre><pre>uploadingFile.Close()</pre><pre>response := &amp;Response{</pre><pre>Success: true,</pre><pre>Message: &quot;Uploaded Successfully&quot;,</pre><pre>Name:    uploadFile.Filename,</pre><pre>}</pre><pre>c.JSON(http.StatusOK, gin.H{&quot;data&quot;: response})</pre><pre>return</pre><pre>}</pre><pre>c.JSON(http.StatusOK, gin.H{&quot;status&quot;: &quot;uploading&quot;})</pre><pre>}</pre><p><em>Originally published at </em><a href="https://prajwol-kc.com.np/2022/03/05/chunk-file-uploading-on-golang/"><em>https://prajwol-kc.com.np</em></a><em> on March 5, 2022.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e68698e0d0b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Video Streaming Services for Golang — PKC Blog Hub]]></title>
            <link>https://articles.readytowork.jp/video-streaming-services-for-golang-pkc-blog-hub-5505178ab692?source=rss-ac71555529c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/5505178ab692</guid>
            <category><![CDATA[twilio]]></category>
            <category><![CDATA[video-streaming-service]]></category>
            <dc:creator><![CDATA[Prajwol KC]]></dc:creator>
            <pubDate>Thu, 03 Mar 2022 02:51:32 GMT</pubDate>
            <atom:updated>2022-07-15T08:18:14.107Z</atom:updated>
            <content:encoded><![CDATA[<h3>Video Streaming Services for Golang — PKC Blog Hub</h3><ul><li>Go lang is an update to date recent uptrend programming platform</li><li>Since video assets are much in demand we can either create our custom video streaming server or we can checkout different services that are applicable for video streaming Development/Updates</li><li>The services are generic overviews that can be used under the Go platforms</li></ul><p><strong>Video Streaming Services in Research and its technical features</strong></p><p>1. <strong>Twilio Video Streaming</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0W7M5pplLGB9P3w6.jpg" /></figure><ul><li>Twilio Video is based on WebRTC protocol to connect browser-based webcam and microphone to engage under the application.</li><li>Uses Nodejs SDK for video streaming in test environment</li><li>Use of Video API which is a javascript API generally based on room-based video<br>services</li><li>Since it&#39;s based on JS we can make easily integrate it under React / Vue JS</li><li>Video can be recorded which will Recording API and can be downloaded under our<br>own server instance</li><li>Pricing: $0.004 per video stream per minute, and recording $0.004 per video<br>stream per minute</li><li>Demo Deployment: ​Link ​(Under Nginx Server and Node Js Environment )</li></ul><p><strong>2. Amazon Kinesis Video Streams with WebRTC3. Mux</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*MD5_tvuRexNPix2a.jpg" /></figure><p><strong>4. Api.video</strong></p><ul><li>Video Streaming available on Go Library for backend streaming</li><li>Need Mux service token and keys</li><li>Works on RTMP and video files both</li><li>Have to connect to webRTC for browser webcam and microphone</li><li>Pricing: Live Streaming costs $0.0013/min for the video</li><li>Ref: <a href="https://mux.com/">​https://mux.com/</a></li></ul><p><strong>5. Open Source project ​livego</strong></p><ul><li>Uses own protocols and tech stack for all video Hosting, Transcoding and<br>Streaming</li><li>Provided with SDKs with Go Lang library</li><li>Can be integrated with both webcam and videos</li><li>Developers Sandbox and production env</li><li>The pricing model is on usage basic: ​<a href="https://api.video/pricing/">https://api.video/pricing/</a></li><li>Under development open source project under GO lang: <a href="https://github.com/gwuhaolin/livego">https://github.com/gwuhaolin/livego</a></li><li>Support for Downstream playback only for playback protocols</li><li>Free but have to engineer into the code for the suitable use case</li><li>Supported, and the playback address is as follows:</li></ul><p><strong>Backdrop</strong><br>Necessary to connect a webcam tool to connect it to the backend. Also, it&#39;s necessary to store videos under our own server environment</p><p><strong>WebRTC</strong> is an open technology specification for enabling real-time communication (RTC) across browsers and mobile applications via simple APIs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*B6VrZGMByvor8UOb.jpg" /></figure><p>It uses peering techniques for real-time data exchange between connected peers and provides low latency media streaming required for human-to-human interaction and requires SSL for allowing a webcam and microphone under webRTC.</p><p><em>Originally published at </em><a href="https://prajwol-kc.com.np/2022/03/03/video-streaming-services-for-golang/"><em>https://prajwol-kc.com.np</em></a><em> on March 3, 2022.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5505178ab692" width="1" height="1" alt=""><hr><p><a href="https://articles.readytowork.jp/video-streaming-services-for-golang-pkc-blog-hub-5505178ab692">Video Streaming Services for Golang — PKC Blog Hub</a> was originally published in <a href="https://articles.readytowork.jp/">readytowork, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Go Application deployment on Google App Engine flexible environment — PKC Blog Hub]]></title>
            <link>https://prajwolpkc.medium.com/go-application-deployment-on-google-app-engine-flexible-environment-pkc-blog-hub-e4a2afba0d28?source=rss-ac71555529c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4a2afba0d28</guid>
            <category><![CDATA[go-application-deployment]]></category>
            <category><![CDATA[gae-custom-runtime]]></category>
            <category><![CDATA[google-app-engine]]></category>
            <category><![CDATA[gae-flexible-deployment]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Prajwol KC]]></dc:creator>
            <pubDate>Thu, 20 May 2021 17:14:47 GMT</pubDate>
            <atom:updated>2021-05-31T05:51:16.346Z</atom:updated>
            <content:encoded><![CDATA[<h3>Go Application deployment on Google App Engine flexible environment — PKC Blog Hub</h3><p>Google Cloud App Engine is a Platform as a Service product that allows us to deploy apps written in various runtimes, such as:</p><p>App Engine provides us with two options: the Standard Environment and the Flexible Environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*DeghvoYT3y8T4hhW1ESx3A.png" /></figure><p>The Standard environment is a cloud-native option because it has a very fast spin-up engine that creates instances for our traffic in milliseconds.</p><p>The Flexible environment, on the other hand, is different due to its container-based environment that relies on Compute Engine VMs. This is important for many use cases as we can customize our server as per our usage and requirement. This can be the installation of custom packages like ImageMagick, MuPDF libraries, or SSH into our server or run our own bash script, etc. We can use any type of runtime to run our app, and the important thing is that our app should respond in the default 8080 port unless we make some changes.</p><p>Here is a detailed idea of the difference between them. <a href="https://cloud.google.com/appengine/docs/the-appengine-environments">https://cloud.google.com/appengine/docs/the-appengine-environments</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*J9qotknbor-xkSuE.jpg" /></figure><p>Here we will be deploying a GO application on Flexible Environment on custom runtime rather than Google App Engine default go runtime as it brings up more concerns, unlike the standard one. We will be adding two files one <strong>app.yaml</strong> and another <strong>Docker </strong>file</p><p>Let&#39;s a take simple GO application that uses the GIN web framework to render Hello World to our web browser.</p><pre>package main <br>import ( <br>     &quot;github.com/gin-gonic/gin&quot; <br>) </pre><pre>func main() { <br>     r := gin.Default() <br>     r.GET(&quot;/&quot;, func(c *gin.Context) { <br>         c.String(200, &quot;Hello World&quot;) <br>     }) <br>     r.Run() <br>}</pre><p>Time to show the world 🤠🤠 . Let&#39;s make this say through our App Engine Flexible environment.</p><p><strong>app.yaml</strong></p><pre>runtime: custom <br>env: flex</pre><p>This is pretty straightforward, as we are defining our custom image as runtime with a flexible environment. We can add other options for scaling purposes and port settings. Check out <a href="https://cloud.google.com/appengine/docs/flexible/go/reference/app-yaml">here</a></p><p>Now, let create a Docker file that resides in the root directory.</p><p><strong>Docker</strong></p><pre># FOR GAE Flexible Environment Custom Runtime</pre><pre>FROM golang:1.14</pre><pre><br># Set necessary environmet variables needed for our image</pre><pre>ENV GO111MODULE=on \</pre><pre>CGO_ENABLED=0 \</pre><pre>GOOS=linux \</pre><pre>GOARCH=amd64</pre><pre># install build essentials</pre><pre>RUN apt-get update &amp;&amp; \apt-get install -y wget build-essential pkg-config --no-install-recommends</pre><pre>RUN apt-get install -y mupdf mupdf-tools</pre><pre># Move to working directory /build</pre><pre>WORKDIR /build</pre><pre># Copy the code into the container</pre><pre>COPY . .</pre><pre># Copy and download dependency using go mod</pre><pre>RUN go mod download</pre><pre># Build the application</pre><pre>RUN go build -o main .</pre><pre># Export necessary port # default GCP App Engine Port</pre><pre>EXPOSE 8080</pre><pre># Command to run when starting the container</pre><pre>CMD [&quot;/build/main&quot;]</pre><p>The docker file will contain all the necessary configuration setup that we need to expose the application over <strong>8080</strong>. Here <strong>8080 </strong>is our default port for GAE.</p><p>Also, make sure<strong> go.mod</strong> and <strong>go.sum </strong>exists on the root directory so that necessary packages get installed on the deployment system</p><p>Now from the <strong>gcloud </strong>CLI set the project on which the application is going to be deployed. For <strong>gcloud </strong>setup/configuration check.</p><pre>gcloud app deploy</pre><p>After successful deployment, there will be a URL to the application and we have our app successfully deployed on google app engine flexible environment using a custom runtime image.</p><p>For more, if we want our application using GORM to connect over Google Cloud SQL, there are some changes to be done.</p><ul><li>First, Enable the Cloud SQL Admin API in the project</li><li>Under app.yaml, we have to tell our application to allow secure connection or else the application can connect to the database, make changes as following</li></ul><pre>runtime: custom <br>env: flex <br>beta_settings: <br>    cloud_sql_instances: $INSTANCE_CONNECTION_NAME$</pre><p>$INSTANCE_CONNECTION_NAME$ is the connection name of our cloud SQL that we can get from its instance detail.</p><p>Like before deploy the application.</p><p><strong>gcloud app deploy</strong></p><p>As a flexible environment, there are many configurations that can be implemented to actually make our system like we want to make and behave as we intend to.</p><p><em>Originally published at </em><a href="https://prajwol-kc.com.np/2021/05/20/go-application-deployment-on-google-app-engine-flexible-environment/"><em>https://prajwol-kc.com.np</em></a><em> on May 20, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4a2afba0d28" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>