Improve deployments to Production environments by first building an image in a Test environment that contains built-in workflows and all necessary data then deploy the complete container to Production. To add built-in workflows to a container, you must copy the workflows to the /portal/Built-in folder via a cp command in the Dockerfile.
- Create a local directory for the workspace that will represent the /portal/Built-in folder inside the container.
Create a subfolder for each workflow within this folder. In the example below,
a subfolder for the add alias record workflow is created within a folder called
Add all customizations to the folder you created in the
/portal/Built-in folder. In the example below, a
customizations subfolder is added to the folder called
Add all desired workflows to the subfolders.
Write the following script in a Dockerfile:
FROM quay.io/bluecat/gateway:latest USER root # you can add any other 3rd party libraries here e.g # RUN pip3 install openpyxl==2.6.2 ADD . /portal/Built-in USER flaskNote: Your file must be named Dockerfile. For more information on Dockerfiles, refer to the official Docker documentation (docs.docker.com).Note: If you want built-in configurations and permissions, you can add the configuration and permissions files to the /portal/bluecat_portal folder and add the following lines to the script:
ADD config.py /portal/bluecat_portal ADD permissions.json /portal/bluecat_portalNote: All folders and files added to the /Built-in or /bluecat_portal folders should have rwx permissions.Attention: If you add the configuration and permissions files to both the /portal/Built-in and the bluecat_portal folders, the settings in the bluecat_portal folder are used.
Create an image using a Dockerfile. Run the docker build command:
cd /tmp docker build -t <repo:tag> .An image called repo:tag is created.
Instantiate the container by running the docker run command using
docker run -d -p 80:8000 -p 443:44300 -v <path_to_mapped_data_directory>:/ bluecat_gateway/ -v <path_to_mapped_log_directory>:/logs/ -e BAM_IP=<your bam ip> --name bluecat_gateway custom_imageAttention: If you have built-in configurations and permissions, don't include -v <path_to_mapped_data_directory>:/bluecat_gateway/ in the command.
- Log in to BlueCat Gateway.
- Optional: (Perform this step only if you don't have built-in configurations and permissions). Set permissions accordingly to each workflow. Once you set permissions to each workflow, all workflows are listed in the left navigation bar.