Wilson Mar bio photo

Wilson Mar

Hello. Hire me!

Email me Calendar Skype call 310 320-7878

LinkedIn Twitter Gitter Google+ 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. User Stories for DevOps

  3. Choices for DevOps Technologies
  4. Java DevOps Workflow
  5. AWS DevOps (CodeCommit, CodePipeline, CodeDeploy)
  6. AWS server deployment options

  7. Digital Ocean
  8. Cloud regions
  9. AWS Virtual Private Cloud
  10. Azure Cloud Powershell

  11. Git and GitHub vs File Archival
  12. Git Commands and Statuses
  13. Data Security GitHub
  14. Git Commit, Tag, Push
  15. Git Utilities
  16. GitHub API

  17. TFS vs. GitHub

  18. Jenkins Server Setup
  19. Jenkins Plug-ins
  20. Jenkins Freestyle jobs
  21. Jenkins2 Pipeline jobs using Groovy code in Jenkinsfile

  22. Dockerize apps
  23. Docker Setup
  24. Docker Build

  25. Maven on MacOSX

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

  29. Ansible

  30. MySQL Setup

  31. SonarQube static code scan

  32. API Management Microsoft
  33. API Management Amazon

  34. Scenarios for load