Ansible
It is possible to install Cryton using ansible. We will only cover basics and installation on a single machine.
All roles with more information can be found here.
Quick-start¶
First, we have to create inventory.yml
file:
Show the inventory.yml file
- name: deploy-cli
src: https://gitlab.ics.muni.cz/cryton/ansible/deploy-cli.git
version: "2.0.0"
scm: git
- name: deploy-core
src: https://gitlab.ics.muni.cz/cryton/ansible/deploy-core.git
version: "2.0.0"
scm: git
- name: deploy-worker
src: https://gitlab.ics.muni.cz/cryton/ansible/deploy-worker.git
version: "2.0.0"
scm: git
- name: deploy-frontend
src: https://gitlab.ics.muni.cz/cryton/ansible/deploy-frontend.git
version: "2.0.0"
scm: git
- name: register-worker
src: https://gitlab.ics.muni.cz/cryton/ansible/register-worker.git
version: "2.0.0"
scm: git
Now, create playbook.yml
file and copy one of the following examples:
Show the playbook.yml example (preferred installation is using pip)
- name: Deploy all components using pip
hosts: default
become: yes
roles:
- role: deploy-cli
- role: deploy-core
- role: deploy-frontend
- role: deploy-worker
- role: register-worker
cryton_worker_name: Worker
cryton_worker_description: base description
Show the playbook.yml example (preferred installation is using Docker)
- name: Deploy all components using Docker (Compose)
hosts: default
become: yes
run_as_user: root
roles:
- role: deploy-cli
cryton_cli_installation: docker
- role: deploy-core
cryton_core_installation: docker
cryton_core_environment:
CRYTON_CORE_RABBIT_HOST: cryton-rabbit
CRYTON_CORE_DB_HOST: cryton-pgbouncer
CRYTON_CORE_API_USE_STATIC_FILES: true
- role: deploy-frontend
- role: deploy-worker
cryton_worker_installation: docker
- role: register-worker
cryton_cli_executable: docker exec cryton-cli cryton-cli
cryton_worker_name: Worker
cryton_worker_description: base description
Once we have created playbook.yml
and inventory.yml
, we can install the requirements and run the playbook.