Deploying the sample application
In this section, we will be deploying a sample phonebook application using AWS Cloud resources, such as RDS for the database instance and EC2 as our compute server where our code will be deployed.
How to do it...
This sample application will be deployed using a playbook, as follows:
--- - hosts: localhost roles: - phonebook
How it works...
This application will use the same password that we used while creating a DB instance for creating a database and the user for our application. This sample application playbook will create and provision an AWS EC2 instance and will deploy the application on it. Along with this, it will create an RDS instance with the master password defined in our secrets protected by Ansible Vault. After creating an RDS instance, it will create a database with a user for the application.
Once our application is deplowe will be able to accessyed, the phonebook application on port8080of our AWS instance.