2024-09-23 11:21:57 +00:00
|
|
|
- name: Deploy Webapp-Deployer UI
|
|
|
|
hosts: "{{ target_host }}"
|
|
|
|
|
|
|
|
environment:
|
|
|
|
PATH: "{{ ansible_env.PATH }}:/home/{{ansible_user}}/bin"
|
|
|
|
|
|
|
|
vars_files:
|
|
|
|
- vars/webapp-vars.yml
|
2024-09-26 06:04:19 +00:00
|
|
|
- vars/dns-vars.yml
|
2024-09-26 09:41:06 +00:00
|
|
|
- vars/k8s-vars.yml
|
2024-09-23 11:21:57 +00:00
|
|
|
|
|
|
|
tasks:
|
|
|
|
- name: Clone webapp-deployment-status-ui repository
|
|
|
|
git:
|
|
|
|
repo: "https://git.vdb.to/cerc-io/webapp-deployment-status-ui.git"
|
|
|
|
dest: "{{ ansible_env.HOME }}/cerc/webapp-deployment-status-ui"
|
|
|
|
update: yes
|
|
|
|
|
|
|
|
- name: Build webapp-deployer-status-ui
|
|
|
|
command: laconic-so build-webapp --source-repo {{ ansible_env.HOME }}/cerc/webapp-deployment-status-ui
|
|
|
|
|
|
|
|
- name: Create a deployment for webapp-ui
|
|
|
|
command: |
|
|
|
|
laconic-so deploy-webapp create --kube-config {{ ansible_env.HOME }}/.kube/config-default.yaml
|
2024-09-26 06:04:19 +00:00
|
|
|
--image-registry container-registry.pwa.{{ full_domain }} --deployment-dir webapp-ui
|
|
|
|
--image cerc/webapp-deployment-status-ui:local --url https://webapp-deployer-ui.pwa.{{ full_domain }}
|
2024-09-23 11:21:57 +00:00
|
|
|
--env-file ~/cerc/webapp-deployment-status-ui/.env
|
|
|
|
|
|
|
|
- name: Push image to container registry
|
|
|
|
command: laconic-so deployment --dir webapp-ui push-images
|
|
|
|
|
|
|
|
- name: Update config file for webapp ui
|
|
|
|
template:
|
|
|
|
src: "./templates/configs/webapp-ui-config.env.j2"
|
|
|
|
dest: "webapp-ui/config.env"
|
|
|
|
|
|
|
|
- name: Start the deployer ui
|
|
|
|
command: laconic-so deployment --dir webapp-ui start
|