Skip to content

6._Getting_Started_ _Planning

Ahmad Abdo edited this page Jun 26, 2017 · 2 revisions

Getting Started - Planning

Now that awsm is installed and configured on our machine, it's time to build some infrastructure. This Getting Started guide will walk through launching an EC2 instance that serves a basic hello_world website.

Before launching a new EC2 Instance, we'll need to create some supporting infrastructure, including creating:

  • A new KeyPair named awsm
  • A new VPC named awsm-vpc
  • A new public Subnet in the awsm-vpc VPC named awsm-public with an Internet Gateway
  • A new private Subnet in the awsm-vpc VPC named awsm-private with a NAT Gateway
  • A new Security Group in the awsm-vpc VPC named dev

First, we'll outline what commands we're going to run to build our infrastructure. In the next part of this guide, we'll actually run the commands.


Classes & Commands

awsm comes pre-loaded with starter classes, which we'll be using in this guide. You can view or edit these classes yourself in the awsmDashboard. Below, we'll briefly outline the classes and commands that we are going to be utilizing.


createKeyPair

The awsm KeyPair class is created during the initial setup, and a new key is actually generated at the same time. When you create new KeyPair classes in awsm, you can either upload your own public key (keeping your private key completely secure), or let awsm generate a new 4096 bit RSA keypair (locally) and store both in SimpleDB.

awsm KeyPair Class - Screenshot

$ awsm createKeyPair --help

NAME:
   awsm createKeyPair - Create a Key Pair in the specified region

USAGE:
   awsm createKeyPair [arguments...]

ARGUMENTS:
   class - The class of the key pair
   region - The region to create the keypair in

createVpc

The awsm VPC class only specifies the CIDR and the Instance tenancy. The name, IP, and region are provided during the command execution.

awsm VPC Class - Screenshot

$ awsm createVpc --help

NAME:
   awsm createVpc - Create a VPC

USAGE:
   awsm createVpc [arguments...]

ARGUMENTS:
   class - The class of VPC to create
   name - The name of the VPC
   ip - The IP address of this VPC (not including CIDR)
   region - The region to create the VPC in


createSubnet

The public and private Subnet class specifies the CIDR and options to create both an Internet Gateway and NAT Gateway. The name, VPC, IP, and AZ (optional) are provided during the command execution.

awsm Public Subnet Class - Screenshot

awsm Private Subnet Class - Screenshot

$ awsm createSubnet --help

NAME:
   awsm createSubnet - Create a VPC Subnet

USAGE:
   awsm createSubnet [arguments...]

ARGUMENTS:
   class - The class of Subnet to create
   name - The name of the Subnet
   vpc - The VPC to create the Subnet in
   ip - The IP address of this Subnet (not including CIDR)
   [az] - The Availability Zone to create the Subnet in

createSecurityGroup

The dev Security Group class specifies the Description and the Grants. The region and VPC (optional) are provided during the command execution.

awsm Dev Security Group Class - Screenshot

$ awsm createSecurityGroup --help

NAME:
   awsm createSecurityGroup - Create a Security Groups

USAGE:
   awsm createSecurityGroup [arguments...]

ARGUMENTS:
   class - The class of security group to create
   region - The region to create the security group in
   [vpc] - The vpc to create the security group in (optional)

launchInstance

The hello-world Instance class specifies almost all of the configuration settings required to launch an EC2 instance or create a launch configuration. The region and VPC (optional) are provided during the command execution.

awsm Dev Security Group Class - Screenshot

$ awsm launchInstance --help

NAME:
   awsm launchInstance - Launch an EC2 instance

USAGE:
   awsm launchInstance [arguments...]

ARGUMENTS:
   class - The class of the instance (dev, stage, etc)
   sequence - The sequence of the instance (1...100)
   az - The availability zone to launch the instance in (us-west-2a, us-east-1a, etc)


Next

Now that we have a plan and a brief outline of the commands we'll be running, lets run them!