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.
- Install Python 2.7
- Install virtualenv:
$ [sudo] pip install virtualenv
- 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
- Browse to project folder
cd deploy_utils
- Activate the virtualenv:
- Windows:
.\Scripts\activate
- Linux:
source bin/activate
- (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
- 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
Release history Release notifications | RSS feed
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.0.tar.gz
(14.1 kB
view details)
Built Distribution
File details
Details for the file deploy_utils-1.0.0.tar.gz
.
File metadata
- Download URL: deploy_utils-1.0.0.tar.gz
- Upload date:
- Size: 14.1 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3b3e4b36cb9a9c264ba0acc9d93e90923c5c80c90391bbde0ab243ccd07a996 |
|
MD5 | 1c3757ff10dbd10363c538a8afdd192a |
|
BLAKE2b-256 | 1eb156ddca655fddedce978dc4cb0ac2bb852e9f8f1c9ba2c8482f3b4f915714 |
File details
Details for the file deploy_utils-1.0.0-py2-none-any.whl
.
File metadata
- Download URL: deploy_utils-1.0.0-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 672577fed83622fbf280767e9de53e19cb9afca09b7f77f374f9144fb5fa9b23 |
|
MD5 | b8ca670801ef4a5e7d67c793f4367dcf |
|
BLAKE2b-256 | 608ff856bda82c3ee94b304736f1b85bd4b250845be62c3bb37ceddfb8063fcf |