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. Git and GitHub vs File Archival
  4. Git Commands and Statuses
  5. Git Commit, Tag, Push
  6. Git Utilities
  7. Data Security GitHub
  8. GitHub API
  9. TFS vs. GitHub

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

  14. Digital Ocean
  15. Cloud regions
  16. AWS Virtual Private Cloud

  17. Azure Cloud Onramp
  18. Azure Cloud
  19. Azure Cloud Powershell

  20. Powershell Ecosystem
  21. Powershell on MacOS
  22. Powershell Desired System Configuration

  23. Jenkins Server Setup
  24. Jenkins Plug-ins
  25. Jenkins Freestyle jobs
  26. Jenkins2 Pipeline jobs using Groovy code in Jenkinsfile

  27. Dockerize apps
  28. Docker Setup
  29. Docker Build

  30. Maven on MacOSX

  31. Ansible

  32. MySQL Setup

  33. SonarQube static code scan

  34. API Management Microsoft
  35. API Management Amazon

  36. Scenarios for load