Ansible based, of course! (and a litle bit of gitops)
We want to provide
stormshift-<cluster-name>-infra
for example stormshift-ocp11-infra
stormshift-admins
this group gets admin privileges on all stormshift related projects.The inventory is managed in the inventory/ folder.
Every cluster is a ansible group cluster_<cluster-name>
for example
cluster_<cluster-name>_cp
for control planecluster_<cluster-name>_workers
for worker nodesEvery node in a cluster is part of the group.
Every node start with the <cluster-name>
-control-1 for example:
ocp11-control-1
ocp11-control-2
ocp11-control-3
ocp11-worker-1
inventory
├── group_vars
│ ├── all.yaml
│ ├── cluster_ocp11.yaml
...
├── host_vars
│ ├── ocp11-control-1.yaml
└── hosts.yml
stormshift
organisationstormshift-admin
team, make team to stormshift org. admin/full-accessstormshift-automation
with this repo to the stormshift organisation as well.stormshift-inventory
inventory
automation-repo
based on Source from project
:
inventory/hosts.yml
deploy-cluster.yaml
destroy-cluster.yaml
pre-deploy-cluster-{{ cluster_type (sno|classic) }}.yaml
deploy-cluster-{{ cluster_type (sno|classic) }}.yaml
post-deploy-cluster-{{ cluster_type (sno|classic) }}.yaml
# add all informations
cp -v development-example.vars development-example.vars-private
vim development-example.vars-private
cp -v development-example.env development-example.env-private
vim development-example.env-private
# Load env variables
source development-example.env-private
# Run it
ansible-navigator run ./deploy-cluster.yaml -e @development-example.vars-private -v
inventory/
)Documentation:
How do dump the entire inventory locally:
ansible-navigator run dump-inventory.yaml --list-hosts
How to dump vars of a host locally:
ansible-navigator run dump-inventory.yaml --limit common-pattern*
podman login registry.redhat.io
export VERSION=$(date +%Y%m%d%H%M)
ansible-builder build \
--verbosity 3 \
--container-runtime podman \
--tag quay.coe.muc.redhat.com/stormshift/automation-execution-environment:$VERSION
podman login quay.coe.muc.redhat.com
podman push quay.coe.muc.redhat.com/stormshift/automation-execution-environment:$VERSION