You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Go to file
Michael Haehnel 81f5d06842
DEV-1071 Add postgres02 to all stages
- removed fgoerz system user and ssh key
3 years ago
ansible-builder Dev 997 provisioning galaxy role 3 years ago
group_vars DEV-1071 Add postgres02 to all stages 3 years ago
host_vars DEV-1071 Add postgres02 to all stages 3 years ago
inventory_plugins DEV-1063: reworked the filtering out the stage name out of the loadbalancer 3 years ago
kubespray@08467ad6b3 DEV-1028 extracted constraint checks into own task 3 years ago
library bugfix: connect-wordpress orchestration 4 years ago
roles DEV-1070 maria database backup broken 3 years ago
scripts MOB-367 added script for pull/tag/push images between stages 3 years ago
smardigo DEV-1042 demo stage polish 3 years ago
tasks DEV-1063: reworked the filtering out the stage name out of the loadbalancer 3 years ago
templates DEV-1060 Removed enforced double quotes in docker-compose template for 'user' variable 3 years ago
users DEV-1071 Add postgres02 to all stages 3 years ago
.gitignore DEV-327: added several stuff for new prodnso-stage + bugfixing and improving other stuff 4 years ago
.gitlab-ci.yml DEV-1069 changed gitlab-ci branch for demompmx from main to prodnso 3 years ago
.gitmodules Feature/dev 927 3 years ago
README.md Dev-997: provisioning galaxy role 3 years ago
ansible-lint.cfg chore: ansible linter 3 years ago
ansible.cfg Feature/dev 930 3 years ago
awx.yml DEV-1028 extracted constraint checks into own task 3 years ago
create-database-backup.yml DEV-1042: added new stage for demo mpmx 3 years ago
create-database.yml DEV-1042: added new stage for demo mpmx 3 years ago
create-kibana-objects.yml DEV-1028 extracted constraint checks into own task 3 years ago
create-realm.yml DEV-1028 extracted constraint checks into own task 3 years ago
create-remote-database-backup.yml DEV-1058 bugfix backup process 3 years ago
create-server.yml DEV-1042: added new stage for demo mpmx 3 years ago
create-service.yml DEV-1028 extracted constraint checks into own task 3 years ago
dump-hcloud-ips.yml DEV-1028 extracted constraint checks into own task 3 years ago
elastic-certs.sh DEV-338: added logstash config to deliver k8s-dockerlogs into specific indices 4 years ago
evil-remove-server.yml DEV-1028 extracted constraint checks into own task 3 years ago
export-database.yml DEV-1042: added new stage for demo mpmx 3 years ago
external_monitoring.yml DEV-1042: added new stage for demo mpmx 3 years ago
galaxy-requirements.yml chore: create new awx-custom-ee for DEV-1042 3 years ago
gitlab-mirrors.yml DEV-1058 bugfix backup process 3 years ago
gitlab.clone.k8s-clusters.sh DEV-1042: added new stage for demo mpmx 3 years ago
gitlab.clone.roles.sh DEV-999: alle rollen innerhalb von setup ausgelagert 3 years ago
hcloud_firewall.yml DEV-1028 extracted constraint checks into own task 3 years ago
hetzner_ssh_keys.yml DEV-837 k8s bootstrap: added creation of load balancer and dns record 3 years ago
import-database.yml DEV-1042: added new stage for demo mpmx 3 years ago
initialize-stage.yml DEV-1058 set management realm to "stage-connect" 3 years ago
kubernetes.yml DEV-1028 extracted constraint checks into own task 3 years ago
mobene.yml DEV-1028 extracted constraint checks into own task 3 years ago
patchday.yml DEV-1020 Initial commit new feature branch 3 years ago
pip-requirements Feature/dev 829 - ansible version updaten 3 years ago
pmci-callback.yml DEV-526 added pmci tenant management 3 years ago
pmci-database-backup-create.yml DEV-1042: added new stage for demo mpmx 3 years ago
pmci-database-backup-import.yml DEV-1042: added new stage for demo mpmx 3 years ago
pmci-database-backup-restore.yml DEV-1042: added new stage for demo mpmx 3 years ago
pmci-database-create.yml DEV-1042: added new stage for demo mpmx 3 years ago
pmci-database-delete.yml DEV-1042: added new stage for demo mpmx 3 years ago
pmci-empty-playbook.yml DEV-526 added pmci-callback playbook for testing purposes 3 years ago
pmci-inventory-cluster.yml DEV-1028 extracted constraint checks into own task 3 years ago
pmci-inventory-database.yml DEV-1042: added new stage for demo mpmx 3 years ago
pmci-kibana-create-objects.yml DEV-1005 Activate Kibana feature 'dev_tools' 3 years ago
pmci-monitoring-update.yml bugfix: regression from DEV-1060 3 years ago
pmci-realm-client-create.yml chore: fix pmci error 3 years ago
pmci-realm-client-delete.yml DEV-526 added pmci tenant management 3 years ago
pmci-server-create.yml hotfix: pmci playbooks broken 3 years ago
pmci-server-delete.yml DEV-526 added pmci tenant management 3 years ago
pmci-service-create.yml DEV-526 added pmci tenant management 3 years ago
pmci-service-delete.yml DEV-526 added pmci tenant management 3 years ago
pmci-service-state-update.yml DEV-1042: added new stage for demo mpmx 3 years ago
pmci-tenant-change.yml DEV-1042: added new stage for demo mpmx 3 years ago
pmci-tenant-create.yml DEV-1042: added new stage for demo mpmx 3 years ago
pmci-tenant-delete.yml DEV-1042: added new stage for demo mpmx 3 years ago
pmci-tenant-sync.yml DEV-1042: added new stage for demo mpmx 3 years ago
poetry.lock Feature/dev 927 3 years ago
provisioning.yml DEV-1028 extracted constraint checks into own task 3 years ago
pyproject.toml Feature/dev 927 3 years ago
remove-database.yml DEV-1042: added new stage for demo mpmx 3 years ago
remove-realm.yml DEV-1028 extracted constraint checks into own task 3 years ago
remove-server.yml DEV-1028 extracted constraint checks into own task 3 years ago
remove-service.yml DEV-1028 extracted constraint checks into own task 3 years ago
restore-database-backup.yml DEV-1042: added new stage for demo mpmx 3 years ago
restore-remote-database-backup.yml DEV-1058 bugfix regression for when condition 3 years ago
setup.yml DEV-1042: added new stage for demo mpmx 3 years ago
smardigo.yml DEV-1042: added new stage for demo mpmx 3 years ago
stage-demompmx DEV-1067 bugfix added two nodes to demompmx k8s 3 years ago
stage-demompmx-netgo-hcloud.yml DEV-1042: added new stage for demo mpmx 3 years ago
stage-dev DEV-1071 Add postgres02 to all stages 3 years ago
stage-dev-netgo-hcloud.yml Feature/dev 927 3 years ago
stage-devscr DEV-1009 Setup dev-acr cluster with blueprint 3 years ago
stage-devscr-netgo-hcloud.yml DEV-1009 Setup dev-acr cluster with blueprint 3 years ago
stage-digitalocean DEV-253: digitalocean stuff - add droplet but not idempotentgit branch git branch plz check 4 years ago
stage-ext DEV-875 removed ext-bdev-mpmexec-01.smardigo.digital 3 years ago
stage-ext-netgo-hcloud.yml DEV-597 removed ssh keys 3 years ago
stage-prodnso DEV-1071 New postgres cluster for Linde 3 years ago
stage-prodnso-netgo-hcloud.yml Feature/dev 927 3 years ago
stage-prodwork01 DEV-1042: added new stage for demo mpmx 3 years ago
stage-prodwork01-netgo-hcloud.yml DEV-927: fixing problems 3 years ago
stage-qa DEV-1071 Add postgres02 to all stages 3 years ago
stage-qa-netgo-hcloud.yml Feature/dev 927 3 years ago
update-docker-image.yml DEV-1028 extracted constraint checks into own task 3 years ago
update-monitoring.yml bugfix: regression from DEV-1060 3 years ago
update-service-state.yml DEV-1028 extracted constraint checks into own task 3 years ago
update-ssh-config-file.yml DEV-1028 extracted constraint checks into own task 3 years ago
upload-database-dump.yml DEV-1042: added new stage for demo mpmx 3 years ago

