54 lines
1.5 KiB
Markdown
54 lines
1.5 KiB
Markdown
# Application Consumption Demo Algorithm (Ansible)
|
|
|
|
Progetto Ansible simile a `appconsumption-demo-app`, orientato a SemaphoreUI:
|
|
- `test.yml`: verifica connettivita e prerequisiti Docker
|
|
- `deploy.yml`: deploy container Docker della ML app
|
|
- `undeploy.yml`: rimozione container e cleanup
|
|
|
|
## Struttura
|
|
|
|
```text
|
|
application-consumption-demo-algorithm/
|
|
ansible.cfg
|
|
inventory
|
|
requirements.yml
|
|
deploy.yml
|
|
test.yml
|
|
undeploy.yml
|
|
group_vars/
|
|
all.yml
|
|
secrets.yml
|
|
splash/
|
|
tasks/main.yml
|
|
templates/app.env.j2
|
|
semaphore_dagster_config.example.yml
|
|
```
|
|
|
|
## Immagine Docker usata
|
|
|
|
- Registry: `gitea.dataprovider01.sandbox-cat-dat.simpl-europe.eu`
|
|
- Repository: `j.r/application-consumption-demo-algorithm`
|
|
- Tag: `optimized`
|
|
- Digest atteso: `sha256:6cc8ab7c08f195cb65c689255418652fdf0094acaaa4ef63475d594039cda2ab`
|
|
|
|
Pull manuale:
|
|
|
|
```bash
|
|
docker pull gitea.dataprovider01.sandbox-cat-dat.simpl-europe.eu/j.r/application-consumption-demo-algorithm:optimized
|
|
```
|
|
|
|
Se il nodo target e' amd64 e vedi errore "no matching manifest for linux/amd64":
|
|
|
|
```bash
|
|
docker pull --platform linux/amd64 gitea.dataprovider01.sandbox-cat-dat.simpl-europe.eu/j.r/application-consumption-demo-algorithm@sha256:6cc8ab7c08f195cb65c689255418652fdf0094acaaa4ef63475d594039cda2ab
|
|
```
|
|
|
|
## Uso locale rapido
|
|
|
|
```bash
|
|
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
|
|
```
|