<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Snehal Masne</title>
    <description>The latest articles on DEV Community by Snehal Masne (@snehalmasne).</description>
    <link>https://dev.to/snehalmasne</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F618610%2Fb0905cd7-3c03-4180-9c8b-5fc06c1e49a1.jpg</url>
      <title>DEV Community: Snehal Masne</title>
      <link>https://dev.to/snehalmasne</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/snehalmasne"/>
    <language>en</language>
    <item>
      <title>Getting Started: Create and Manage Cloud Resources: Challenge Lab</title>
      <dc:creator>Snehal Masne</dc:creator>
      <pubDate>Wed, 21 Apr 2021 18:20:53 +0000</pubDate>
      <link>https://dev.to/snehalmasne/getting-started-create-and-manage-cloud-resources-challenge-lab-53p1</link>
      <guid>https://dev.to/snehalmasne/getting-started-create-and-manage-cloud-resources-challenge-lab-53p1</guid>
      <description>&lt;p&gt;Topics tested:&lt;br&gt;
Create an instance.&lt;br&gt;
Create a 3 node Kubernetes cluster and run a simple service.&lt;br&gt;
Create an HTTP(s) Load Balancer in front of two web servers.&lt;/p&gt;

&lt;p&gt;Setup&lt;br&gt;
Before you click the Start Lab button&lt;br&gt;
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources will be made available to you.&lt;/p&gt;

&lt;p&gt;This Qwiklabs hands-on lab lets you do the lab activities yourself in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials that you use to sign in and access Google Cloud for the duration of the lab.&lt;/p&gt;

&lt;p&gt;What you need&lt;br&gt;
To complete this lab, you need:&lt;/p&gt;

&lt;p&gt;Access to a standard internet browser (Chrome browser recommended).&lt;br&gt;
Time to complete the lab.&lt;br&gt;
Note: If you already have your own personal Google Cloud account or project, do not use it for this lab.&lt;/p&gt;

&lt;p&gt;Note: If you are using a Pixelbook, open an Incognito window to run this lab.&lt;/p&gt;

&lt;p&gt;Challenge scenario&lt;br&gt;
You have started a new role as a Junior Cloud Engineer for Jooli Inc. You are expected to help manage the infrastructure at Jooli. Common tasks include provisioning resources for projects.&lt;/p&gt;

&lt;p&gt;You are expected to have the skills and knowledge for these tasks, so don't expect step-by-step guides to be provided.&lt;/p&gt;

&lt;p&gt;Some Jooli Inc. standards you should follow:&lt;/p&gt;

&lt;p&gt;Create all resources in the default region or zone, unless otherwise directed.&lt;br&gt;
Naming is normally team-resource, e.g. an instance could be named nucleus-webserver1&lt;br&gt;
Allocate cost effective resource sizes. Projects are monitored and excessive resource use will result in the containing project's termination (and possibly yours), so beware. This is the guidance the monitoring team is willing to share; unless directed use f1-micro for small Linux VMs and n1-standard-1 for Windows or other applications such as Kubernetes nodes.&lt;br&gt;
Task 1: Create a project jumphost instance&lt;br&gt;
Make sure &lt;br&gt;
you:&lt;/p&gt;

&lt;p&gt;name the instance nucleus-jumphost&lt;br&gt;
use the machine type f1-micro&lt;br&gt;
use the default image type (Debian Linux)&lt;br&gt;
In the Cloud Console, on the top left of the screen, select Navigation menu &amp;gt; Compute Engine &amp;gt; VM Instances:&lt;/p&gt;

&lt;p&gt;Name for the VM instance : nucleus-jumphost&lt;/p&gt;

&lt;p&gt;Region : leave Default Region&lt;/p&gt;

&lt;p&gt;Zone : leave Default Zone&lt;/p&gt;

&lt;p&gt;Machine Type : f1-micro (Series - N1)&lt;/p&gt;

&lt;p&gt;Boot Disk : use the default image type (Debian Linux)&lt;/p&gt;

&lt;p&gt;Create.&lt;/p&gt;

&lt;p&gt;Click Check my progress to verify the objective.&lt;br&gt;
Task Completed...&lt;/p&gt;

&lt;p&gt;Task 2: Create a Kubernetes service cluster&lt;br&gt;
The team is building an application that will use a service. This service will run on Kubernetes.&lt;/p&gt;

&lt;p&gt;You need to:&lt;/p&gt;

&lt;p&gt;Create a cluster (in the us-east1 region) to host the service&lt;br&gt;
Use the Docker container hello-app (gcr.io/google-samples/hello-app:2.0) as a place holder, the team will replace the container with their own work later&lt;br&gt;
Expose the app on port 8080&lt;br&gt;
Activate Cloud Shell&lt;/p&gt;

&lt;p&gt;gcloud config set compute/zone us-east1-b&lt;/p&gt;

&lt;p&gt;gcloud container clusters create nucleus-webserver1&lt;/p&gt;

&lt;p&gt;gcloud container clusters get-credentials nucleus-webserver1&lt;/p&gt;

&lt;p&gt;kubectl create deployment hello-app --image=gcr.io/google-samples/hello-app:2.0&lt;/p&gt;