README.md

Prepare ansible Installation

Install needed python pip packages

pip3 install -r pip-requirements

Install needed ansible collections / roles

ansible-galaxy install -r galaxy-requirements.yml -f

Setup

Create/Start servers for stage-dev

ansible-playbook -i stage-dev provisioning.yml --vault-password-file ~/vault-pass
ansible-playbook -i stage-dev start.yml --vault-password-file ~/vault-pass
ansible-playbook -i stage-dev stop.yml --vault-password-file ~/vault-pass

with Poetry prefix with poetry run

Provisioning

ansible-playbook -i stage-dev setup.yml --vault-password-file ~/vault-pass -u root
ansible-playbook dynamic-provisioning.yml  --vault-password-file ~/vault-pass -e "stage=dev name=test node=01 service=connect"

with Poetry prefix with poetry run

Setup Smardigo Service

Setup/Configure a Server, Database, Realm (keycloak) and Smardigo
ansible-playbook create-server.yml -e "stage='dev' tenant_id='sken' cluster_name='test01' cluster_size='1' cluster_service='connect' stage='dev'"
ansible-playbook create-database.yml -e "stage='dev' tenant_id='sken' cluster_name='test01' cluster_size='1' cluster_service='connect' stage='dev'"
ansible-playbook create-realm.yml -e "stage='dev' tenant_id='sken' cluster_name='test01' cluster_size='1' cluster_service='connect' stage='dev' current_realm_name='sken' current_realm_display_name='S-K-E-N'"
ansible-playbook create-service.yml -e "stage='dev' tenant_id='sken' cluster_name='test01' cluster_size='1' cluster_service='connect' stage='dev' current_realm_name='sken' current_realm_display_name='S-K-E-N'"

