Step III: Create a Hosting Environment
In the final step, you will design and create a hosting environment for your service using either Vagrant or Terraform.
This environment should run at least two instances of your service container behind a load balancer and provide a single, public endpoint to access your service.
Using Vagrant
If you are using Vagrant, your Vagrant file should produce at least three distinct VMs:
- Two for the two service instances
- One hosting the load balancer, providing public access to the service boxes
Using Terraform
You may use any cloud provider supported by Terraform to design the environment. You may use any of the cloud provider's services as you see fit. If you do not have access to a cloud provider and would still like to use this approach, please see the FAQs
Requirements
The Terraform or Vagrant code you provide alone should be enough to re-create your environment using one of our own accounts
with the chosen provider.
That means after terraform apply, your service endpoint should become available without any further manual steps.
A naked IP address for the public endpoint is acceptable.
Your service should be available via HTTP (and/or HTTPS for extra credit) under /api.