&lt;p&gt;kubectl expose deployment hello-app --type=LoadBalancer --port 8080&lt;/p&gt;

&lt;p&gt;kubectl get service&lt;/p&gt;

&lt;p&gt;Click Check my progress to verify the objective.&lt;br&gt;
Task Completed...&lt;/p&gt;

&lt;p&gt;Task 3: Setup an HTTP load balancer&lt;br&gt;
We will serve the site via nginx web servers, but we want to ensure we have a fault tolerant environment, so please create an HTTP load balancer with a managed instance group of two nginx web servers. Use the following to configure the web servers, the team will replace this with their own configuration later.&lt;/p&gt;

&lt;p&gt;You need to:&lt;/p&gt;

&lt;p&gt;Create an instance template&lt;br&gt;
Create a target pool&lt;br&gt;
Create a managed instance group&lt;br&gt;
Create a firewall rule to allow traffic (80/tcp)&lt;br&gt;
Create a health check&lt;br&gt;
Create a backend service and attach the manged instance group&lt;br&gt;
Create a URL map and target HTTP proxy to route requests to your URL map&lt;br&gt;
Create a forwarding rule&lt;br&gt;
Do the following commands in cloud shell to Setup an HTTP load balancer&lt;/p&gt;

&lt;p&gt;Create startup.sh file&lt;br&gt;
    cat &amp;lt;&amp;lt; EOF &amp;gt; startup.sh&lt;br&gt;
    #! /bin/bash&lt;br&gt;
    apt-get update&lt;br&gt;
    apt-get install -y nginx&lt;br&gt;
    service nginx start&lt;br&gt;
    sed -i -- 's/nginx/Google Cloud Platform -'"\$HOSTNAME"'/' &lt;br&gt;
    /var/www/html/index.nginx-debian.html&lt;br&gt;
    EOF&lt;/p&gt;

&lt;p&gt;1 .Create an instance template :&lt;br&gt;
gcloud compute instance-templates create nginx-template \&lt;br&gt;
--metadata-from-file startup-script=startup.sh&lt;br&gt;
2 .Create a target pool :&lt;br&gt;
gcloud compute target-pools create nginx-pool&lt;br&gt;
3 .Create a managed instance group :&lt;br&gt;
gcloud compute instance-groups managed create nginx-group \&lt;br&gt;
--base-instance-name nginx \&lt;br&gt;
--size 2 \&lt;br&gt;
--template nginx-template \&lt;br&gt;
--target-pool nginx-pool&lt;/p&gt;

&lt;p&gt;gcloud compute instances list&lt;br&gt;
4 .Create a firewall rule to allow traffic (80/tcp) :&lt;br&gt;
gcloud compute firewall-rules create www-firewall --allow tcp:80&lt;/p&gt;

&lt;p&gt;gcloud compute forwarding-rules create nginx-lb \&lt;br&gt;
--region us-east1 \&lt;br&gt;
--ports=80 \&lt;br&gt;
--target-pool nginx-pool&lt;br&gt;
gcloud compute forwarding-rules list&lt;/p&gt;

&lt;p&gt;5 .Create a health check :&lt;br&gt;
gcloud compute http-health-checks create http-basic-check&lt;/p&gt;

&lt;p&gt;gcloud compute instance-groups managed \ &lt;br&gt;
set-named-ports nginx-group \&lt;br&gt;
--named-ports http:80&lt;br&gt;
6 .Create a backend service and attach the manged instance group :&lt;br&gt;
gcloud compute backend-services create nginx-backend \&lt;br&gt;
--protocol HTTP --http-health-checks http-basic-check --&lt;br&gt;&lt;br&gt;
global&lt;/p&gt;

&lt;p&gt;gcloud compute backend-services add-backend nginx-backend \&lt;br&gt;
--instance-group nginx-group \&lt;br&gt;
--instance-group-zone us-east1-b \&lt;br&gt;
--global&lt;br&gt;
7 .Create a URL map and target HTTP proxy to route requests to your URL map :&lt;br&gt;
gcloud compute url-maps create web-map \&lt;br&gt;
--default-service nginx-backend&lt;/p&gt;

&lt;p&gt;gcloud compute target-http-proxies create http-lb-proxy \&lt;br&gt;
--url-map web-map&lt;br&gt;
8 .Create a forwarding rule :&lt;br&gt;
gcloud compute forwarding-rules create http-content-rule \&lt;br&gt;
--global \&lt;br&gt;
--target-http-proxy http-lb-proxy \&lt;br&gt;
--ports 80&lt;br&gt;
gcloud compute forwarding-rules list&lt;/p&gt;

&lt;p&gt;Wait for for extra 10 mins to Create the website behind the HTTP load balancer and to get 100 points in lab !!!&lt;br&gt;
Click Check my progress to verify the objective.&lt;br&gt;
Task Completed...&lt;/p&gt;

&lt;p&gt;Quest Complete!&lt;/p&gt;

&lt;p&gt;Congrats! You completed this quest and earned a badge. Become a cloud expert and start another.&lt;/p&gt;

</description>
      <category>gcp</category>
      <category>googlecloud</category>
      <category>cloud</category>
      <category>quest</category>
    </item>
  </channel>
</rss>
