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
Sven Ketelsen 31298d109d feat: deploy docker registry key to namespace 4 years ago
ansible-builder DEV-173: review/regression/cleanup: connect + wordpress 4 years ago
docker/dregsy DEV-173: review/regression/cleanup: connect + wordpress 4 years ago
group_vars kubespray: removed cert/ingress 4 years ago
host_vars feat: split management setup into own role (dev) 4 years ago
inventory_plugins kubespray 4 years ago
kubespray@eeeca4a1d0 feat: added hetzner csi plugin 4 years ago
roles feat: deploy docker registry key to namespace 4 years ago
scripts feat: complete qa setup up to smardigo management 4 years ago
smardigo bugfix: wordpress_portal.sql -> wordpress_portal.sql.gz 4 years ago
tasks bugfix: added pagination to autodiscover_pre_tasks 4 years ago
templates feat: prometheus now uses stage_server_infos (auto discover task) 4 years ago
users DEV-220: ssh-key got lost due to abolishing windows... key rotated 4 years ago
.gitignore chore: add kubespray to .gitignore 4 years ago
.gitmodules kubespray: v2.17.0 -> v2.17.1 4 years ago
README.md DEV-222 kubernetes setup with ansible 4 years ago
ansible.cfg DEV-222 kubernetes setup with ansible 4 years ago
create-database.yml bugfix: added ansible_ssh_host to smardigo playbooks 4 years ago
create-realm.yml feat: added new service: gitea 4 years ago
create-server.yml bugfix: added ansible_ssh_host to smardigo playbooks 4 years ago
create-service.yml bugfix: added ansible_ssh_host to smardigo playbooks 4 years ago
elastic-certs.sh SMARCH-92: split elastic stack services for qa 4 years ago
galaxy-requirements.yml DEV-222 kubernetes setup with ansible 4 years ago
import-database.yml bugfix: added ansible_ssh_host to smardigo playbooks 4 years ago
info.yml feat: prometheus now uses stage_server_infos (auto discover task) 4 years ago
kubernetes.yml feat: deploy docker registry key to namespace 4 years ago
pip-requirements DEV-216: added ssh pubkey for fgoerz; changed lookup to find also non-RSA-pubkeys 4 years ago
poetry.lock Updated cryptography (3.4.7 -> 3.4.8), ansible-core (2.11.3 -> 2.11.4), ansible (4.3.0 -> 4.4.0), hcloud (1.13.0 -> 1.16.0) 4 years ago
provisioning.yml chore: cleanup 4 years ago
pyproject.toml feature/postgresql-cluster 4 years ago
remove-database.yml bugfix: added ansible_ssh_host to smardigo playbooks 4 years ago
remove-realm.yml cleanup: consolidation 4 years ago
remove-server.yml chore: removed mighty server removal 4 years ago
remove-service.yml bugfix: deleting dns entries for service wordpress 4 years ago
setup.yml feat: rollout gitea on qa 4 years ago
smardigo.yml feat: rollout gitea on qa 4 years ago
stage-dev kubespray 4 years ago
stage-netgo-hcloud.yml DEV-231: Pagination für dynamisches Inventory fehlt 4 years ago
stage-qa feat: rollout gitea on qa 4 years ago
update-ssh-config-file.yml feat: added parameter to local ssh config update 4 years ago
upload-database-dumb.yml bugfix: added ansible_ssh_host to smardigo playbooks 4 years ago

README.md

Prepare ansible Installation

Option 1

  • Install ansible with Python.

  • Install library jmespath (https://jmespath.org/). Will be used to parse JSON data.

  • Install hcloud (python library for hetzner)

    pip3 install ansible jmespath hcloud netaddr

    OR

    pip3 install -r pip-requirements

Option 2

  • Install python dependencies with poetry

    poetry install

Install needed ansible collections / roles

Without poetry

ansible-galaxy collection install hetzner.hcloud
ansible-galaxy collection install community.general
ansible-galaxy collection install kubernetes.core
ansible-galaxy collection install community.mysql

OR

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

With poetry

poetry run ansible-galaxy collection install hetzner.hcloud
poetry run ansible-galaxy collection install community.general
poetry run ansible-galaxy collection install kubernetes.core
poetry run ansible-galaxy collection install community.mysql

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

TODO

IPFire 149.233.6.129 - eShelter 212.121.131.106 - Siemansdamm

Prometheus curl -X POST https://{{ prometheus-url }}/-/reload

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

AWX -> /etc/kubernetes/k9s wget https://github.com/derailed/k9s/releases/download/v0.24.14/k9s_Linux_x86_64.tar.gz tar -xzf k9s_*.tar.gz -C . ln -s /etc/kubernetes/k9s/k9s /usr/bin/k9s kubectl taint nodes --all node-role.kubernetes.io/master-

Wordpress Database Dump ansible-playbook upload-database-dumb.yml -e "cluster_services_str='connect,connect_wordpress' stage='dev' upload_file="smardigo/wordpress_portal.sql.gz""