Manual Installation - Docker Image (Production Use)

You must have Docker Engine installed. See https://docs.docker.com/get-docker/ for information on how to do that.

Start a command session to the Docker host and make sure you can run docker commands. If necessary sudo to root or other user.

Here are main steps for this type of docker image. If you are trying to upgrade FlexDeploy for Docker, please following FlexDeploy Upgrade - Docker.

  1. Setup docker volume folder and copy plugins in it from download zip.

  2. Setup FlexDeploy Database

  3. Pull docker image

  4. Start container using specific image.

Step 1 - Setup Docker Volume Folder on Docker Host

The application, repository, and vsm folders are stored outside of the container, so when the container is upgraded that data is not lost. That folder must be created before attempting to mount it to the container.

You will need to download the FlexDeploy Tomcat distribution for database scripts and plugins. Otherwise, use the automated installer, which will do everything for you.

In this step, we will create plugin folder, then copy plugins from download zip in to necessary folder.

# as root # adjust folder location as necessary for your Docker Host mkdir -p /scratch/DockerVolume/flexdeploy mkdir -p /scratch/DockerVolume/application/plugins #Set your permissions to limit everyone access. #Currently FlexDeploy on supports running the Docker container as root. chmod -R 700 /scratch/DockerVolume # Copy the plugins into the mount so that the container will have access to them. cd /scratch/DockerVolume/application/plugins cp <unzipped Tomcat Complete Zip>/application/plugins/*.jar . # Once they are there, the container will process them. # Please don't modify the files and folders that are created in the mount, otherwise the database will not match, and the plugins page will not work properly. # The goal of the mount is a permanent place to store things across FlexDeploy upgrades.

If you need to use additional libraries or files you can place them under /scratch/DockerVolume/flexdeploy. You can then copy the necessary file from inside of the container to wherever they need to go. For example any additional libraries can go from /dockervolume to /usr/local/tomcat/libext.

Step 2 - Setup FlexDeploy Database

https://flexagon.atlassian.net/wiki/spaces/FD65/pages/10125805812

https://flexagon.atlassian.net/wiki/spaces/FD65/pages/10125805844

Step 3 - Pull Docker Image

First let's pull docker image flexdeploy/fd_tcat.

We recommend selecting a particular version instead of leaving the tag off (which will pull the latest version). That way you know exactly which version you are on.

docker pull flexdeploy/fd_tcat:VERSION

Step 4 - Run Docker Container

Now let's run FlexDeploy docker image. This particular image contains only FlexDeploy with Tomcat, i.e. database and artifact repository is not part of the container. So we need to pass various details to docker run command.

The following should be configured

  1. p - in this example 8000 is the port which FlexDeploy will be accessed on mapping to port 8080 in the container

  2. FLEX_DB_URL - jdbc URL for accessing the database. See below for syntax

  3. FD_ADMIN_PWD - Password for the fdadmin user in the database

  4. INFLUX_DB_USER - Username for the built in influxdb. Not used in version 6.5.0.2 and later.

  5. INFLUX_DB_PASSWORD - Password for the built in influxdb. Username and password are only used upon first initialization. After that token is used to connect to the database. Not used in version 6.5.0.2 and later.

  6. INFLUX_DB_TOKEN - Token used to connect to the built in influxdb. Not used in version 6.5.0.2 and later.

  7. TZ - Time zone for the container. Given example is America/Chicago.

  8. dbtype - if you are using postgres or oracle database.

  9. v - This will set where your application, repository, vsm and logs folders will go on the docker host. Everything before the colon is on the local machine, after is inside the container. Leave that as /dockervolume. It was /home/oracle until 6.0.0.7, 6.5.0.2, 7.0.0.0 FlexDeploy Docker Images, and has been changed.

  10. Last is the image which will be flexdeploy/fd_tcat: and the version you want to run.

docker run --name flexdeploy -p 8000:8080 -e FLEX_DB_URL="jdbc:oracle:thin:@URL:PORT:xe" -e FD_ADMIN_PWD=DATABASEPASSWORD -e TZ=America/Chicago -e dbtype=oracle|postgres -v /scratch/flexdeploy:/dockervolume flexdeploy/fd_tcat:VERSION

Now you can look at logs and other details in docker volume folder. For example,

Now you can launch FlexDeploy using http://<docker host>:8000/flexdeploy.

As always when you first launch FlexDeploy, you will need to complete Registration process.

Once you complete registration, you are ready to use FlexDeploy.

The following macros are not currently supported in the footer:
  • style