Install upgrades and patches
Akamas patches and upgrades need to be installed by following the specific instructions specified in the package provided. In case of new releases, it is recommended to read the related Release Notes.
Under normal circumstances, this usually requires the user to update the docker-compose configuration, as described in the next section.
When using docker compose to install Akamas, there’s a folder usually named
akamas
in the user home folder that contains a docker-compose.yml file. This is a YAML text file that contains a list of docker services with the URLs/version pointing to the ECR repo hosting all docker images needed to launch Akamas.Here’s an excerpt of such a docker-compose.yml file (this example contains 3 services only):
1
services:
2
#####################
3
# Database Service #
4
#####################
5
database:
6
image: 485790562880.dkr.ecr.us-east-2.amazonaws.com/akamas/master-db:1.7.0
7
container_name: database2
8
restart: always
9
command: postgres -c max_connections=200
10
11
#####################
12
# Optimizer Service #
13
#####################
14
optimizer:
15
image: 485790562880.dkr.ecr.us-east-2.amazonaws.com/akamas/optimizer_service:2.3.0
16
container_name: optimizer
17
restart: always
18
networks:
19
- akamas2
20
depends_on:
21
- database
22
volumes:
23
- /var/run/docker.sock:/var/run/docker.sock
24
- /tmp/build/engine_input:/tmp/build/engine_input
25
26
####################
27
# Campaign Service #
28
####################
29
campaign:
30
image: 485790562880.dkr.ecr.us-east-2.amazonaws.com/akamas/campaign_service:2.3.0
31
container_name: campaign
32
restart: always
33
volumes:
34
- config:/config
35
networks:
36
- akamas2
37
depends_on:
38
- database
39
- optimizer
40
- analyzer
The relevant lines that usually have to be patched during an upgrade are the lines with key "image" like:
image: 485790562880.dkr.ecr.us-east-2.amazonaws.com/akamas/master-db:1.7.0
In order to update to a new version you should replace the versions (1.7.0 or 2.3.0) after the colon with the new versions (ask your Akamas support for the correct service versions for a specific Akamas release) then you should restart Akamas with the following console commands:
First login to Akamas CLI with:
akamas login
and type username and password as in the example below
ubuntu@ak_machine:~/akamas/ $ akamas login
User: akamas
Password:
User akamas logged in. Welcome.
Now make sure you have the following AWS variables with the proper value in your Linux user environment:
AWS_DEFAULT_REGION
AWS_SECRET_ACCESS_KEY
AWS_ACCESS_KEY_ID
Then log in to AWS with the following command:
aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin 485790562880.dkr.ecr.us-east-2.amazonaws.com
Login Succeeded
Then pull all new ECR images for the new service versions you just changed (this should be done from when inside the same folder where file docker-compose.yml resides, usually
$HOME/akamas/
) with the following command:docker-compose pull
It should return an output like the following:
Pulling database ... done
Pulling optimizer ... done
Pulling elasticsearch ... done
Pulling log ... done
Pulling metrics ... done
Pulling telemetry ... done
Pulling analyzer ... done
Pulling campaign ... done
Pulling system ... done
Pulling license ... done
Pulling store ... done
Pulling airflow-db ... done
Pulling benchmark ... done
Pulling kong-database ... done
Pulling kong ... done
Pulling user-service ... done
Pulling keycloak ... done
Pulling logstash ... done
Pulling kibana ... done
Pulling kong-consumer-init ... done
Pulling kong-migration ... done
Pulling keycloak-initializer ... done
Pulling telemetry-init ... done
Pulling curator-only-pull-image ... done
Pulling airflow ... done
Pulling orchestrator ... done
Pulling akamas-init ... done
Pulling akamas-ui ... done
Pulling pg-admin ... done
Pulling grafana ... done
Pulling prometheus ... done
Pulling node-exporter ... done
Pulling cadvisor ... done
Pulling konga ... done
Finally, relaunch all services with:
docker-compose up -d
(usage example below)
ubuntu@ak_machine:~/akamas/ $ docker compose up -d
pgadmin4 is up-to-date
prometheus is up-to-date
benchmark is up-to-date
kibana is up-to-date
node-exporter is up-to-date
store is up-to-date
grafana is up-to-date
cadvisor is up-to-date
Starting telemetry-init ...
Starting curator-only-pull-image ...
Recreating database2 ...
Recreating airflow-db ...
Starting kong-initializer ...
akamas-ui is up-to-date
elasticsearch is up-to-date
Recreating kong-db ...
Recreating metrics ...
logstash is up-to-date
Recreating log ...
...(some logging follows)
Wait for a few minutes and check the Akamas services are back up by running the command:
akamas status -d
The expected output should be like the following (repeat the command after a minute or two if the last line is not "OK" as expected):
Checking Akamas services on http://localhost:8000 service status
analyzer UP
campaign UP
metrics UP
optimizer UP
orchestrator UP
system UP
telemetry UP
license UP
log UP
users UP
OK
Last modified 2mo ago