Go back

How to get Ansible AWX on GCP (Google Cloud Platform)

This section describes how to launch and connect to Ansible AWX Kit in a Google Compute environment using the available Cloud Launcher offering.

  1. Open Ansible AWX (Opensource Ansible Tower alternative) listing on GCP marketplace
  2. Click Launch.

/img/gcp/ansible-awx/ansible-launch.png

  • It will take you to the agreement page. On this page, you can change the project from the project selector on top navigator bar as shown in the below screenshot.

  • Accept the Terms and agreements by ticking the checkbox and clicking on the AGREE button. /img/common/gcp_agreement_page.png

  • It will show you the successfully agreed popup page. Click on Deploy. /img/common/gcp_agreement_accept_page.png

  • Select a zone where you want to launch the VM(such as us-east1-)

  • Optionally change the number of cores and amount of memory. (This defaults to 1 vCPUs and 3.75 GB ram.)

  • Optionally change the boot disk type and size. (This defaults to “Standard Persistent Disk” and 20 GB respectively)

  • Optionally change the network name and subnetwork names. Be sure that whichever network you specify has ports 22 (for ssh), 3389 (for RDP) and 80 (for HTTP) exposed.

  • Click Deploy when you are done. Ansible AWX (Opensource Ansible Tower alternative) will begin deploying.

/img/gcp/ansible-awx/ansible-launch-details-page.png

  1. A summary page displays when the compute engine is successfully deployed. Click on the Instance link to to go to the instance page .

  2. On the instance page, click on the “SSH” button, select “Open in browser window”.

/img/gcp/ansible-awx/ansible-ssh-in-browser.png 5. This will open SSH window in a browser. 6. Run below command to set the password for “ubuntu” user

/img/gcp/ansible-awx/ansible-ssh-screen.png 7. Now the password for ubuntu user is set, you can connect to the VM’s desktop environment from any local windows machine using RDP protocol.

  1. To connect using RDP via Windows Machine, first note the external IP of the VM from VM details page as highlighted below

/img/gcp/ansible-awx/ansible-external-ip.png 9. Then From you local windows machine, goto “start” menu, in the search box type and select “Remote desktop connection”

  1. In the “Remote Desktop connection” wizard, copy the external ip and click connect

/img/gcp/ansible-awx/ansible-rdp.png 11. This will connect you to the VM’s desktop environment. Provide “ubuntu” as the userid and the password set in step 6 to authenticate. Click OK

/img/gcp/ansible-awx/ansible-rdp-login.png 12. Now you are connected to the out of box your own ansible tower environment via Windows Machine.

/img/gcp/ansible-awx/rdp-desktop.png 13. To connect using RDP via Linux machine, first note the external IP of the VM from VM details page,then from your local Linux machine, goto menu, in the search box type and select “Remmina”.

Note: If you don’t have Remmina installed on your Linux machine, first Install Remmina as per your linux distribution.

/img/gcp/common/remmina-search.png 14. In the “Remmina Remote Desktop Client” wizard, select the RDP option from dropdown and paste the external ip and click enter.

/img/gcp/common/remmina-external-ip.png 15. This will connect you to the VM’s desktop environment. Provide “ubuntu” as the userid and the password set in step 6 to authenticate. Click OK

/img/gcp/common/remmina-rdp-login.png 16. Now you are connected to the out of box Ansible AWX tower environment via Linux machine.

/img/gcp/ansible-awx/rdp-desktop.png 17. For connecting via Web Interface, SSH to the VM as shown in Step 5 and run below command-

sudo docker logs tools_awx_1 | grep 'Admin password'

Note down the password for admin user.

/img/gcp/ansible-awx/admin-default-password.png

  1. Login to the web interface by opening the url http://your-external-ip in your browser
  1. Use admin as username and auto-generated password /img/azure/ansible-awx/http-login.png

/img/gcp/ansible-awx/ansible-homepage.png

  • Note: If Ansible AWX Web Interface is not coming then please check the container status by running below command in Terminal.
sudo docker ps -a
  • If the output shows containers in Exited State then please restart the container by running below command and access the Ansible AWX Web Interface after few seconds.
sudo docker start tools_awx_1 tools_postgres_1 tools_redis_1

/img/common/ansible-https-guide/docker-restart.png

  1. You must change the default password for admin user as security measures by going to admin profile page and entering new password
  2. To change the admin password, In left pane click on Users as shown below. /img/gcp/ansible-awx/admin-user.png

/img/gcp/ansible-awx/admin-edit.png

  1. Click on admin user, click on edit and enter the new password and save the changes. /img/gcp/ansible-awx/update-admin-password.png
Go back