Deployment Procedure
Review the Prerequisites before you start the deployment. The steps to deploy the Orchestrate application are:
Download Installer Package
To download the latest version of the Orchestrate installer package, run the following command:
wget https://packages.cyware.com/repository/cyware/installer/co/installer-co-release-latest.zip
Note
To download a previous version of the Orchestrate installer package, contact Cyware team for the download URL.
Extract Installer Package
To extract the Orchestrate installer package, run the following command:
unzip installer-co-release-latest.zip
After extracting the installer package, run the following command to go to the Orchestrate installer folder to proceed with the deployment:
cd co-installer
[root@ip-10-xx-xx-44 bin]# unzip installer-co-release-latest.zip Archive: installer-co-release-latest.zip inflating: co-installer/ansible.cfg inflating: co-installer/build-docker.yml inflating: co-installer/deploy-appstore.yml inflating: co-installer/deploy-cftr.yml inflating: co-installer/deploy-csap.yml inflating: co-installer/deploy-csol.yml inflating: co-installer/deploy-db-stack.yml inflating: co-installer/deploy/deploy-appstore/defaults/main.yml inflating: co-installer/deploy/deploy-appstore/files/docker-compose.yml inflating: co-installer/deploy/deploy-appstore/tasks/main.yml inflating: co-installer/deploy/deploy-appstore/templates/appstore.env.j2 inflating: co-installer/deploy/deploy-appstore/templates/appstore.yml.j2 inflating: co-installer/deploy/deploy-cftr/defaults/main.yml inflating: co-installer/deploy/deploy-cftr/files/docker-compose.yml inflating: co-installer/deploy/deploy-cftr/tasks/main.yml inflating: co-installer/deploy/deploy-cftr/templates/celery_newrelic.ini.j2 inflating: co-installer/deploy/deploy-cftr/templates/cftr-stack.yml.j2 inflating: co-installer/deploy/deploy-cftr/templates/cftr.env.j2 inflating: co-installer/deploy/deploy-cftr/templates/ml.env.j2 inflating: co-installer/deploy/deploy-cftr/templates/newrelic.ini.j2 inflating: co-installer/deploy/deploy-csap/defaults/main.yml inflating: co-installer/deploy/deploy-csap/files/configs/AuthKey_X9YX8UR9BU.p8 inflating: co-installer/deploy/deploy-csap/files/configs/fcm_push_configs.json inflating: co-installer/deploy/deploy-csap/files/configs/nat-auth.conf inflating: co-installer/deploy/deploy-csap/files/docker-compose.yml inflating: co-installer/deploy/deploy-csap/tasks/main.yml inflating: co-installer/deploy/deploy-csap/templates/collaboration-credentials.json.j2 inflating: co-installer/deploy/deploy-csap/templates/collaborationsettings.json.j2 inflating: co-installer/deploy/deploy-csap/templates/config.yaml.j2 inflating: co-installer/deploy/deploy-csap/templates/csap-db-stack.yml.j2 inflating: co-installer/deploy/deploy-csap/templates/csap-stack-managed.yml.j2 inflating: co-installer/deploy/deploy-csap/templates/csap-stack.yml.j2 inflating: co-installer/deploy/deploy-csap/templates/csap.env.j2 inflating: co-installer/deploy/deploy-csap/templates/nginx.conf.j2 inflating: co-installer/deploy/deploy-csol/defaults/main.yml inflating: co-installer/deploy/deploy-csol/tasks/main.yml inflating: co-installer/deploy/deploy-csol/templates/cfg-stack.yml.j2 inflating: co-installer/deploy/deploy-csol/templates/co-migration-stack.yml.j2 inflating: co-installer/deploy/deploy-csol/templates/configservice.env.j2 inflating: co-installer/deploy/deploy-csol/templates/csol-stack.yml.j2 inflating: co-installer/deploy/deploy-csol/templates/csol.env.j2 inflating: co-installer/deploy/deploy-csol/templates/integration.env.j2 inflating: co-installer/deploy/deploy-csol/templates/sock.sh.j2 inflating: co-installer/deploy/deploy-csol/templates/tenant_config.json.j2 inflating: co-installer/deploy/deploy-db-stack/cop/broker1.yml inflating: co-installer/deploy/deploy-db-stack/cop/broker2.yml inflating: co-installer/deploy/deploy-db-stack/cop/broker3.yml inflating: co-installer/deploy/deploy-db-stack/cop/zookeeper.yml inflating: co-installer/deploy/deploy-db-stack/defaults/main.yml inflating: co-installer/deploy/deploy-db-stack/tasks/main.yml inflating: co-installer/deploy/deploy-db-stack/templates/cftr-postgres.sql.j2 inflating: co-installer/deploy/deploy-db-stack/templates/db-stack.yml.j2 inflating: co-installer/fetch-client-vars.yml inflating: co-installer/install_apps.yml inflating: co-installer/migrate-cftr-to-postgres.yml inflating: co-installer/run-setup.yml inflating: co-installer/setup-docker.yml inflating: co-installer/setup-monitoring.yml inflating: co-installer/setup/docker-network/tasks/main.yml inflating: co-installer/setup/docker-swarm/tasks/init.yml inflating: co-installer/setup/docker-swarm/tasks/main.yml inflating: co-installer/setup/docker-swarm/tasks/update.yml inflating: co-installer/setup/docker/defaults/main.yml inflating: co-installer/setup/docker/files/daemon.json inflating: co-installer/setup/docker/files/docker-8.repo inflating: co-installer/setup/docker/files/docker-9.repo inflating: co-installer/setup/docker/files/docker.repo inflating: co-installer/setup/docker/tasks/main.yml inflating: co-installer/setup/monitoring-stack/defaults/main.yml inflating: co-installer/setup/monitoring-stack/tasks/main.yml inflating: co-installer/setup/monitoring-stack/templates/filebeat.yml.dev.j2 inflating: co-installer/setup/monitoring-stack/templates/filebeat.yml.j2 inflating: co-installer/setup/monitoring-stack/templates/monitoring.yml.j2 inflating: co-installer/swarm-init.yml inflating: co-installer/test.yml inflating: co-installer/vars/co/hosts inflating: co-installer/vars/co/vars.yml
Update Hosts File
The hosts
file includes the IP addresses of the servers on which you want to deploy the Orchestrate application and database services. In a one-tier deployment architecture, enter the same server IP address in the swarm_managers and swarm_workers variables. To deploy the services in different servers, you can enter the IP addresses of the servers in the hosts
file.
To update the hosts
file, do the following:
Run the following command to open the
hosts
file:sudo vi vars/co/hosts
Update the host variables.
Save and exit.
Update Vars File
The vars.yml
file includes variables, such as base path, database passwords, and endpoints, that are needed for the Orchestrate application and database services.
To update the vars.yml
file, do the following:
Run the following command to open the
vars.yml
file:sudo vi vars/co/vars.yml
Update the respective values, such as base and log paths, database URLs and passwords, and more.
Save and exit.
Install Docker and Set up Cluster
The Orchestrate application and database services run as Docker containers. You must install Docker on all servers where you want to deploy the Orchestrate services.
To install Docker on all servers, do the following on the installer server:
Run the following command to download the Docker dependencies:
yum install https://packages.cyware.com/repository/cyware-yum-hosted/libselinux-python-2.9-2.1.module_el8.2.0+308+f56412f1.x86_64.rpm
Run the following command to install Docker and set up the cluster:
ansible-playbook -i vars/co/hosts run-setup.yml -e"client=co" -u <ssh-user>
root@ip-10-xx-xx-44 co-installer]# ansible-playbook -i vars/co/hosts run-setup.yml -e"client=co" -u centos PLAY [all] ***************************************************************************************************************************************************************************************** TASK [Gathering Facts] ***************************************************************************************************************************************************************************** ok: [10.xx.xx.44] TASK [setup/docker : Start AWS CSOL deployment] **************************************************************************************************************************************************** skipping: [10.xx.xx.44] TASK [setup/docker : Add the cyware docker repo] *************************************************************************************************************************************************** skipping: [10.xx.xx.44] TASK [setup/docker : Add the cyware docker 8 repo] ************************************************************************************************************************************************* ok: [10.xx.xx.44] TASK [setup/docker : Install the docker in the rhel/centos server] ********************************************************************************************************************************* ok: [10.xx.xx.44] TASK [setup/docker : Install the docker in the aws server] ***************************************************************************************************************************************** skipping: [10.xx.xx.44] TASK [setup/docker : Start Docker service] ********************************************************************************************************************************************************* ok: [10.xx.xx.44]
Deploy Database Stack
To deploy the Orchestrate database stack, run the following command on the installer server:
ansible-playbook -i vars/co/hosts deploy-db-stack.yml -e"client=co" -u <ssh-user>
[centos@ip-10-xx-xx-44 co-installer]$ ansible-playbook -i vars/co/hosts deploy-db-stack.yml -e"client=co" -u centos PLAY [all] ************************************************************************************************************************************************** TASK [Gathering Facts] ************************************************************************************************************************************** ok: [10.xx.xx.44] TASK [deploy/deploy-db-stack : Change ansible python interpreter to python3] ******************************************************************************** ok: [10.xx.xx.44] TASK [deploy/deploy-db-stack : Log into private registry and force re-authorization] ************************************************************************ changed: [10.xx.xx.44] TASK [deploy/deploy-db-stack : create directory if they don't exist] **************************************************************************************** changed: [10.xx.xx.44] => (item=/apps/cyware/conf) ... ... ... TASK [deploy/deploy-db-stack : Change ansible python interpreter to python3] ******************************************************************************** ok: [10.xx.xx.44] TASK [deploy/deploy-db-stack : Copy db stack file] ********************************************************************************************************** changed: [10.xx.xx.44] TASK [deploy/deploy-db-stack : Copy postgres cftr sql] ****************************************************************************************************** changed: [10.xx.xx.44] TASK [deploy/deploy-db-stack : Change ansible python interpreter to python3] ******************************************************************************** ok: [10.xx.xx.44] TASK [deploy/deploy-db-stack : Allow Connections on Port 80] ************************************************************************************************ changed: [10.xx.xx.44] TASK [deploy/deploy-db-stack : Allow Connections on Port 8080] ********************************************************************************************** changed: [10.xx.xx.44] TASK [deploy/deploy-db-stack : Allow Connections on ES PORT] ************************************************************************************************ changed: [10.xx.xx.44] TASK [deploy/deploy-db-stack : Allow Connections on ES PORT] ************************************************************************************************ changed: [10.xx.xx.44] TASK [deploy/deploy-db-stack : Allow Connections on DB PORT] ************************************************************************************************ changed: [10.xx.xx.44] TASK [deploy/deploy-db-stack : Allow Connections on Redis PORT] ********************************************************************************************* changed: [10.xx.xx.44] TASK [deploy/deploy-db-stack : Start Docker service] ******************************************************************************************************** changed: [10.xx.xx.44] TASK [deploy/deploy-db-stack : Deploy db stack from a compose file] ***************************************************************************************** changed: [10.xx.xx.44] PLAY RECAP ************************************************************************************************************************************************** 10.xx.xx.44 : ok=17 changed=13 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Deploy Orchestrate Application Stack
To deploy the Orchestrate application stack, run the following command on the installer server:
ansible-playbook -i vars/co/hosts deploy-csol.yml -e"client=co" -u <ssh-user>
root@ip-10-xx-xx-44 co-installer]# ansible-playbook -i vars/co/hosts deploy-co.yml -e"client=co" -u centos PLAY [all] ********************************************************************* TASK [Gathering Facts] ********************************************************* ok: [10.xx.xx.44] TASK [deploy/deploy-csol : Change ansible python interpreter to python3] ******* ok: [10.xx.xx.44] TASK [deploy/deploy-csol : Block EC2 metadata IP in DOCKER-USER Chain] ********* ok: [10.xx.xx.44] TASK [deploy/deploy-csol : create directory if they don't exist] *************** ok: [10.xx.xx.44] => (item=/apps/cyware/data) changed: [10.xx.xx.44] => (item=/apps/cyware/conf) ok: [10.xx.xx.44] => (item=/apps/cyware/logs/csol_integration) changed: [10.xx.xx.44] => (item=/apps/cyware/logs/csol_nginx) ok: [10.xx.xx.44] => (item=/apps/cyware/logs/csol_celery_automatic) ok: [10.xx.xx.44] => (item=/apps/cyware/logs/csol_celery_manual) ok: [10.xx.xx.44] => (item=/apps/cyware/logs/csol_celery_beat) changed: [10.xx.xx.44] => (item=/apps/cyware/logs/csol_datasyncworker) changed: [10.xx.xx.44] => (item=/apps/cyware/logs/csol) changed: [10.xx.xx.44] => (item=/apps/cyware/logs/migration) changed: [10.xx.xx.44] => (item=/apps/cyware/logs/config_service) changed: [10.xx.xx.44] => (item=/apps/cyware/shared-apps) TASK [deploy/deploy-csol : Creating an empty logs file] ************************ changed: [10.xx.xx.44] TASK [deploy/deploy-csol : Creating an empty logs file] ************************ changed: [10.xx.xx.44] TASK [deploy/deploy-csol : Change ansible python interpreter to python2] ******* ok: [10.xx.xx.44] TASK [deploy/deploy-csol : Copy csol.env] ************************************** changed: [10.xx.xx.44] TASK [deploy/deploy-csol : Copy integration.env] ******************************* changed: [10.xx.xx.44] TASK [deploy/deploy-csol : Copy configservice.env] ***************************** changed: [10.xx.xx.44] TASK [deploy/deploy-csol : Copy configservice.env] ***************************** ok: [10.xx.xx.44] TASK [deploy/deploy-csol : Copy csol stack file] ******************************* changed: [10.xx.xx.44] TASK [deploy/deploy-csol : Copy tenant config json] **************************** changed: [10.xx.xx.44] TASK [deploy/deploy-csol : Copy migration stack file] ************************** changed: [10.xx.xx.44] TASK [deploy/deploy-csol : lookup firebase secret] ***************************** ok: [10.xx.xx.44] TASK [deploy/deploy-csol : Copy hosts to file] ********************************* ok: [10.xx.xx.44] TASK [deploy/deploy-csol : lookup apns secret] ********************************* ok: [10.xx.xx.44] TASK [deploy/deploy-csol : Copy hosts to file] ********************************* ok: [10.xx.xx.44] TASK [deploy/deploy-csol : Change ansible python interpreter to python3] ******* ok: [10.xx.xx.44] TASK [deploy/deploy-csol : Remove docker stack] ******************************** changed: [10.xx.xx.44] TASK [deploy/deploy-csol : Remove docker service co_migrations] **************** changed: [10.xx.xx.44] TASK [deploy/deploy-csol : Remove config stack] ******************************** changed: [10.xx.xx.44] TASK [deploy/deploy-csol : Deploy migration stack from a compose file] ********* changed: [10.xx.xx.44] TASK [deploy/deploy-csol : Wait for migration to 3x] *************************** changed: [10.xx.xx.44] TASK [deploy/deploy-csol : debug] ********************************************** ok: [10.xx.xx.44] => { . . . } TASK [deploy/deploy-csol : Remove migration stack] ***************************** changed: [10.xx.xx.44] TASK [deploy/deploy-csol : Change ansible python interpreter to python3] ******* ok: [10.xx.xx.44] TASK [deploy/deploy-csol : Remove docker stack] ******************************** changed: [10.xx.xx.44] TASK [deploy/deploy-csol : Deploy csol stack from a compose file] ************** changed: [10.xx.xx.44] TASK [deploy/deploy-csol : Wait for services to become healthy] **************** Pausing for 90 seconds (ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort) ok: [10.xx.xx.44] TASK [deploy/deploy-csol : Copy docker sock permission script] ***************** changed: [10.xx.xx.44] TASK [deploy/deploy-csol : Add docker sock permission script to cron] ********** ok: [10.xx.xx.44] PLAY RECAP ********************************************************************* 10.xx.xx.44 : ok=32 changed=18 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0