Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Ansible playbook to spawn 2 VMs. The nginx on VM1 should be configured to access the endpoint on VM2 on a specific port.
The script can spawn VMs that are just 2 virtual box instances (preferred) or 2 Amazon AMI instances. Ubuntu 14.04 should be the OS on both VM’s. On VM1, the script should install nginx. On VM2, the script should deploy a web server (Apache / Rails / node.js server) to serve any static content via a REST endpoint. The nginx on VM1 should be configured to access the endpoint on VM2 on a specific port. Only the necessary port on VM2 should be opened and all other ports must be disabled. On accessing the route specified in the nginx config on VM1, nginx process must serve the static content hosted on the endpoint of VM2. The setup and provisioning must be completely automated using Ansible
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×