{ "info": { "author": "Ross Crawford-d'Heureuse", "author_email": "sendrossemail@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Programming Language :: Python :: 3" ], "description": "Terrastorm\n----------\n\nA simple cli to help you work with using terraservice layouts for terraform\n\nTerraservice?\n\n* https://www.youtube.com/watch?v=wgzgVm7Sqlk\n* https://www.slideshare.net/opencredo/hashidays-london-2017-evolving-your-infrastructure-with-terraform-by-nicki-watt\n* https://www.hibri.net/2017/11/13/terraform-for-grownups/\n\n*NB* Whats important to note is that we have added a `layers` abstraction. This abstraction allows you to compose infra objects that can then be used by your environments, instead of referencing modules directly.\n\n**Example layout**\n\n1. *modules* are standard terraform modules\n2. *layers* implement *modules* - they dont store secrets, just compose object representations that can be used by the environments\n3. *environments* implement any number of *layers* - here you configure secrets and variables for the individual environments\n\n\n### Environment - Services\n\n`Environments` allow us to implement `services` which are `instances` of `layers` with `environment specific configuration`\n\n* can take secrets\n* compose layers\n* maintain the remote encrypted s3 state\n\n### Layers\n\n`Layers` allow us to combine a number of `modules` \n\n* no secrets\n* compose modules\n\n### Modules\n\n`Modules` act as normal terraform modules and provide access to the standard concept.\n\n* stnadrad terraform modules\n\n\n*But now you have to go to the `production` environment and run `terraform plan` and `terraform apply` for each of your `services` this gets repetative*\n\n``` bash\n\u251c\u2500\u2500 environments\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 dev\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 iam\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 README.md\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 main.tf\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 secrets.auto.tfvars\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 terraform.tfvars\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 network\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 README.md\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 main.tf\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 secrets.auto.tfvars\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 terraform.tfvars\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 prod\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 iam\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 README.md\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 main.tf\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 secrets.auto.tfvars\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 terraform.tfvars\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 network\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 README.md\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 main.tf\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 secrets.auto.tfvars\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 terraform.tfvars\n\u251c\u2500\u2500 layers\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 iam\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 README.md\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 main.tf\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 outputs.tf\n\u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 variables.tf\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 network\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 README.md\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 main.tf\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 outputs.tf\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 variables.tf\n\u2514\u2500\u2500 modules\n \u251c\u2500\u2500 subnets\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 README.md\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 main.tf\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 outputs.tf\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 variables.tf\n \u2514\u2500\u2500 vpc\n \u251c\u2500\u2500 README.md\n \u251c\u2500\u2500 main.tf\n \u251c\u2500\u2500 outputs.tf\n \u2514\u2500\u2500 variables.tf\n```\n\n## Usage\n\nModify the makefile so your aws and ti-landscape are mounted to the right places\n\n```sh\n1. make shell\n2. `terrastorm run nonprod init` <-- will init on all the services in nonprod\n```\n\n### Story 1 - Setup a new Project\n\nAs an infra-op\nI need to create a new project based on the terraservices pattern\nSo that I can inject **sparkles** into the lives of our clients\n\n`terrastorm setup /path/to/project`\n\n* will create a new project based on the template defined in the `.terrastorm.yaml` templates.project=https://github.com/williamtsoi1/terraservices-example.git\n\n\n### Story 2 - See my settings\n\nAs an infra-op\nI want to see my current config settings\nSo that I can check all is well\n\n`terrastorm show_config`\n\n* will output the current config settings loaded from `~/.terrastorm.yaml` and the default `.terrastorm.yaml`\n\n\n### Story 3 - Create a new Terraform Module\n\nAs an infra-op\nI need to create a new segment of infrastructure\nSo that I can inject **sparkles** into the lives of our clients\n\n`terrastorm create module :new_module_name`\n\n* will create a new \"module\" with the appropriate `:name.tf`, `input.tf`, `output.tf` files\n\n\n### Story 4 - Create a new Layer\n\nAs an infra-op\nI need to create a new `layer` of infrastructure\nSo that I can compose an infrastructure represenation for use in my environments.\n\n`terrastorm create layer :new_module_name`\n\n* will create a new \"module\" with the appropriate `:name.tf`, `input.tf`, `output.tf` files\n\n\n### Story 5 - Create a new Environment\n\nAs an infra-op\nI need to create a new environment, optionally excluding or including certain modules\nSo that I can inject goodness into the lives of our clients\n\n`terrastorm create environment :new_environment_name`\n\n* will create a new environment\n\n\n### Story 6 - Add a new service to an Environment\n\nAs an infra-op\nI need to be able to add a module interface to an environment\nSo that I can **make magic happe**\n\n`terrastorm add service :environment :new_service_name`\n\n* will create a new service instance in the environment specified\n\n\n### Story 7 - Run a terraform command in an environment service\n\nAs an infra-op\nI need to run terraform commands on the appropriate environment\nSo that I can **make magic happe**\n\n`terrastorm run :environment :cmd :service_name|all`\n\n* environment - staging|production|...\n* cmd - fmt|init|plan|apply\n* service None|all|:name_of_your_service\n\n\n### Story 8 - Exec and shell command in an environment\n\nAs an infra-op\nI need to run shell commands in the appropriate environment\nSo that I can **make magic happe**\n\n`terrastorm cmd :environment ':cmd'`\n\n* environment - staging|production|...\n* cmd - `ls -alh`|`tree . -L 3`\n* service None|all|:name_of_your_service\ncmd dev 'ls -alh'\n\n## Development\n\n``` bash\ndocker build -t terrastorm:latest .\ndocker run -it --rm \\\n -v $PWD:/src \\\n -v /Users/ross/p/ross.crawford/ti-landscape:/terraform \\\n terrastorm:latest sh\n\ndocker run -it --rm \\\n -v $PWD:/src \\\n terrastorm:latest sh\n```\n\n## Using\n\n``` bash\ndocker run -it --rm \\\n -v $PWD:/src \\\n -v /path/to/project:/terraform \\\n rosscdh/terrastorm:latest sh\n\n>> terrastorm setup /terraform\n>> ls /tearraform\n```\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "terrastorm", "package_url": "https://pypi.org/project/terrastorm/", "platform": "", "project_url": "https://pypi.org/project/terrastorm/", "project_urls": null, "release_url": "https://pypi.org/project/terrastorm/0.0.4/", "requires_dist": [ "click", "python-terraform", "ruamel.yaml", "pyhcl", "cookiecutter", "Jinja2", "pebble" ], "requires_python": "", "summary": "Use Terrastorm on Terraservices layout for terraform", "version": "0.0.4" }, "last_serial": 4891528, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "3ebc8d57b2068b1a6c6b4589ea1320c2", "sha256": "62f98486fbc254fb3387a52c91f97dd87abc6bb001b0e6c7f3f68f9277fbb0c7" }, "downloads": -1, "filename": "terrastorm-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "3ebc8d57b2068b1a6c6b4589ea1320c2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7338, "upload_time": "2019-03-02T15:25:15", "url": "https://files.pythonhosted.org/packages/f5/00/8e968e9968782401a05165824a11f216e0ca6da4e4c99771443dec60a49c/terrastorm-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "36df6ace12f571bfdbbbf1623b1697a6", "sha256": "f7eb8573e339aa5b35426112e3c4ad6dd56fa13f81cd66ca086dc97597120299" }, "downloads": -1, "filename": "terrastorm-0.0.2.tar.gz", "has_sig": false, "md5_digest": "36df6ace12f571bfdbbbf1623b1697a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7627, "upload_time": "2019-03-02T15:25:17", "url": "https://files.pythonhosted.org/packages/72/c8/3b3450468dc22421448b71f791f4d07956ab322dd247901ed683c6f29727/terrastorm-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "b3f7d47d5032f78de0d5522782dfaf32", "sha256": "facb1a6e85aaf4e403e9bdf517f1e6680050908076e82e72400c100a087c6593" }, "downloads": -1, "filename": "terrastorm-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "b3f7d47d5032f78de0d5522782dfaf32", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7340, "upload_time": "2019-03-02T15:49:10", "url": "https://files.pythonhosted.org/packages/fa/3b/0f5c96f93a5f54bc26ca2270e2e54c0e0a089ed3fa258980bc2382fb6813/terrastorm-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d1d8da8ae1bd94394919971284fe9204", "sha256": "d97029ec00e9e23f05e7ae4fee03c237920c52e2b86f30cdd4bd84b4c04e5230" }, "downloads": -1, "filename": "terrastorm-0.0.3.tar.gz", "has_sig": false, "md5_digest": "d1d8da8ae1bd94394919971284fe9204", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7629, "upload_time": "2019-03-02T15:49:12", "url": "https://files.pythonhosted.org/packages/8b/17/e666443abe08768da89adc38a6bbfe8019e417e37ee1f58c46876039dd86/terrastorm-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "25ba25b7a1ca0c41f46307423f03eff2", "sha256": "b65373e0dd0665b4fdc5f3c963c1b6f33fdfa50cb08bbbba14e1f52e69f67586" }, "downloads": -1, "filename": "terrastorm-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "25ba25b7a1ca0c41f46307423f03eff2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7376, "upload_time": "2019-03-03T18:50:52", "url": "https://files.pythonhosted.org/packages/95/36/6269ceab3179e284202cf763fa9c69b8171db1f472081d3648eb680bfcd7/terrastorm-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "80bb9ff5fc44f1074159d4636750080a", "sha256": "0397e4ee5a2e707fd426a21a7120e4ac6c53600b9566a7179307a39c025aaaad" }, "downloads": -1, "filename": "terrastorm-0.0.4.tar.gz", "has_sig": false, "md5_digest": "80bb9ff5fc44f1074159d4636750080a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7653, "upload_time": "2019-03-03T18:50:54", "url": "https://files.pythonhosted.org/packages/a8/d1/057fd90323b76c8da459673ff45d6424bfce3277c38a72a8eedcca9fb07d/terrastorm-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "25ba25b7a1ca0c41f46307423f03eff2", "sha256": "b65373e0dd0665b4fdc5f3c963c1b6f33fdfa50cb08bbbba14e1f52e69f67586" }, "downloads": -1, "filename": "terrastorm-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "25ba25b7a1ca0c41f46307423f03eff2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7376, "upload_time": "2019-03-03T18:50:52", "url": "https://files.pythonhosted.org/packages/95/36/6269ceab3179e284202cf763fa9c69b8171db1f472081d3648eb680bfcd7/terrastorm-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "80bb9ff5fc44f1074159d4636750080a", "sha256": "0397e4ee5a2e707fd426a21a7120e4ac6c53600b9566a7179307a39c025aaaad" }, "downloads": -1, "filename": "terrastorm-0.0.4.tar.gz", "has_sig": false, "md5_digest": "80bb9ff5fc44f1074159d4636750080a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7653, "upload_time": "2019-03-03T18:50:54", "url": "https://files.pythonhosted.org/packages/a8/d1/057fd90323b76c8da459673ff45d6424bfce3277c38a72a8eedcca9fb07d/terrastorm-0.0.4.tar.gz" } ] }