Skip to main content

Python package to automate deploiment of the infrastructures

Project description

iac-bootstrap

iac-bootstrap is a package to make fast deployments of infrastructure,
on cloud providers, like AWS, with IAC tools like Ansible and Terraform.

The full documentation is available on Readthedocs.

installation

To install the package.

pip install --user iac_bootstrap==1.0.4

There is a quickstart you should follow to build your own customized infrastructure.

If you want to test our example to get an idea of how it works, you can follow our simple usage, described below.

Simple usage

iac-bootstrap automates terraform initialization and deployment, although generating necessary files for ansible and launch playbooks.

You can use the available example, and define your own group and env values,
or use the example with "mygroup" and "myenv" already available.

cd examples/infra-base
ssh-keygen -f configs/mygroup/myenv/ssh/id_rsa

This generates the tfstate configuration

python -m iac_bootstrap.infra_bootstrap --account mygroup-myenv

This launches the terraform layers to build the infrastructure (vpc and autoscaling group)

python -m iac_bootstrap.infra_builder_terraform --account mygroup-myenv

This installs the Ansible role and launches the playbook, to install nginx

ansible-galaxy install wescale.nginx -p ./ansible/roles/external/
export ANSIBLE_CONFIG="$PWD/mygroup-myenv-ansible.cfg"

python -m iac_bootstrap.install_nginx --group mygroup --env myenv

.. Then you can destroy the infra when you have finished

python -m iac_bootstrap.infra_builder_terraform --account mygroup-myenv --action destroy

aws s3 rm s3://mygroup-myenv-eu-west-1-tfstate --recursive
python -m iac_bootstrap.infra_bootstrap --account mygroup-myenv --action destroy

Features

Here are features for infra_builder_terraform script:

Builder Terraform Script:
optional arguments:
  -h, --help            show this help message and exit
  --account ACCOUNT     account <group>-<env>
  --action ACTION       plan apply or destroy
  --region REGION       eu-west-1 by default
  --layer LAYER         terraform layer
  --ignore              ignore layer
  --provider PROVIDER   cloud provider , by default aws
  --approve APPROVE     Auto-approve option ,set 'yes' to enable it

Here are features for infra_bootstrap script :

Boot Strap script

optional arguments:
  -h, --help           show this help message and exit
  --provider PROVIDER  provider aws
  --account ACCOUNT    account <group>-<env>
  --action ACTION      plan apply or destroy
  --region REGION      eu-west-1 by default
  --approve APPROVE    Auto-approve option ,set 'yes' to enable it

license

GNU GENERAL PUBLIC LICENSE

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

iac_bootstrap-1.0.4.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iac_bootstrap-1.0.4-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file iac_bootstrap-1.0.4.tar.gz.

File metadata

  • Download URL: iac_bootstrap-1.0.4.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

File hashes

Hashes for iac_bootstrap-1.0.4.tar.gz
Algorithm Hash digest
SHA256 c40962787c12ccd393de9ad07637f49ce57327ea50b14d4d262587298098ee66
MD5 4aaae5b1ec5ff2378862a4b023641fc2
BLAKE2b-256 a087541597871f575dd2baaceea55e3f9ae999961808d439813da1e6e26d8701

See more details on using hashes here.

File details

Details for the file iac_bootstrap-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: iac_bootstrap-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

File hashes

Hashes for iac_bootstrap-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b171e9ecb02cd3637d507aa627e4fe4e3901e09701620d1d44340d89624cc71f
MD5 cd0083ea2d51473fe58d07767019e28c
BLAKE2b-256 d1b85764b85dba92a23889548b907ff7a5f3b992beb904e9f60341a6eb2fee18

See more details on using hashes here.

Supported by

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