0% found this document useful (0 votes)
78 views5 pages

Google Cloud DevOps Lab Setup Guide

This document provides instructions for setting up a Google Cloud account and creating a DevOps project and virtual machine instance. The steps include registering for a Google Cloud free trial, creating a "DevOps" project, copying an image file to create a custom image, and using that image to launch a virtual machine instance named "lab" to use for the DevOps course exercises. Basic configuration and software installation steps are also described.

Uploaded by

Subrata Fouzdar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views5 pages

Google Cloud DevOps Lab Setup Guide

This document provides instructions for setting up a Google Cloud account and creating a DevOps project and virtual machine instance. The steps include registering for a Google Cloud free trial, creating a "DevOps" project, copying an image file to create a custom image, and using that image to launch a virtual machine instance named "lab" to use for the DevOps course exercises. Basic configuration and software installation steps are also described.

Uploaded by

Subrata Fouzdar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

DevOps Lab 1.

1 Cloud Setup
These instructions guide you in creating an identity with Google, setting up a billing account,
and creating your DevOps project.

Overview
In this lab, you sign up for the Google Cloud free trail. To confirm your identity, you must
have a credit card or debit card (a pre-paid credit card will not work) to register for the free
trial.

Note that Goggle may debit $1 from your card for validation purposes. It will be refunded
immediately.

What you need


To complete this lab, you need:

● Internet access

● Access to a supported Internet browser

● A credit card or debit card to register for the free trial

The following browsers are known to work:

● The latest version of Google Chrome, Firefox, or Microsoft Edge

● Microsoft Internet Explorer 11+

● Safari 8+ (Safari private mode is not supported)

What you learn


When you complete this exercise, you will have an account on the Google Cloud Platform
and a project ready for the DevOps course.

Introduction
In this lab, you register for the Google Cloud Platform free trial. The free trial provides you:

● $300 Credit for Free

Sign up and get $300 to spend on Google Cloud Platform over the next 60 days and discover
the power of the GCP products.

● You will not be billed


When you sign up for the free trial, you are asked to provide your credit card information.
This information is used only to verify your identity and let Google know you're not a robot.
Your credit card is not charged during or after your free trial unless you upgrade to a paid
account.

Register for the free trial


To register for the free trial:

Step 1
Open the free trial registration page:

https://console.cloud.google.com/freetrial

Step 2
If you do not have a Gmail account, follow the steps to create one. Otherwise, log in and
proceed to the next step

Step 3
Complete the registration form.

Step 4
Read and agree to the terms of service.

Step 5
Click Accept and start free trial

Step 6
Click on the three horizontal bars at the left-hand side of the blue bar near the top of the
browser window. This will cause a tray to slide out from the left. In this tray, click on Billing.
Next, refresh the browser window. This action will reveal a blue button in the upper right
hand corner with the name "UPGRADE". Click on the UPGRADE button and confirm in the
dialog box.

Create the DevOps Project


Follow these steps to create a Google Cloud Platform project named 'devops' for this course.

Step 1
Open the Cloud Platform Console at https://console.cloud.google.com and click Select a
project > Create a project

Step 2
In the 'New Project' dialog:

● For Project name, type DevOps

● In you have configured multiple billing accounts, select your preferred account
as Billing account.

● Click Create

Create your lab computer


You will now create a Compute Engine instance that will be your own computer in the cloud
for performing all the work during this course.

Step 1
Click on the three horizontal bars at the left-hand side of the blue bar near the top of the
browser window. Select Compute Engine. Be patient and wait until Google initializes this
area of the Google Cloud Platform for you.

Step 2
Click on the first icon to the right of the search area in the blue bar. If you hover over this
icon, you will see the hint “Activate Google Cloud Shell.” Click on this icon and notice that a
terminal is opened at the bottom of the browser window.

Step 3
In the Google Cloud Shell window, wait until the prompt is displayed.

You need to copy an image from a bucket. You first need to create a bucket. You need to
create a unique identifier, so type the following command, replacing xyz with your initials
and replacing 20170119 with today's date.
gsutil mb gs://devops-xyz-20170119
Now, you need to copy files from a bucket in another project to the new bucket. Type the
following command again, substituting your initials and today's date. This can take a few
minutes.
gsutil cp gs://simplilearn-devops-image/* gs://devops-xyz-20170119/
Verify that the copy worked, again substituting your initials and today's date.
gsutil ls
gsutil ls gs://devops-xyz-20170119/
Close the shell.
exit
Step 4
Select Images from the left column. A list of images will appear.

You need to create an image to create a computer. Select CREATE IMAGE at the top of the
page. Enter Name student-image
Leave Family and Description blank.
Change Source to Cloud Storage file
Hit Browse and you will see your bucket. Hit the arrow to the right of the bucket, and you
will see the two files. Select the latest one ending 20170108.tar.gz.
Hit Select.
Now, create an image from the file by hitting Create. It may take a few minutes. The new
image should appear at the top of the list of images.

Step 5
We are now going to create a computer from the image.

Select VM Instances from the left-hand column. Select Create Instance.

Give it the Name lab


Select a Zone near your location.
See that it tells you the Effective hourly rate and the estimated monthly cost. This cost will
barely impact your $300 credit.
Choose how many CPUs and how much memory you want. The default is sufficient. Note
that more CPUs and more memory increase the cost.

We need to specify a boot disk. Select Change. You will see a list of OS images. Select
the Custom images tab.

You need to define the Boot disk type. Select SSD persistent disk and give it a Size of 200.
Select Select.

Now, create it by hitting Create at the bottom of the screen. It will take a few minutes.

You should see the VM Instance. Note that it is running.

Step 6
Click the SSH button at the right-hand side of the line of information about your new lab
computer. This will open a new browser window with a terminal connection. Find the icon
that looks like a gear in the upper right-hand corner of this terminal browser window and
select Change Linux User Name. Enter student and click Change. Now, notice the prompt
that says "student@lab:~$"

You now have a working computer for conducting all class work for the DevOps Practitioner
course.

See what is installed. Explore the machine.


ls -l
Step 7
You will need the build tool Maven for later exercises. We will now install Maven. You need
to be root, so use sudo.
sudo apt-get install maven
You will see a long list of dependencies.
Enter Y to accept them.
Maven will be installed.

Check the versions of Java and Maven that are installed.


java -version
mvn -v

Step 8
Stopping your lab computer.

Close the SSH window.


exit
You will need to stop the lab computer at the end of each day to prevent it from accumulating
costs during the evening and night.

From the Web UI, you can navigate to the Compute Engine section and select your lab
computer. When it is selected, click on the icon representing the "Stop" operation.

Step 9
Watch recording to see how to create a VM on Amazon AWS and MS Azure.

You might also like