Coder Social home page Coder Social logo

aws-gen's Introduction

aws-gen

Intro

Generalised Docker container for AWS & other tasks. Has support for the following:

  • vi - because you'll need vi at some point.
  • AWS CLI - Command line interface for using Amazon Web Services.
  • ipython - nice interactive Python shell.
  • boto3 - Python library for using AWS.
  • pika - Python library for RabbitMQ.
  • requests - HTTP request handling library.
  • python-consul - Python library for Consul.
  • Fabric - Python library for scipting general remote server tasks.
  • pycrypto - Crypt support library for Python.
  • pylint - Keep your Python code up to scratch.
  • redis - Redis support for Python.

General Use

Copy the run.sh.tpl file to something else, say, run.sh and add in your AWS details:

#!/bin/bash

docker rm -f aws-gen
docker run \
--name aws-gen \
-v ~/myproject:/project \
-e CONSUL_KEY= \
-e AWS_ACCESS_KEY_ID= \
-e AWS_SECRET_ACCESS_KEY= \
-e AWS_DEFAULT_REGION=eu-west-1 \
-e EC2_URL=https://ec2.eu-west-1.amazonaws.com \
-ti \
chrisramsay/aws-gen \
/bin/bash

To run the container:

$ ./run.sh

Edit the run.sh file to add as many extra mount commands as you need, as well as adding any credentials you might want to access AWS and Consul.

Extras

The Dockerfile ADDs a bashrc file to give an extra few niceties on the command line:

  • Coloured command line prompt with machine name
  • A handful of shell aliases
  • AWS command line tab completion (see below)

AWS CLI comes with command completion set up so that you can tab away all those spare keyboard strokes:

aws-gen:/srv$ aws s<TAB>
s3               sdb              ses              snowball         sqs              storagegateway   support
s3api            servicecatalog   sms              sns              ssm              sts              swf

Build Script

There is a build.sh file packaged here. This is to help with further development of the container. One of a number of possible options must be passed at run time.

build

Runs the standard docker build command with a few build arguments; tags as both verson and latest picking up build version from the VERSION file.

release

Does not execute docker build. Instead modifies the Dockerfile replacing in-place values from the Dockerfile.tmpl with label values. This should be done prior to a tagged release.

restore

Used in order to reinstate the normal Dockerfile for continuing development. Utility function only.

Development Process

  • Create a new release branch
  • Change directory to the build directory
  • Bump the version number in build/VERSION
  • Run $ ./build.sh restore to set up a clean Dockerfile
  • Make any required changes to build/Dockerfile.tmpl
  • Run $ ./build.sh build to build current tag and latest
  • Once all the work is complete, run $ ./build.sh release
  • Merge and tag the release

aws-gen's People

Contributors

chrisramsay avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.