Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »

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

Manual Installation Instructions - Database Tier - Oracle

Manual Installation Instructions - Database Tier - PostgreSQL

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. This is a breaking change.

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

If installing version 6.5.0.1 or earlier you need to include the INFLUX_* variables and use /home/oracle instead of /dockervolume for the mount.

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

Example JDBC URL (FLEX_DB_URL)

  • Oracle

    • Localhost XE connection will look like this. jdbc:oracle:thin:@localhost:1521:XE

    • SID based JDBC URL Syntax - jdbc:oracle:thin:@HOSTNAME:PORT:SID

    • Service Name based JDBC URL Syntax - jdbc:oracle:thin:@//HOSTNAME:PORT/SERVICENAME

  • PostgreSQL

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

If necessary, make sure to open port 8000 for access from outside docker host.

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.

  • No labels