Pick which crew of robots to build your servers
Overview
This tutorial describes the options AWS provides to automate setup of multi-stage (dev+QA+prod) enterprise environments within EC2.
NOTE: Content here are my personal opinions, and not intended to represent any employer (past or present). “PROTIP:” here highlight information I haven’t seen elsewhere on the internet because it is hard-won, little-know but significant facts based on my personal research and experience.
The options:
-
Manually configure the various components using the AWS Management Console at http://aws.amazon.com/ on internet browsers. See my AWS On-boarding for a tutorial on the AWS Management Console and Consoles on mobile devices.
-
Elastic Beanstalk for developers to quickly bring up standard server configurations with no SSH capability.
-
Opsworks “configuration as code service” which sets up servers by running Chef recipies obtained from a Chef Cookbook repository.
-
CloudFormation for sysadmins to create JSON template files which configure ALL AWS services.
-
Value-added services outside Amazon, such as Terraform (and licensed Atlas) from HashiCorp.
Manually configure component services
Each environment within AWS for enterprise use requires several services. Here is the sequence of dependencies:
Elastic Beanstalk
Before doing this, setup default VPC, subnets, and Security Groups.
-
Services > Compute > Beanstalk
NOTE: You can’t SSH into individual servers.
-
Specify an Application Name.
PROTIP: Define a convention that applies to apps, such as a project, feature, and version number, such as PS1-bean2-node-v01.
PROTIP: Include in the name a code for the platform being used.
-
Select a Platform.
-
Click Configure more options.
Beanstalk is considered a “Platform-as-a-Service” (PaaS), that does the “heavy lifting” to get infrastructure online, with load balancing, autoscaling, and health monitoring.
The Virtual Machine is for the Platform chosen in the previous step.
The Low cost configuration preset is the default.
In the Scaling section, the Environment type is single instance.
-
Click the Highly available configuration preset.
Notice the Environment type changed to “loadbalancing, autoscaling” with Scale instance: 1-4.
Beanstalk is free to use. You only pay for servers deployed by it.
-
Click Modify in the Notifications section and input your email address.
-
Switch temporarily to your email to confirm the subscription.
-
Since this is a tutorial, select the Low cost single instance.
-
Scroll down to click Create app.
Beanstalk Settings
Configuration information stored in the .ebextensions folder containing:
-
a dynamodb.config
The file contains functions definitions such as
Fn::GetOptionSetting:
with parameters. -
a options.config files.
-
The .elasticbeanstalk folder ???
Opsworks Chef
Opsworks is a higher level tool than CloudFormation, offering more customization than Elastic Beanstalk.
-
Click Add your first stack.
NOTE: You cannot mix and match Windows with Linux servers.
Opsworks is called a “configuration as code service” because it sets up servers by running Chef recipies obtained from a Cookbook repository.
NOTE: There is no equivalent for Puppet.
Each “layer” is a blueprint and container for instances. (JSON) defining stacks:
- OpsWorks
- ECS
-
RDS
A different Chef recipie for each event within the lifecycle :
- Setup
- Configure
- Deploy
- Undeploy
- Shutdown
Opsworks Cookbooks from @Danilop.
NOTE: Each server has a Chef agent installed.
The lack of agents is why Ansible is becoming more popular.
Ansible using CloudFormation
My tutorial on AWS High-Availability using CloudFormation, which is the current rage (June 2016).
More on Amazon
This is one of a series on Amazon:
- AWS Cloud Services Comparisons
- AWS Well-Architected Cloud
- AWS Cloud Services
- AWS CLI
- AWS On-boarding (GUI, CLI, API)
- AWS IAM
- AWS DevOps (CodeCommit, CodePipeline, CodeDeploy)
- AWS server deployment options
- AWS Cloud Formation IaS
- AWS Cognito
- AWS Security
- Build load-balanced servers in AWS EC2
- AWS Networking
- AWS Xray
- IoT on AWS
- AWS Lambda
- AWS Lambda
More on DevOps
This is one of a series on DevOps:
- DevOps_2.0
- ci-cd (Continuous Integration and Continuous Delivery)
- User Stories for DevOps
- Git and GitHub vs File Archival
- Git Commands and Statuses
- Git Commit, Tag, Push
- Git Utilities
- Data Security GitHub
- GitHub API
- Choices for DevOps Technologies
- Pulumi Infrastructure as Code (IaC)
- Java DevOps Workflow
- AWS DevOps (CodeCommit, CodePipeline, CodeDeploy)
- AWS server deployment options
- Cloud services comparisons (across vendors)
- Cloud regions (across vendors)
- Azure Cloud Onramp (Subscriptions, Portal GUI, CLI)
- Azure Certifications
- Azure Cloud Powershell
- Bash Windows using Microsoft’s WSL (Windows Subsystem for Linux)
- Azure Networking
- Azure Storage
- Azure Compute
- Digital Ocean
- Packer automation to build Vagrant images
- Terraform multi-cloud provisioning automation
-
Hashicorp Vault and Consul to generate and hold secrets
- Powershell Ecosystem
- Powershell on MacOS
- Jenkins Server Setup
- Jenkins Plug-ins
- Jenkins Freestyle jobs
- Docker (Glossary, Ecosystem, Certification)
- Make Makefile for Docker
- Docker Setup and run Bash shell script
- Bash coding
- Docker Setup
- Dockerize apps
- Ansible
- Kubernetes Operators
- Threat Modeling
- API Management Microsoft
- Scenarios for load
- Chaos Engineering