diff --git a/README.md b/README.md index 08d995e..4837867 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,10 @@ It has been tested on CentOS 7.9.2009, CentOS 8.4.2105, Debian 9.13, Debian 10.1 `ansible-playbook -u [username] -i inventory install_kasm.yml` + Additionally the deployment can be run in a "test" mode by passing the extra option test=true, this will not seed images among other test mode optimizations. + + `ansible-playbook -u [username] -i inventory install_kasm.yml -e "test=true"` + 5. Login to the deployment as admin@kasm.local using the IP of one of the WebApp servers (eg https://192.168.1.2) 6. Navigate to the Agents tab, and enable each Agent after it checks in. (May take a few minutes) diff --git a/roles/install_common/tasks/agent_install.yml b/roles/install_common/tasks/agent_install.yml index 28075e3..c78ff6e 100644 --- a/roles/install_common/tasks/agent_install.yml +++ b/roles/install_common/tasks/agent_install.yml @@ -15,3 +15,13 @@ 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) + when: test is not defined + +- name: Install agent role - test + command: "bash {{ tempdir.path }}/kasm_release/install.sh -S agent -I -e -p {{ target_ip }} -m {{ web_ip }} -M {{ manager_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 + 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) + when: test is defined diff --git a/roles/install_common/tasks/db_install.yml b/roles/install_common/tasks/db_install.yml index 79a8430..7dad42e 100644 --- a/roles/install_common/tasks/db_install.yml +++ b/roles/install_common/tasks/db_install.yml @@ -5,3 +5,13 @@ 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) + 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 }}" + 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) + when: test is defined