oswee / ignite

WIP! Ignition infrastructure to spin up Jenkins, Vault, storage and other elements required for Infra CI/CD pipelines
0 stars 1 forks source link
ansible jenkins minio terraform vault

Ignition

This repository contains automation code to Ignite (bootstrap) the baseline for the whole infrastructure. In order to provision and update the infrastructure in "GitOps" automated fashion I need to have several core pieces lied down upfront:

Execution of this repository code is manual.

Dependencies

This repository is just one member of the whole "Prime Suite". The other members are:

"The Prime" is just an temporary "nickname" of the whole project.

Installation

Install the requirements from the cd ./ansible directory:

ansible-galaxy collection install -r collections.yml -f

Usage

Run the playbook

ansible-playbook playbooks/playbook-name.yml

Run the Molecule

molecule test

or to test only specific environment:

molecule converge -- --limit PXE

If testing whole environment it can take significant time, but it will definitely be faster than doing that manualy. :)

Destroy specific environment:

molecule destroy -- --limit PXE

Sure you can run

molecule converge

as well. It will do the full "provisioning" for testing purposes.

To provision the infrastructure use from the cd ./terraform directory:

terraform -chdir=environments/development/000base apply

or

terraform -chdir=environments/development/000base destroy

to destroy the particular environment.

Be sure to follow the order of the environment prefixes. 000 prefix should be provisioned first and only then 010 prefix can be provisioned. To decommision the environment use same logic but in reverse order. Destroy 010 first and then 000.

Workstation setup

You can run single Ansible playbook role with

ansible-playbook -i environments/development playbooks/workstation.yml --tags golang --ask-vault-pass