-
The instructor will provide you with a temporary username / password to login into Google Cloud Console.
-
To avoid conflicts with your personal account, please open a new incognito window for the rest of this lab.
-
Login into the Cloud Console: https://console.cloud.google.com/ with the provided credentials.
-
Accept the terms of service, and also configure the E-Mail preferences
-
Make sure you click on the project someproject-XXXX that was pre-created for you - this is also your Project ID.
-
Visit each of these pages to kick-off some initial setup behind the scenes, such as enabling the Compute Engine API by navigating to Compute → Compute Engine → VM Instances
-
You will see the "Compute Engine is getting ready" message. Wait until this is done.
Now, let’s create our Google Compute instance. Open the Google Cloud Shell by clicking on the icon on the top right of the screen:
Click Start Cloud Shell
In the Google Cloud Shell type the following commands:
$ gcloud compute firewall-rules create allow-all --allow=tcp:0-65535
$ gcloud compute instances create --image-family=centos-7 --image-project=centos-cloud --machine-type n1-standard-2 --zone us-east1-b --boot-disk-size=200GB mydocker-daemon
These commands will take some seconds to complete.
Once the second command completes, you should see a Virtual Computer called "mydocker-daemon" created. Click in the SSH link.
When you click on SSH, a web shell will be opened. Now, we will setup our CentOS Linux to run a docker daemon.
Let’s do it. Execute the following commands in the mydocker-daemon SSH terminal:
$ sudo su -
# Installing docker and other tools
$ yum install -y docker git wget maven unzip
$ systemctl enable docker; systemctl start docker
Check if the client is working by executing:
$ docker ps
Which will return an empty list of containers working.