2024-10-01 12:17:10 +00:00
|
|
|
- name: Setup and run fixturnet-laconicd-stack
|
|
|
|
hosts: "{{ target_host }}"
|
|
|
|
|
|
|
|
environment:
|
|
|
|
PATH: "{{ ansible_env.PATH }}:/home/{{ansible_user}}/bin"
|
|
|
|
|
2024-10-08 12:37:54 +00:00
|
|
|
vars_files:
|
|
|
|
- vars/laconicd-vars.yml
|
|
|
|
|
2024-10-01 12:17:10 +00:00
|
|
|
tasks:
|
|
|
|
- name: Clone the fixturenet-laconicd-stack repo
|
|
|
|
command: laconic-so fetch-stack git.vdb.to/cerc-io/fixturenet-laconicd-stack --pull
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- name: Setup repos for fixturenet-laconicd
|
|
|
|
command: laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd setup-repositories
|
|
|
|
|
|
|
|
- name: Build container images
|
|
|
|
command: laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd build-containers --force-rebuild
|
|
|
|
|
|
|
|
- name: Generate over spec file for laconicd deployment
|
|
|
|
template:
|
|
|
|
src: "./templates/specs/fixturenet-laconicd-spec.yml.j2"
|
|
|
|
dest: "fixturenet-laconicd-spec.yml"
|
|
|
|
|
|
|
|
- name: Check if the deployment directory exists
|
|
|
|
stat:
|
|
|
|
path: "fixturenet-laconicd-deployment"
|
|
|
|
register: deployment_dir
|
|
|
|
|
|
|
|
- name: Create the deployment from the spec file
|
|
|
|
command: laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd deploy create --spec-file fixturenet-laconicd-spec.yml --deployment-dir fixturenet-laconicd-deployment
|
|
|
|
when: not deployment_dir.stat.exists
|
|
|
|
|
2024-10-08 12:37:54 +00:00
|
|
|
- name: Create laconicd config
|
|
|
|
template:
|
|
|
|
src: "./templates/configs/laconicd-config.env.j2"
|
|
|
|
dest: "fixturenet-laconicd-deployment/config.env"
|
|
|
|
|
2024-10-01 12:17:10 +00:00
|
|
|
- name: Start the deployment
|
|
|
|
command: laconic-so deployment --dir fixturenet-laconicd-deployment start
|