1.1.9 Deploy BOA image - Daniel-Brosnan-Blazquez/vboa GitHub Wiki

Introduction

This procedure covers the action to deploy a generated BOA image.

Pre-conditions

  1. There is an available image generated using the following procedure:

    Generate BOA image from packages

Procedure

  1. Send the BOA image and the script for deployment (build_docker_environment.sh) to the deployment destination (PATH TO FOLDERS).

  2. Access to the deployment destination with the user which will be shared with BOA

  3. For the first deployment:

    1. Change user to root:
su -
  1. Create needed folders:

Note: replace boa_folder with a relevant folder name and boa_user and boa_group with the relevant information of the user which will be shared with BOA.

export PATH_TO_FOLDERS=PATH TO FOLDERS
mkdir -p $PATH_TO_FOLDERS/boa_folder
mkdir $PATH_TO_FOLDERS/boa_folder/boa_ddbb
mkdir $PATH_TO_FOLDERS/boa_folder/log
mkdir $PATH_TO_FOLDERS/boa_folder/minarc_archive
mkdir $PATH_TO_FOLDERS/boa_folder/orc_ddbb
mkdir $PATH_TO_FOLDERS/boa_folder/rboa_archive
mkdir $PATH_TO_FOLDERS/boa_folder/intray_boa
chown -R boa_user:boa_group $PATH_TO_FOLDERS/boa
  1. Exit from user root
  2. Create certificates and keys:
export PATH_TO_FOLDERS=PATH TO FOLDERS
mkdir $PATH_TO_FOLDERS/boa_folder/boa_certificates_and_secret_key
openssl req -x509 -newkey rsa:4096 -nodes -out $PATH_TO_FOLDERS/boa_folder/boa_certificates_and_secret_key/boa_certificate.pem -keyout $PATH_TO_FOLDERS/boa_folder/boa_certificates_and_secret_key/boa_key.pem -subj "/[email protected]/C=SP/ST=Madrid/L=Tres Cantos/O=Elecnor Deimos/OU=Ground Segment/CN=BOA" -days 3650
python3 -c "import os; print(os.urandom(24).hex())" > $PATH_TO_FOLDERS/boa_folder/boa_certificates_and_secret_key/web_server_secret_key.txt
  1. Change user to root:
su -
  1. Go to the folder where the BOA image and the deployment script are

  2. If there is an instance already running:

    1. Stop crond (health monitoring):

Note: replace boa_app_boa with the relevant name of the BOA container already running

bash docker container exec -it -u root boa_app_boa /bin/bash pkill -f crond

  1. Stop orchestrator:

  2. Access to HMI

  3. Click on "Orchestrator":

    image

  4. Stop scheduler:

  5. Access to HMI

  6. Click on "Scheduler":

    image

  7. Verify all services have been shutdown and gunicorn is the only process running:

    Note: replace boa_app_boa with the relevant name of the BOA container already running.

docker container exec -it -u root boa_app_boa /bin/bash
ps faux

  1. Deploy the image:

Note: replace boa_folder with a relevant folder name and boa_label with a relevant label name for the containers.

export PATH_TO_FOLDERS=PATH TO FOLDERS
$PATH_TO_FOLDERS/build_docker_environment.sh -d boa.tar -i $PATH_TO_FOLDERS/boa_folder/intray_boa -b $PATH_TO_FOLDERS/boa_folder/boa_ddbb -m $PATH_TO_FOLDERS/boa_folder/minarc_archive -r $PATH_TO_FOLDERS/boa_folder/rboa_archive -s $PATH_TO_FOLDERS/boa_folder/boa_certificates_and_secret_key -p 80 -l boa_label -o $PATH_TO_FOLDERS/boa_folder/log
  1. Now, the BOA portal should be available accessing to the destination platform through https and the specified port: (for example, https://localhost:80 for a deployment in localhost)Note: by default, if no change in users.json configuration, you can use the following credentials:

    user: administrator

    password: password

  2. For the first deployment, reset BOA DDBB by following the next procedure: Reset BOA DDBB

  3. If needed , start crond (health monitoring):

  4. If needed , start orchestrator:

    1. Access to HMI
    2. Click on "Orchestrator":

    image

  5. If needed , start scheduler:

    1. Access to HMI
    2. Click on "Scheduler":

    image

  6. Verify all services have been activated:

Note: replace boa_app_boa with the relevant name of the BOA container.

docker container exec -it -u root boa_app_boa /bin/bash
ps faux