Summary
A summary of the content covered in this chapter.
We'll cover the following
In this chapter, you set up your development environment and got it ready to build upon. For AWS, you deployed the following infrastructure:
- A Virtual Private Cloud(VPC)
- A subnet
- An internet gateway
- A route for public traffic into the VPC
- Windows EC2 instance with
Windows Server 2019Amazon Machine Image(AMI) - Linux EC2 instance with
Red Hat Enterprise Linux 8Amazon Machine Image(AMI)
Similarly, for Azure, you deployed:
- Virtual network
- Subnet
- Public IP address
- Network Security Group
- Network interface
Windows Server 2019virtual machineLinuxvirtual machine runningCentOS
To deploy these resources using Ansible, we introduced different Ansible Modules for both AWS and Azure.
Once deployed, we explored the connection options to content with the infrastructure using Ansible again. Ansible uses the following tools to connect to the virtual machines:
WinRMto connect to Windows hosts.SSHto connect to Linux hosts.
You installed the missing tools in our environment to connect to the deployed instances:
sshpasswinrm
Delete the environments#
In case you are going to visit the rest of the course later, you can delete the infrastructure to avoid any unexpected bills.
Disclaimer: Run the playbook at your own risk!
It is highly recommended you use a development AWS account and Azure subscription before executing these playbooks.
You can review the playbooks in the sections for Deploy to Azure and Deploy to AWS to delete the infrastructure.
Dockerfile#
To connect to the infrastructure deployed to both AWS and Azure, you installed the following packages:
sshpassfor connecting to Linux Hosts.winrmfor connecting to Linux Hosts.
AWS#
Review the updated Dockerfiles for AWS below:
Azure#
Review the updated Dockerfiles and Azure below:
Download the Source Code
You can download the playbooks and Dockerfile for the respective environments for this chapter from the Github repository, become Ansible.
