Skip to content

Latest commit

 

History

History
66 lines (41 loc) · 2.17 KB

docker-setup-gce.adoc

File metadata and controls

66 lines (41 loc) · 2.17 KB

Setup Environment in GCE

  • 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

gce license
  • Make sure you click on the project someproject-XXXX that was pre-created for you - this is also your Project ID.

gce project
  • 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

gce menu
  • You will see the "Compute Engine is getting ready" message. Wait until this is done.

gce getting ready

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:

gce shell

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.

gce shell2

Once the second command completes, you should see a Virtual Computer called "mydocker-daemon" created. Click in the SSH link.

gce vminstance

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.