Deploying a LAMP stack on AWS (part 1): Overview of the Atlas Workflow and Mindset

Atlas is an application delivery platform built on top of HashiCorp’s open source tools Vagrant, Packer, Terraform, and Consul. The goal of Atlas is to enable application development, deployment, and maintenance on any infrastructure provider using one seamless workflow.

Scotch has a ton of awesome getting started with Vagrant articles. If you’re an avid reader, you’re probably even using Scotch Box (a preconfigured Vagrant LAMP stack). In this collection on Getting Started with Atlas, we’ll give you a step-by-step guide on everything you need to know to deploy your development changes to production in a professional and easy-to-use workflow.

This article will only cover a brief introduction to get you started, but we’ll go in depth in the future ones to cover things like setting up Packer to build deployable artifacts and Terraform to create and change server infrastructure.

Overview

Below is the Atlas process for developers and operators. As you can see, the developer workflow does not change – continue to use your existing version control system and CI tools of choice, and just send the application code to Atlas to kick off the build and deploy process.

To setup this developer workflow, operators must write two configurations — a Packer build configuration and a Terraform infrastructure configuration.

atlas-graphic

Tools

atlas

Each step in Atlas is powered by one of HashiCorp’s free and open source tools:

Vagrant

vagrant

Vagrant is a tool for managing development environments that mirror production. Vagrant development environments reduce the friction of developing a project and create greater development/production parity. In the Atlas workflow, Vagrant is used for development environments and for pushing application code to Atlas. If you have an established developer workflow, Atlas also accepts code from popular code repositories (Github, Bitbucket, etc) and continuous integration tools (Travis CI, CircleCI, etc).

Packer

packer

Packer is a tool for creating identical machine images for multiple platforms from a single source configuration. In the Atlas workflow, Packer takes application code and turns it into a deployable artifact (AMI, OpenStack image, VMware image, etc), which is stored in Atlas’s artifact registry.

Terraform

terraform

Terraform is a tool for building, combining, and launching infrastructure. In the Atlas workflow, Terrafom reads from the artifact registry and provisions infrastructure based on those artifacts.

Consul

consul

Consul is a tool for service discovery, service registry, and health checking. In the Atlas workflow, Consul is configured in the Packer build stage and identifies the services contained in each artifact. Since all of this logic is held in the build phase with Packer, when the artifact is deployed with Terraform, it is fully configured with dependencies and service discovery pre-baked. There’s no risk of configuration failure at runtime and a misconfigured node in production. Once the nodes are in production, Consul reports the health and service of each node for simple service discovery and monitoring.

Conclusion

This rest of this tutorial series will walkthrough how to deploy a LAMP stack to AWS using the Atlas workflow. Get your text editor ready and prepare to write Packer build configs and Terraform infrastructure configs!