In the current version, if you need to update the ecss-postgres-bdr-ssw package, do the following:
- Remove the installed ecss-postgres-bdr-ssw package using the command:
on both hosts
sudo apt remove ecss-postgres-bdr-ssw
- Stop the Docker container
on both hosts
sudo docker compose -f /srv/ecss/ecss-postgres-bdr-ssw/docker-compose.container.yml down
- Install the new version of the ecss-postgres-bdr-ssw package using the command:
on both hosts
sudo apt install ecss-postgres-bdr-ssw
Example:
Before:
dpkg -l|grep ecss-postgres ii ecss-postgres-bdr-ssw 17.1.0.55+ssw amd64 Eltex/Postgres BDR sudo docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 00b8a991de94 git.eltex.loc:4567/ecss/ecss-postgresbdr:3.17 "/docker-entrypoint.…" 2 weeks ago Up 2 hours 0.0.0.0:5439->5432/tcp, [::]:5439->5432/tcp ecss-postgres-bdr-ssw-postgres-container-1
Removing the current version of the ecss-postgres-bdr-ssw package
sudo apt remove ecss-postgres-bdr-ssw … … … Removing ecss-postgres-bdr-ssw (17.1.0.55+ssw) …
Deleting the Docker container
sudo docker compose -f /srv/ecss/ecss-postgres-bdr-ssw/docker-compose.container.yml down [+] down 1/2 ✔ Container ecss-postgres-bdr-ssw-postgres-container-1 Removed 10.8s ⠋ Network ecss-postgres-bdr-ssw_default Removing
Installing the new version of the ecss-postgres-bdr-ssw package
sudo apt install ecss-postgres-bdr-ssw … … … Unpacking ecss-postgres-bdr-ssw (17.1.0.59+ssw) … Configuring the ecss-postgres-bdr-ssw packet (17.1.0.59+ssw) … ====================== Loading Docker image ====================== Loaded image: git.eltex.loc:4567/ecss/ecss-postgresbdr:3.17 ====================== Starting Postgres DB ====================== [+] up 2/2 ✔ Network ecss-postgres-bdr-ssw_default Created 0.1s ✔ Container ecss-postgres-bdr-ssw-postgres-container-1 Created 0.2s =========================== Waiting for PostgreSQL DB =========================== Waiting for PostgreSQL (attempt 1)... Waiting for PostgreSQL (attempt 2)... Waiting for PostgreSQL (attempt 3)... Waiting for PostgreSQL (attempt 4)... Waiting for PostgreSQL (attempt 5)... ================================= Creating Postgres Exporter Role ================================= Node IP: localhost DO ALTER ROLE GRANT ================== Create databases ================== Database ecss_storekeeper_db already exists, skipping... Database web_conf already exists, skipping... Extension btree_gist already exists, skipping... Extension bdr already exists, skipping... =================== Joining BDR group =================== This node is already part of the BDR group, skipping join... ============================= Checking replication status ============================= BDR replication is configured correctly: the data matches. ======================================================= ======================================================= ecss-postgres-bdr-ssw successfully installed/updated! ======================================================= ======================================================= ┏┓┏┓┏┓┏┳┓┏┓┳┓┏┓┏┓ ┳┓┳┓┳┓ ┏┓┏┓┓ ┏ ┃┃┃┃┗┓ ┃ ┃┓┣┫┣ ┗┓ ┣┫┃┃┣┫ ┗┓┗┓┃┃┃ ┣┛┗┛┗┛ ┻ ┗┛┛┗┗┛┗┛ ┻┛┻┛┛┗ ┗┛┗┛┗┻┛
After:
dpkg -l|grep ecss-postgres ii ecss-postgres-bdr-ssw 17.1.0.59+ssw amd64 Eltex/Postgres BDR sudo docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 2a8ca5e72920 git.eltex.loc:4567/ecss/ecss-postgresbdr:3.17 "/docker-entrypoint.…" 8 minutes ago Up 8 minutes 0.0.0.0:5439->5432/tcp, [::]:5439->5432/tcp ecss-postgres-bdr-ssw-postgres-container-1