Adding Built-in Workflows to the BlueCat Gateway Container - Platform - BlueCat Gateway - 20.6.1

Gateway Administration Guide

prodname
BlueCat Gateway
version_custom
20.6.1

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/builtin folder via a cp command in the Dockerfile.

Note: Built-in workflows cannot be deleted, exported, or imported.
  1. Create a local directory for the workspace that will represent the /portal/builtin folder inside the container.
  2. 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 workspace:
  3. Add all customizations to the folder you created in the /portal/builtin folder. In the example below, a customizations subfolder is added to the folder called workspace:
  4. 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/builtin
                                    
    USER flask
    Note: 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_portal
    Note: All folders and files added to the /builtin or /bluecat_portal folders should have rwx permissions.
    Attention: If you add the configuration and permissions files to both the /portal/builtin and the bluecat_portal folders, the settings in the bluecat_portal folder are used.
  5. 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.
  6. Instantiate the container by running the docker run command using custom_image:
    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_image
    Attention: If you have built-in configurations and permissions, don't include -v <path_to_mapped_data_directory>:/bluecat_gateway/ in the command.
  7. Log in to BlueCat Gateway.
  8. 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.