SemaphoreUI Docker Splash Demo
Demo Ansible molto semplice, pensata per essere eseguita da SemaphoreUI:
test.yml: verifica connettivita e prerequisitideploy.yml: deploy di un container Nginx Docker con pagina HTML customundeploy.yml: rimozione container e cleanup
Struttura
ansible-semaphore-docker-demo/
ansible.cfg
inventory
requirements.yml
deploy.yml
test.yml
undeploy.yml
group_vars/
all.yml
secrets.yml
roles/
splash/
tasks/main.yml
templates/index.html.j2
templates/nginx.conf.j2
semaphore_dagster_config.example.yml
Prerequisiti host target
- Linux con accesso SSH
- Privilegi sudo/root
- Debian/Ubuntu (nel playbook installo
docker.ioepython3-docker)
Uso locale rapido
cd ansible-semaphore-docker-demo
ansible-galaxy collection install -r requirements.yml
ansible-playbook -i inventory test.yml
ansible-playbook -i inventory deploy.yml
ansible-playbook -i inventory undeploy.yml
Accesso app
Dopo il deploy:
http://<IP_SERVER>:8090- healthcheck:
http://<IP_SERVER>:8090/health
Variabili principali
In group_vars/all.yml:
app_portgreeting_messagecontainer_namenginx_versionaccent_colorsecondary_color
In group_vars/secrets.yml:
app_secretrelease_id
Per produzione: cifra group_vars/secrets.yml con Ansible Vault.
SemaphoreUI
Per bootstrap automatico con il tuo DAG, usa il file:
semaphore_dagster_config.example.yml
Basta aggiornare URL Semaphore, token API, project ID, repo URL e inventory content.
Description
Languages
Jinja
100%