with Poetry prefix with poetry run

Remove Smardigo Service

Remove a Server, Database, Realm (keycloak) and Smardigo
ansible-playbook remove-server.yml -e "stage='dev' tenant_id='sken' cluster_name='test01' cluster_size='1' cluster_service='connect' stage='dev'"

with Poetry prefix with poetry run

ansible-builder

AWX is used in smardigo setup do execute several playbooks due to user interaction within smardigo product. To finish ansible runs successfully we have to make sure every ansible dependency(ansible collection/role or pip package) is installed. therefore ansible-builder gave us the opportunity to configure the needed environment to exec plays successfully.

before every git-merge depending on changes concerning new ansible collections/roles and/or new pip-packages, please run the following:

cd ansible-builder/
ansible-builder build --tag dev-harbor-01.smardigo.digital/awx/awx-custom-ee --container-runtime docker

hopefully it will result in e.g.:

cd ansible-builder/
ATTENTION: to get more information plz set --verbosity 3	
ansible-builder build --tag awx-custom-ee:latest --container-runtime docker
Running command:
  docker build -f context/Dockerfile -t awx-custom-ee:latest context

Complete! The build context can be found at: /home/friedrich/sandbox/netgo_stuff/hetzner-ansible/ansible-builder/context

real	2m56,131s
user	0m0,208s
sys	0m0,102s`

you can start the docker container locally with e.g. : docker run -it --rm --mount type=bind,source="$(pwd)"/,target=/gitrepo/ awx-custom-ee:latest /bin/bash

after it, you are able to exec some ansbible-runs like: (please solve dependencies before starting to docker container) cd /gitrepo ansible-playbook -i stage-digitalocean external_monitoring.yml --ask-vault-password -u root --private-key sshkey_pw_less

export HETZNER_LABEL_SELECTOR='stage=dev'
ansible-playbook -i stage-netgo-hcloud.yml -l redis smardigo.yml --ask-vault-password  -u root --private-key sshkey_pw_less

if everything works fine, plz push the created docker container with:

docker login dev-harbor-01.smardigo.digital
docker tag XXXXXXXX dev-harbor-01.smardigo.digital/awx/awx-custom-ee:latest
docker push dev-harbor-01.smardigo.digital/awx/awx-custom-ee

TODO

Prometheus (Grafana) docker exec -i dev-prometheus-01-grafana sh -c 'grafana-cli plugins install grafana-piechart-panel' docker restart dev-prometheus-01-grafana