Skip to main content

An AWS Provisioning Tool

Project description

AWS Provisioning Tool

This project this target to automate the AWS provisioning process for ec2 and route53

Prerequisites

This code is tested with python 2.7, addtional modules (IPy, prettytable, boto3, paramiko) are required which will be installed automaticlly.

Need to configure following at home directory.

For Linux and Mac.

~/.aws/config
~/.aws/credentials

For Windows.

"%UserProfile%"/.aws/config
"%UserProfile%"/.aws/credentials

config file details

[default]
region=ap-southeast-1
output=json

credentials file details

[account1]
aws_access_key_id=AKIAIOSFODNN7EXAMPLE
aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

[account2]
aws_access_key_id=AKIAIOSFODNN7TEST
aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYTESTKEY

Installing

  • I have tested working on Mac and Linux

  • sudo pip install aws_toolkit==1.0.2

How to use it

from awspackage import aws

myaws = aws.AWS(DOMAIN="abc.com #Hosted at Route53",
        	PEM_LOCATION="/path/to/pem",
                Module_Path="/path/to/ansible/playbook",
                USERNAME="EC2_Username")

myaws.main()

Parameters to take note

  • "Domain" refer to the domain name that registered to the AWS under the same account, eg. cjaiwenwen.com (Put dummy data if you dont have route53 service)
  • "PEM_LOCATION" refer to the local pem key path eg, /Users/cjaiwenwen/Desktop/chenjun.pem
  • "Module_Path" is exact location where the ansible yaml file is located, and the server is under [servers]
  • "USERNAME" is the username to access the remote server

What can the library could achieve

  • Could select the account to provision based on the section by select the account1 and account2
  • Create instance on any region if the VPC has been already created
  • Control the number of the VMs could provisioned
  • Choose the AMI image
  • Choose the subnets
  • Choose the security group
  • Modify the security group rules if need to be
  • Choose the size of the VM
  • Assign CNAME for the provisioned VM
  • Continue ping the provisioned host
  • SSH to the host to confirm accessible (need to add ssh incoming rule)
  • Deploy

Authors

Connect with me on Linkedin

Chen Jun

License

This project is licensed under the MIT License - see the LICENSE.md file for details

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

aws_toolkit-1.0.2.tar.gz (9.7 kB view details)

Uploaded Source

File details

Details for the file aws_toolkit-1.0.2.tar.gz.

File metadata

  • Download URL: aws_toolkit-1.0.2.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/38.5.1 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/2.7.13

File hashes

Hashes for aws_toolkit-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d601795795c5ea978c90e3afac29e8c66bafc2f37a73032d93b00b013066d907
MD5 c894bd47c559261c2ea963b00c098ca1
BLAKE2b-256 80efeede9135b6af596cf9b92287200afbbb3594b606fc60db853d05a13807e4

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