update service release
This section explains how to update a flex service release in flex. This can happen when Dalet support asks to test a new service release to get rid of a malfunction
flex installation scripts
flex inventory
access to all flex hosts through ssh using an ssh key (you can use passwords too, please read ansible documentation for this)
If you change a service release direcly on the host this will not be recorded on deployment script and will be overriden on next deployment run. You can use this for a test/validation purpose but any permanent solution will require to be added into the deployment scripts
You need to get the IP address(es) of the flex indexelastic service. Please refer to inventory operation guide to find them
Update through the deployment scripts (highly recommenced)
Using flex collection deployment scripts
Adjusting memory requires to add the below variables into the ansible variables.yml file
dalet_flex_services_custom:
flex-streamprocessor-service:
version: 12.8.3
memory:
standard: 6G
flex_xtendadobepanel_app:
version: 2.7.111
dalet_flex_services_custom: is a fixed name. if it already exists, just continue using it. it contains one line per service to override flex-streamprocessor-service or flex-xtendadobepanel-app are service names add version: and the the requested version
- note you can add other override settings, like memory
Where:
service_name is the flex service name with _ instead of - (ex : streamprocessor-service => streamprocessor_service) version is the version number you want to install for that specific service
Addition of specific releases must be set at the begining of the file to ensure anyone accessing it can see them. prior to perform any upgrade you will have to review those values and possibly remove them is the new version includes an updated version
Once you have set the correct values to the variables.yml you have 2 more steps to complete the change
- run ansible playbook with an ansible tag to only update the docker compose file
ansible-playbook dalet.flex.flex-t docker_compose_template -D --ask-vault-pass
We recommend to firstly run the command with the option --check (dry run) to ensure modification match your requirement
Once you have updated the docker-compose file on the hosts you need to connect to the hosts using ssh and run the below command:
cd /flex
docker compose up -d
Always restart the service one by one and wait it reached the healthy state (can be seen using the docker ps command) prior to proceed with the other instances of the service
Using flex former deployment scripts
Adjusting memory requires to add the below variables into the ansible variables.yml file
flex_<service_name>_version: <version>
Where:
service_name is the flex service name with _ instead of - (ex : streamprocessor-service => streamprocessor_service) version is the version number you want to install for that specific service
Addition of specific releases must be set at the begining of the file to ensure anyone accessing it can see them. prior to perform any upgrade you will have to review those values and possibly remove them is the new version includes an updated version
Once you have set the correct values to the variables.yml you have 2 more steps to complete the change
- run ansible playbook with an ansible tag to only update the docker compose file
ansible-playbook flex.yml-t copy_docker_compose_template -D --ask-vault-pass
We recommend to firstly run the command with the option --check (dry run) to ensure modification match your requirement
Once you have updated the docker-compose file on the hosts you need to connect to the hosts using ssh and run the below command:
cd /flex
docker compose up -d
Always restart the service one by one and wait it reached the healthy state (can be seen using the docker ps command) prior to proceed with the other instances of the service
Update on the hosts
-
connect to the hosts running the service(s) through ssh. Please refer to inventory to find them
-
Edit the file
-
when using flex collection deployment scripts edit the below file
vi /flex/docker-compose.services.yml -
when using flex former deployment scripts edit the below file
vi /flex/docker-compose.yml
-
-
find the section related to the service you want to update (see example below)
flex-authorisation-service:
image: registry.opscenter.cs.dalet.cloud/flex/flex/flex-authorisation-service:10.2.39
container_name: flex-authorisation-service
<<: *flex-java-defaults
ports:
- 18124:18124
- 18224:18224
environment:
- CONSUL_TOKEN=********************
- HEAPSPACE=768m
volumes:
- /flex/certificates/pki-afp-rootca-1.crt:/flex/certificates/pki-afp-rootca-1.crt
- /flex/certificates/pki-afp-rootca-2.crt:/flex/certificates/pki-afp-rootca-2.crt
- /flex/certificates/pki-afp-rootca-3.crt:/flex/certificates/pki-afp-rootca-3.crt
- /flex/certificates/pki-afp-rootca-4.crt:/flex/certificates/pki-afp-rootca-4.crt
- /flex/certificates/pki-afp-rootca-5.crt:/flex/certificates/pki-afp-rootca-5.crt
- /flex/flex-authorisation-service/logs:/flex/logs
mem_limit: 1g
and update:
-
image replace the last 3 digits by the release you want to install (in the code snipped : 10.2.39)
-
Once completed re run the container to apply the change
cd /flex
docker compose up -d
where serviceName is the first line of the code snippet (here : flex-authorisation-service )