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.
Setup docker volume folder and copy plugins in it from download zip.
Setup FlexDeploy Database
Pull docker image
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. Hence we need to setup Database and various Folders first.
You will need to download FlexDeploy Tomcat distribution for database scripts and plugins.
In this step, we will create plugin folder, then copy plugins from download zip in to necessary folder.
# adjust folder location as necessary for your Docker Host mkdir -p /scratch/DockerVolume/flexdeploy chmod -R 777 /scratch/DockerVolume cd /scratch/DockerVolume mkdir -p application/plugins cd application/plugins cp ~/Tomcat_Complete-6.0.0.0/application/plugins/*.jar .
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
p
- in this example 8000 is the port which FlexDeploy will be accessed on mapping to port 8080 in the containerFLEX_DB_URL
- jdbc URL for accessing the database. See below for syntaxFD_ADMIN_PWD
- Password for the fdadmin user in the databaseINFLUX_DB_USER
- Username for the built in influxdb. Not used in version 6.5.0.2 and later.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.INFLUX_DB_TOKEN
- Token used to connect to the built in influxdb. Not used in version 6.5.0.2 and later.TZ
- Time zone for the container. Given example is America/Chicago.dbtype
- if you are using postgres or oracle database.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 /dockervolumeLast 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
Syntax - jdbc:postgresql://hostname:port/flexdeploy
Example - jdbc:postgresql://dkrlp01:5432/flexdeploy
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.