devnet-1144deploying hybrid cloud applications with hashicorp atlas
TRANSCRIPT
Open Source Foundation
Vagrant
Vagrant is a tool for building and distributing portable development environments.
vagrantup.com
400+ contributors, 9K+ stars, 1.6k+ forks
Packer
Packer is a tool for creating machine images for multiple platforms from a single source configuration.
packer.io
150+ contributors, 4.1K+ stars, 500+ forks
Consul
Consul is a distributed, highly-‐available, and datacenter-‐aware solution for service discovery, configuration, and orchestration.
consul.io
30+ contributors, 3K+ stars, 200+ forks
Terraform
Terraform builds, changes, and composes infrastructure components safely and efficiently.
terraform.io
200+ contributors, 2.5K+ stars, 200+ forks
Serf
Serf is a decentralized solution for cluster membership, failure detection, and orchestration.
serfdom.io
30+ contributors, 2.2k+ stars, 150+ forks
Vault
Vault is a modern tool for managing secrets, certificates, and more in highly distributed environments.
vaultproject.io
50+ contributors, 2.5K+ stars, 100+ forks
VAGRANT
• One command development environments
• Virtual machines or containers
• Any environment: PHP, Ruby, Python, Java, etc.
• Millions of downloads per month
PACKER
• One command to build deployable ar+facts
• Amazon, OpenStack, Docker, VMware, KVM, etc.
• ShiQ burden to learning Packer, rather than learningcomplex plaSorm-‐specific steps
• Can also build Vagrant boxes
CONSUL
• Service discovery, service configura4on, service orchestra4on
• Highly available, distributed
• Mul4-‐datacenter aware
• Discover/configure containers, VMs, physical machines all the same
TERRAFORM
• Launch and combine infrastructure
• Amazon, VMware, Azure, OpenStack, and more
• Single format to do complex infrastructure management
VAULT
• Secret and cer4ficate management
• Built for a modern world: distributed, cloud-‐friendly
• Dynamic secrets
• Audit pending
How Atlas Works: Configure one holisDc view of applicaDon delivery in days, not years, with infrastructure as code.
12
Atlas
ATLAS
• Built on top of our open source
• Adds addi4onal features to each open sourceproject, but running the same binaries
• Combines the projects together to provide unified development to produc+on experience
• Works for all plaSorms supported by open source! (Hybrid cloud friendly)
ATLAS
• Vagrant box discovery, Vagrant collabora4on
• Packer builder, ar4fact storage
• Terraform plan/run, collabora4on
• Consul UI, aler4ng, alert history
Deployable Ar,fact: AMI{ "builders": [{ "type": "amazon-ebs", "access_key": "{{user `aws_access_key`}}", "secret_key": "{{user `aws_secret_key`}}" }], "provisioners": [ { "type": "shell", "inline": [ "sudo apt-get install apache2 -y" ] }], "post-processors": [ { "type": "atlas", "artifact": “mitchellh/cisco-live", "artifact_type": "aws.ami", }] }
BUILD WITH PACKER
$ packer push -name=“mitchellh/cisco-live” template.json Push successful to ‘mitchellh/cisco-live’
Deploy with Terraformprovider "aws" { access_key = "${var.aws_access_key}" secret_key = "${var.aws_secret_key}" region = "us-east-1" }
// Packer-built AMI resource "atlas_artifact" "web" { name = “mitchellh/cisco-live" type = "aws.ami" }
resource "aws_instance" "web" { instance_type = "t1.micro" ami = "${atlas_artifact.web.metadata_full.region-us-east-1}" security_groups = ["${aws_security_group.allow_all.name}"]
# This will create 2 instances count = 2 }
DEPLOY WITH TERRAFORM
$ terraform push -name=‘mitchellh/cisco-live' Push successful to ‘mitchellh/cisco-live’
SUCCESS!
• Automa4c image builds, inventory, history
• Automa4c infrastructure change, history
• Approval for infrastructure change
• ACLs across all of it
• Support for all cloud providers the open source supports
NEXT STEPS…
• GitHub integra4on
• Consul integra4on for monitoring, service discovery
• Using Packer/Terraform with a different cloud service