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
-
There is an available image generated using the following procedure:
Procedure
-
Send the BOA image and the script for deployment (build_docker_environment.sh) to the deployment destination (PATH TO FOLDERS).
-
Access to the deployment destination with the user which will be shared with BOA
-
For the first deployment:
- Change user to root:
su -
- 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
- Exit from user root
- 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
- Change user to root:
su -
-
Go to the folder where the BOA image and the deployment script are
-
If there is an instance already running:
- 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
-
Stop orchestrator:
-
Access to HMI
-
Click on "Orchestrator":
-
Stop scheduler:
-
Access to HMI
-
Click on "Scheduler":
-
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
- 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
-
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
-
For the first deployment, reset BOA DDBB by following the next procedure: Reset BOA DDBB
-
If needed , start crond (health monitoring):
-
If needed , start orchestrator:
- Access to HMI
- Click on "Orchestrator":
-
If needed , start scheduler:
- Access to HMI
- Click on "Scheduler":
-
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