Wilson Mar bio photo

Wilson Mar

Hello. Hire me!

Email me Calendar Skype call 310 320-7878

LinkedIn Twitter Gitter Google+ Instagram Youtube

Github Stackoverflow Pinterest

https://wilsonmar.github.io/aws-server-deploy-options

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.

The options:


Manually configure component services

Each environment within AWS for enterprise use requires several services. Here is the sequence of dependencies:

  1. VPN
  2. VPC
  3. NAT

  4. DNS
  5. ELB

  6. AMI by Region, with Auto-scale

Elastic Beanstalk

AWS Simple Icons Compute AWSElasticBeanstalk

Before doing this, setup default VPC, subnets, and Security Groups.

  1. Services > Compute > Beanstalk

    NOTE: You can’t SSH into individual servers.

  2. 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.

  3. Select a Platform.

  4. 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.

  5. 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.

  6. Click Modify in the Notifications section and input your email address.

  7. Switch temporarily to your email to confirm the subscription.

  8. Since this is a tutorial, select the Low cost single instance.

  9. 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.

  1. Services > Management Tools > Opsworks

  2. 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:

More on DevOps

This is one of a series on DevOps:

  1. DevOps_2.0
  2. ci-cd (Continuous Integration and Continuous Delivery)
  3. User Stories for DevOps

  4. Git and GitHub vs File Archival
  5. Git Commands and Statuses
  6. Git Commit, Tag, Push
  7. Git Utilities
  8. Data Security GitHub
  9. GitHub API
  10. TFS vs. GitHub

  11. Choices for DevOps Technologies
  12. Java DevOps Workflow
  13. AWS DevOps (CodeCommit, CodePipeline, CodeDeploy)
  14. AWS server deployment options

  15. Cloud regions
  16. AWS Virtual Private Cloud
  17. Azure Cloud Onramp
  18. Azure Cloud
  19. Azure Cloud Powershell
  20. Bash Windows using Microsoft’s WSL (Windows Subystem for Linux)

  21. Digital Ocean
  22. Cloud Foundry

  23. Packer automation to build Vagrant images
  24. Terraform multi-cloud provisioning automation

  25. Powershell Ecosystem
  26. Powershell on MacOS
  27. Powershell Desired System Configuration

  28. Jenkins Server Setup
  29. Jenkins Plug-ins
  30. Jenkins Freestyle jobs
  31. Jenkins2 Pipeline jobs using Groovy code in Jenkinsfile

  32. Dockerize apps
  33. Docker Setup
  34. Docker Build

  35. Maven on MacOSX

  36. Ansible

  37. MySQL Setup

  38. SonarQube static code scan

  39. API Management Microsoft
  40. API Management Amazon

  41. Scenarios for load