KASM-3051 add guac role to multi install

This commit is contained in:
ryan.kuba 2022-08-11 14:53:40 -04:00
parent 58eded6906
commit 52be4fb65c
10 changed files with 40 additions and 3 deletions

1
group_vars/guac.yml Normal file
View file

@ -0,0 +1 @@
desired_swap_size: 4g

View file

@ -2,6 +2,7 @@
- db
- web
- agent
- guac
roles:
- install_common
any_errors_fatal: true

View file

@ -4,3 +4,5 @@ ubuntu18-web
ubuntu18-db
[agent]
ubuntu18-agent
[guac]
ubuntu18-guac

View file

@ -4,6 +4,7 @@
- db
- web
- agent
- guac
roles:
- patch_os

View file

@ -1,5 +1,5 @@
- name: Install database role
command: "bash {{ tempdir.path }}/kasm_release/install.sh -S db -e -Q {{database_password}} -R {{redis_password}} -U {{user_password}} -P {{admin_password}} -M {{manager_token}} {{ '-s ' ~ service_images_copy.dest if service_images_file }} {{ '-w ' ~ workspace_images_copy.dest if workspace_images_file }}"
command: "bash {{ tempdir.path }}/kasm_release/install.sh -S db -e -Q {{database_password}} -R {{redis_password}} -U {{user_password}} -P {{admin_password}} -M {{manager_token}} -W {{guac_token}} {{ '-s ' ~ service_images_copy.dest if service_images_file }} {{ '-w ' ~ workspace_images_copy.dest if workspace_images_file }}"
register: install_output
become: true
retries: 20
@ -8,7 +8,7 @@
when: test is not defined
- name: Install database role - test
command: "bash {{ tempdir.path }}/kasm_release/install.sh -S db -e -I -Q {{database_password}} -R {{redis_password}} -U {{user_password}} -P {{admin_password}} -M {{manager_token}} {{ '-s ' ~ service_images_copy.dest if service_images_file }} {{ '-w ' ~ workspace_images_copy.dest if workspace_images_file }}"
command: "bash {{ tempdir.path }}/kasm_release/install.sh -S db -e -I -Q {{database_password}} -R {{redis_password}} -U {{user_password}} -P {{admin_password}} -M {{manager_token}} -W {{guac_token}} {{ '-s ' ~ service_images_copy.dest if service_images_file }} {{ '-w ' ~ workspace_images_copy.dest if workspace_images_file }}"
register: install_output
become: true
retries: 20

View file

@ -29,4 +29,9 @@
when: manager_token is not defined
run_once: true
delegate_to: localhost
- set_fact:
guac_token: "{{ lookup('password', '/dev/null chars=ascii_letters,digits length=22') }}"
when: guac_token is not defined
run_once: true
delegate_to: localhost

View file

@ -0,0 +1,17 @@
- name: Check connection from guac to webserver
uri:
url: "https://{{ web_ip }}/api/__healthcheck"
timeout: 5
validate_certs: false
register: _result
until: _result.status == 200
retries: 7
delay: 5
- name: Install guac role
command: "bash {{ tempdir.path }}/kasm_release/install.sh -S guac -e -p {{ web_ip }} -W {{ guac_token }} {{ '-s ' ~ service_images_copy.dest if service_images_file }}"
register: install_output
become: true
retries: 20
delay: 10
until: install_output is success or ('Failed to lock apt for exclusive operation' not in install_output.stderr and '/var/lib/dpkg/lock' not in install_output.stderr)

View file

@ -85,6 +85,13 @@
- "'agent' in group_names"
- not kasm_installed
- name: Run Kasm guac install tasks
include_tasks:
file: guac_install.yml
when:
- "'guac' in group_names"
- not kasm_installed
- name: enable the docker service to run at boot
service:
name: docker
@ -104,6 +111,7 @@
- "Database Password: {{ database_password }}"
- "Redis Password: {{ redis_password }}"
- "Manager Token: {{ manager_token }}"
- "Guac Token: {{ guac_token }}"
- "user@kasm.local password: {{ user_password }}"
- "admin@kasm.local password: {{ admin_password }}"
run_once: true

View file

@ -2,6 +2,7 @@
- db
- web
- agent
- guac
serial: 1
gather_facts: no
tasks:

View file

@ -2,5 +2,6 @@
- db
- web
- agent
- guac
roles:
- uninstall