Tools to Install.

  1. GitBash (https://git-scm.com/download/win)
  2. XShell (https://www.netsarang.com/download/down_form.html?code=622)
  3. XFtp (https://www.netsarang.com/download/down_form.html?code=623)
  4. Visual Studio Code (https://code.visualstudio.com/)

Lab Setup.

Lab setup includes the following tasks needs to be performed.

  1. Create Google Cloud Account.
  2. Generate keys.
  3. Setup Google Cloud.
  4. Install tools. (For Windows)

1. Create Google Cloud Account.

Create a new Gmail address and SignUp for google cloud in URL (https://cloud.google.com)

Note: In order to create an account you need a valid credit card/ debit card with working phone number. I would prefer to use a new gmail address instead of using your personal one. In account type while registering select Individual rather than using Business which is default.

Once you login and after few minutes you will look the console page as follows.

image

From there you can navigate to Compute Engine to create servers.

image

We will come back and create the servers in upcoming section.

2. Generate keys.

You can generate the keys (SSH Keys Private and Public) in two ways.

a. From Web tools

You can generate Public Keys and Private Keys in the following URL. https://qsandbox.com/tools/private-public-keygen

Open the URL and click on generate. image

Then copy the content as save them with notepad.

Copy Private Key and Save As devops.pem in home directory. image image

Copy Public Key and Save As devops.pub in home directory. image image

b. From GitBash (Need installation of this tool)

You need to download this tool based on your architecuture.

32 bit: https://github.com/git-for-windows/git/releases/download/v2.17.1.windows.2/Git-2.17.1.2-32-bit.exe

64 bit: https://github.com/git-for-windows/git/releases/download/v2.17.1.windows.2/Git-2.17.1.2-64-bit.exe

Install with default options. Then open GitBash icon from StartMenu. image

Run the following commands in the same sequence. image

$ rm -rf devops*
$ ssh-keygen -q -f devops -N ''
$ mv devops devops.pem

3. Setup Google Cloud.

You need to configure google cloud in order to access with the key which are generated with step.

a. Setup Firewall.

Goto firewall rules under VPC network.

image

image

Add/Change the following parameters to add new.

-> Name: all

-> Targets: All instances in the network

-> Source IP ranges: 0.0.0.0/0

-> Protocols and ports: Allow all

Then click on Create

b. Upload SSH Public Key.

Open the saved devops.pub file in your home directory which was done in previous step and copy that to google cloud.

Go to Compute Engine

image

Then SSH Keys and then click on Add SSH keys Copy the content of devops.pub file from you local PC to this using notepad. Open the file with notepad and paste it over here.

image

But there is 3 coloums in that content for which you need to replace the last coloum with ec2-user

image

Then click on Save

Thats all your account setup is completed.. But you need to setup few tools which are listed in next steps.

Configure these as shown in demo.. Then you are all set... :)