Skip to content

Development Environment Setup

sjmiller609 edited this page Aug 27, 2018 · 14 revisions

Note: Once you have an environment with the AWS CLI installed, supply the tool with your AWS credentials and preferences with the following command:

aws configure

Option 1: Create an EC2 instance.

This creates a development environment on AWS EC2 that runs Ruby, Git among other necessary resources.

  1. Login to AWS Console.
  2. Create a EC2 Key Pair, if you do not have one.
  3. Go to CloudFormation and create a new stack with the create_dev_env.json file. (See create_dev_env.json ), providing the KeyPair name from step 2. NOTE: You can find this file in your local git clone of the repository - in the root directory.
  4. Once complete, check the Outputs tab for the URL value. It will be the public IP address of your new instance.
  5. Log in to your new instance with the following command:
ssh -i /path/to/keyname.pem ubuntu@<public-ip>

Alternatively, if you have AWS CLI installed locally, you can launch the stack with the following command:

aws cloudformation create-stack --stack-name <name_your_stack> --template-body "`curl https://raw.githubusercontent.com/stelligent/stelligent_commons/master/create_dev_env.json`" --region <region_with_your_key> --parameters ParameterKey=KeyName,ParameterValue=<your_key_name>

You can get the URL output once it is complete with the following command:

aws cloudformation describe-stacks --stack-name <name_of_your_stack>

Option 2: Create a local vagrant box.

Follow the steps provided here.

Once you are logged into your vagrant box, you can install the AWS CLI with:

sudo apt-get install awscli

Option 3: Use a pre-built Docker image

  • Install Docker on host machine
  • Configure git on host machine
  • Set up ssh keys for git authentication in ~/.ssh/
  • Run this script

Option 4: Install AWS CLI and Ruby locally.

This option is not recommended.

However, if you only need the AWS CLI: Follow these instructions.

If you need Ruby: Follow these instructions.