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.
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-8.0.0.8/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 databaseTZ
- 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 /dockervolume.MAX_ACTIVE_CONNECTIONS
- The maximum number of active DB connections that can be allocated from the connection pool at the same time. Default value is 100.MAX_IDLE_CONNECTIONS
- The maximum number of connections that should be kept in the pool at all times. Default is 100.MAX_WAIT_TIME_MILLIS
- The maximum number of milliseconds that the pool will wait when there are no available connections. Default is 30000(30 Secs).Optionally, you can add a -d to run container in background and print container ID. The -a option can also be added to view logs.
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 -e MAX_ACTIVE_CONNECTIONS=100 -e MAX_IDLE_CONNECTIONS=100 -e MAX_WAIT_TIME_MILLIS=30000 -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.
- style