{ "info": { "author": "Valera Maniuk", "author_email": "valeramaniuk@protonmail.com", "bugtrack_url": null, "classifiers": [], "description": "\nCLI tool to provision infrastructure and configure a simple web app in AWS.\n\nThe infrastructure components will be name elb-_project_name_, asg-_project_name_ and so on. The tool will reuse any\npre-existing components based on the name. However, if there are several components with the same name - one will be\n chosen at random\n\n#### Prerequisites\n- AWS Account\n- VPC with at least one public subnet\n- At least 9 available private IP addresses in the subnet (allows for 1 EC2 instance to be provisioned)\n- AWS CLI needs to be configured for a user with necessary IAM permissions (TBD)\n\n#### Limitations \nTo simplify the design all the infrastructure are being created in the single\nsubnet, and this subnet is required to be a **public** one. Because the architecture doesn't include a NAT gateway \nall the provisioned instances **will be assigned a public IP** address, so they can download the necessary packages.\n\nThere is **no input validation**\n\n\n#### Installation\n pip install aws-ec2-provisioner\nor\n\n git clone git@github.com:valeramaniuk/aws-ec2-provisioner.git\n cd aws-ec2-provisioner\n pip install .\n\n#### Usage\n\nrun `aws_ec2_provisioner` with the following options:\n\n --vpc-id \n --subnet-id \n --project-name \n --aws-profile \n --min-asg-size \n --max-asg-size \n --instance-type \n --scaling-target-value \n\nIf you omit any of the options you will be prompted interactively. In this case, the tool will look up the configured\n _aws profiles_, the VPCs available for the chosen profile/region and the subnets available for the chosen VPC. \n\n`aws_ec2_provisioner --help` for all available options\n##### Available instace types:\n 1. t2.micro\n 2. t2.meduim\n\n#### Infrastructure to be created:\n- ELB\n - Listener **80**\n - Instance port **80**\n - Health check **HTTP:80/**\n- Autoscaling group\n - Scales in/out to maintain Average CPU utilization across all instances in the Autoscaling Group.\n - Launch configuration associates public IP by default\n - User data in Launch configuration installs and starts **ngnix**\n- Security Groups\n - ELB security group\n - ingress tcp:80 from anywhere\n - APP security group\n - ingress only from `ELB security group`\n - **no SSH access** because the APP servers are in the public subnet (architecture limitation)\n\n\n![Archirecture](files/architecture.png?raw=true \"Archirecture\")\n\n#### TODO:\n- [x] Load based autoscaling\n- [ ] Additional region\n- [x] Choose aws_profile interactively based on ~/.aws/credentials\n- [x] Choose vpc-id interactively after specifying the aws-profile and region\n- [x] Choose subnet-id interactively after specifying the subnet\n- [ ] Proper logging instead of print statements\n- [ ] Tests\n- [x] Idempotency (with limitations)\n- [ ] Ability to rollback\n- [ ] Move instance user data to separate file, so the `user data` file may be specified at runtime\n- [ ] Add bumpversion \n- [ ] Support for multiple subnets. Private/public\n- [ ] Provision a NAT gateway as necessary\n- [x] Informative UI\n- [ ] Destroy all provisioned infrastructure\n- [ ] Catch all botocore exceptions\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/valeramaniuk/aws-ec2-provisioner", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "aws-ec2-provisioner", "package_url": "https://pypi.org/project/aws-ec2-provisioner/", "platform": "", "project_url": "https://pypi.org/project/aws-ec2-provisioner/", "project_urls": { "Homepage": "https://github.com/valeramaniuk/aws-ec2-provisioner" }, "release_url": "https://pypi.org/project/aws-ec2-provisioner/0.1.1/", "requires_dist": [ "click", "boto3", "pprint" ], "requires_python": "", "summary": "POC boto3 resource provisioner", "version": "0.1.1" }, "last_serial": 4426062, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "7a9dff8690db85681d18363d1bbf414e", "sha256": "6e1bd38bf09dd7817e4b65d7c7fb656ed6dc2abfcb2368c8926e378185fcfcf5" }, "downloads": -1, "filename": "aws_ec2_provisioner-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7a9dff8690db85681d18363d1bbf414e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13037, "upload_time": "2018-10-29T04:13:51", "url": "https://files.pythonhosted.org/packages/18/4a/2e625f529199eb4c8bc54b7a542357418b24b93642bf40425714de92341e/aws_ec2_provisioner-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3e83a265e837c5460df94656a80a4ce9", "sha256": "751dcd1c7bb3a8585b4758310217edb440ca161a8954037f40db0d714fde5fc3" }, "downloads": -1, "filename": "aws_ec2_provisioner-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3e83a265e837c5460df94656a80a4ce9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9961, "upload_time": "2018-10-29T04:13:53", "url": "https://files.pythonhosted.org/packages/81/f3/503b00abb717ea36e506abe9cef200e0962df2e74f890aff17e3bb528965/aws_ec2_provisioner-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7a9dff8690db85681d18363d1bbf414e", "sha256": "6e1bd38bf09dd7817e4b65d7c7fb656ed6dc2abfcb2368c8926e378185fcfcf5" }, "downloads": -1, "filename": "aws_ec2_provisioner-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7a9dff8690db85681d18363d1bbf414e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13037, "upload_time": "2018-10-29T04:13:51", "url": "https://files.pythonhosted.org/packages/18/4a/2e625f529199eb4c8bc54b7a542357418b24b93642bf40425714de92341e/aws_ec2_provisioner-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3e83a265e837c5460df94656a80a4ce9", "sha256": "751dcd1c7bb3a8585b4758310217edb440ca161a8954037f40db0d714fde5fc3" }, "downloads": -1, "filename": "aws_ec2_provisioner-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3e83a265e837c5460df94656a80a4ce9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9961, "upload_time": "2018-10-29T04:13:53", "url": "https://files.pythonhosted.org/packages/81/f3/503b00abb717ea36e506abe9cef200e0962df2e74f890aff17e3bb528965/aws_ec2_provisioner-0.1.1.tar.gz" } ] }