Skip to content

Software Update Procedure

The following chapters describe the generic update procedure for APIO Core when deployed in a Docker environment. Be sure to refer to the specific version release notes for any additional instructions or requirements related to that version.

Move to the /opt/apio_core directory and make a backup copy of the docker-compose.yml file.

[root@core-app-1 apio_core]# cd /opt/apio_core/
[root@core-app-1 apio_core]# cp docker-compose.yml docker-compose.yml.bak.20250312

Edit the docker-compose.yml file and update the tag version of the image.

...
  core:
    image: docker.bxl.netaxis.be/apio_bsft/core:2.16.0
    command: /usr/local/go/server -workflows -port=5000 -host=0.0.0.0 -cleanup -metrics
...
  scheduler:
    image: docker.bxl.netaxis.be/apio_bsft/core:2.16.0
    command: /usr/local/go/scheduler -pprof
...
  p1:
    image: docker.bxl.netaxis.be/apio_bsft/core:2.16.0
    command: /usr/local/go/server -workflows -port=5000 -host=0.0.0.0 -proxy=/api/v01/p1:bwks -runMi
gration=false
...

Stop the running containers and remove the associated volumes.

[root@core-app-1 apio_core]# docker compose down -v
[+] Running 6/6
 ✔ Container apio_core-scheduler-1  Removed                                                   17.4s
 ✔ Container apio_core-nginx-1      Removed                                                    7.1s
 ✔ Container apio_core-core-1       Removed                                                    5.7s
 ✔ Container apio_core-p1-1         Removed                                                    7.9s
 ✔ Volume apio_core_static-files    Removed                                                    0.2s
 ✔ Network apio_core_default        Removed                                                    1.6s

WARNING

It is important to use the -v argument to remove the static-files volume so that when the new application version is started, the static-files volume is created with the GUI files of the new version. No volumes should be left when running this command:

[root@core-app-1 apio_core]# docker volume ls
DRIVER    VOLUME NAME

Bring up the new services based on the updated docker-compose.yml configuration by running the following command:

.
[root@core-app-1 apio_core]# docker compose up -d
[+] Running 19/19
 ✔ core Pulled                                                                                 5.0s
 ✔ scheduler Pulled                                                                            5.0s
   ✔ 0d653a9bda6a Already exists                                                               0.0s
   ✔ 21eb2f74e859 Already exists                                                               0.0s
   ✔ 2e61b3be9aca Already exists                                                               0.0s
   ✔ 9a2c563c66ec Already exists                                                               0.0s
   ✔ a99374cf3dd8 Already exists                                                               0.1s
   ✔ b645e94f5918 Pull complete                                                                1.8s
   ✔ 02fad27dff8a Pull complete                                                                2.2s
   ✔ 2a9993a332bd Pull complete                                                                2.5s
   ✔ ce3c51fc0ba5 Pull complete                                                                2.7s
   ✔ 58d4766f3683 Pull complete                                                                2.9s
   ✔ 1a4097e04364 Pull complete                                                                3.1s
   ✔ 75363e85e348 Pull complete                                                                3.3s
   ✔ cc80d623387d Pull complete                                                                3.4s
   ✔ de1a0ece0937 Pull complete                                                                3.5s
   ✔ 6f3c096c47ec Pull complete                                                                3.5s
   ✔ 028c9e96465a Pull complete                                                                3.6s
 ✔ p1 Pulled                                                                                   5.0s
[+] Running 6/6
 ✔ Network apio_core_default        Created                                                    0.1s
 ✔ Volume "apio_core_static-files"  Created                                                    0.0s
 ✔ Container apio_core-core-1       Started                                                   23.1s
 ✔ Container apio_core-scheduler-1  Started                                                   23.1s
 ✔ Container apio_core-p1-1         Started                                                   23.1s
 ✔ Container apio_core-nginx-1      Started                                                    6.6s

Ensure that all the services are up and stable by checking the status of the containers.

[root@core-app-1 apio_core]# docker compose ps
NAME                    IMAGE                                             COMMAND                  SERVICE     CREATED          STATUS          PORTS
apio_core-core-1        docker.bxl.netaxis.be/apio_bsft/core:2.16.0-rc1   "/usr/local/go/serve…"   core        19 minutes ago   Up 19 minutes   5000/tcp, 0.0.0.0:9090->9090/tcp
apio_core-nginx-1       nginx:latest                                      "/docker-entrypoint.…"   nginx       19 minutes ago   Up 19 minutes   0.0.0.0:80->80/tcp
apio_core-p1-1          docker.bxl.netaxis.be/apio_bsft/core:2.16.0-rc1   "/usr/local/go/serve…"   p1          19 minutes ago   Up 19 minutes   5000/tcp, 9090/tcp
apio_core-scheduler-1   docker.bxl.netaxis.be/apio_bsft/core:2.16.0-rc1   "/usr/local/go/sched…"   scheduler   9 minutes ago    Up 9 minutes    5000/tcp, 9090/tcp

Check the core main service logs for the startup sequence. Look for entries related to the initialization process, including any database migration steps. If this version includes a database migration, the logs will detail the migration process and its individual steps. These logs will provide useful information on the success or failure of the migration and help identify any issues during the upgrade process.

.
Mar 13 11:07:54 rben-core-devel-1 apio_core-core-1[1102]: time=2025-03-13T10:07:54Z level=info msg=starting the server... build=20250306143508 commit_id=c6085ea74ddc6ad5fbd4630e792573167092ba60 version=2.16.0-rc
Mar 13 11:07:54 rben-core-devel-1 apio_core-core-1[1102]: time=2025-03-13T10:07:54Z level=info msg=connecting the database ...
Mar 13 11:07:54 rben-core-devel-1 apio_core-core-1[1102]: time=2025-03-13T10:07:54Z level=info msg=database connected with max 4 connection in the pool
Mar 13 11:07:54 rben-core-devel-1 apio_core-core-1[1102]: time=2025-03-13T10:07:54Z level=info msg=29/u add_index_orig_request (116.745554ms)
Mar 13 11:07:54 rben-core-devel-1 apio_core-core-1[1102]: time=2025-03-13T10:07:54Z level=info msg=database migrations applied