Skip to main content

Utilities for deploying projects to EC2

Project description

deploy_utils

Utilities for deploying projects to EC2

Table of Contents

Documentation

For now, just look at the test code.

Installation

In Another Project

Install with pip: pip install deploy_utils or put it in your setup.py in install_requires: deploy_utils.

As Standalone

The project is based of off python 2.7, but is best used with the virtualenv development scheme.

  1. Install Python 2.7
  2. Install virtualenv: $ [sudo] pip install virtualenv
  3. Instantiate the virtual python environment for the project using python 2.7:
  • Windows: virtualenv --python=C:\Python27\python.exe deploy_utils
  • Linux: virtualenv -p /path/to/python27 deploy_utils
  1. Browse to project folder cd deploy_utils
  2. Activate the virtualenv:
  • Windows: .\Scripts\activate
  • Linux: source bin/activate
  1. (Windows only) Manually install the pycrypto library. The followin command assumes you have 32 bit python 2.7 installed: pip install http://www.voidspace.org.uk/python/pycrypto-2.6.1/pycrypto-2.6.1-cp27-none-win32.whl If 64 bit python 2.7 is installed, run the following command instaed: pip install http://www.voidspace.org.uk/python/pycrypto-2.6.1/pycrypto-2.6.1-cp27-none-win_amd64.whl
  2. Install the python project using develop mode: python setup.py develop

EC2 Notes

You will need to do the following for automatically launching Amazon EC2 instances using the scripts:

  • Create AWS account
  • Get the access key
  • Get the secret access key
  • Create a profile in ~/.aws/credentials with the above keys
  • Create security group
  • Add your IP to list of allowed inbound traffic (see aws docs).
  • Create key pair (see aws docs).
  • Download .pem file to computer
  • (Windows only) instally PuTTY and PuTTYgen
  • Download from here.
  • Create .ppk file (see aws docs).
  • AMI ids
  • You need to use the appropriate one for your region
  • Do this by going to the marketplace and selecting the type to use and then find the AMI id by saying you'll manually launch it.
  • Use of CentOS
  • Requires that you agree to some TOS, I did this by launching an instance
  • This library targets CentOS 6 HVM with Updates
  • Pre 2015 instance setup machine with only root user
  • Post 2014 uses centos user
  • Includes script to automatically install PostGIS. :)

Config File Data

Setting Name Description
ami_id The base ami to start from. See notes about finding AMI ids above.
aws_access_key_id Access key for account.
aws_profile_name The profile name where you put the keys
aws_secret_access_key Secret access key for account.
block_device_map Where to attach storage. Amazon Linux: /dev/xvda CentOS 6: /dev/sda1
cron_email Who to email in cron jobs.
key_filename The filename of your .pem file.
key_pair_name The key pair name for the EC2 instance to use.
instance_name The name to tag the instance with.
instance_type The EC2 instance type. (See instance types).
non_root_user The non-root user ot use when fabbing on the machine. Amazon Linux: ec2-user CentOS 6: centos
region The AWS region to connect to.
security_groups Security groups to grant to the instance. If more than one, seperate with commas.
volume_size Size of the AWS Volume for the new instance in GB.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deploy_utils-1.0.1.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

deploy_utils-1.0.1-py2-none-any.whl (18.3 kB view details)

Uploaded Python 2

File details

Details for the file deploy_utils-1.0.1.tar.gz.

File metadata

  • Download URL: deploy_utils-1.0.1.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15

File hashes

Hashes for deploy_utils-1.0.1.tar.gz
Algorithm Hash digest
SHA256 067fcfb33e619c83b2f0cd0ff454914c7c450c74bc59b527867f720f0b9b26a3
MD5 ae794082055537c0e44e981f2ea96aef
BLAKE2b-256 e380b446701c00d520f94385ca2d3b322ed8b118615657305a836e6dc2010062

See more details on using hashes here.

File details

Details for the file deploy_utils-1.0.1-py2-none-any.whl.

File metadata

  • Download URL: deploy_utils-1.0.1-py2-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15

File hashes

Hashes for deploy_utils-1.0.1-py2-none-any.whl
Algorithm Hash digest
SHA256 06e7e5a66a3c008afa9e37424582eb4207dcae5a80bcf712424a36db49b80148
MD5 4e79b4592afdc3b634c15ab4dd88a792
BLAKE2b-256 a75262331ed37e0319efddbcbbd6aa9124db11534ee2a9103ff0636bfd28e681

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page