Exercises
In this chapter, we covered the fundamentals of Ansible and ways to use it with Docker and Kubernetes. As exercises, try the following tasks:
- Create the server infrastructure and use Ansible to manage it:
- Connect a physical machine or run a VirtualBox machine to emulate the remote server.
- Configure SSH access to the remote machine (SSH keys).
- Install Python on the remote machine.
- Create an Ansible inventory with the remote machine.
- Run the Ansible ad hoc command (with the
ping
module) to check that the infrastructure is configured correctly.
- Create a Python-based
hello world
web service and deploy it in a remote machine using Ansible playbook:- The service can look exactly the same as we described in the exercises for the chapter.
- Create a playbook that deploys the service into the remote machine.
- Run the
ansible-playbook
command and check whether the service was deployed.
- Provision a GCP virtual machine instance using Terraform:
- Create...