Full docker CS7.3 PostgreSQL + D2 4.7 installation guide

Some thoughts on this before the guide:

  • EMC Dell keeps messing the documentation. Still there are mistakes, lack of information and some misleading procedures. Anyway, with time and by trial-error method, you can set up the environment “quickly”.
  • Oh, the consistency! Dockerized D2 uses 3 containers (plus Documentum Administrator)
    • Content Server with D2 files (on CentOS)
    • D2 Config (Ubuntu)
    • D2 Client (Ubuntu)

Why they start with a CentOS and then move to Ubuntu is beyond my understanding, but I would like to know if there’s some technical reasons for this. Also, do we really need a different content server image for using D2?

  • I’m sure there are easier methods to configure everything, but well, for the “first” dockerized version we shouldn’t ask for much more…

Let’s go!

Environment

Host:
Windows 10 x64 8GB RAM
VMware Workstation Player 12

Guest:
CentOS 7 x64 25GB HD 4GB RAM 2 cores
Docker 1.12

I’ve used the same VM I created in DCTM 7.3 PostgreSQL with Docker install guide, just remember to stop the PostgreSQL and httpd services to avoid conflics.

PostgreSQL 9.6.1

You can follow the instructions in https://hub.docker.com/_/postgres/ to configure the postgres container:

  • Download the image:

[dmdocker@vm-dctm73 installers]$ docker pull postgres

  • Start the container:

[dmdocker@vm-dctm73 installers]$ docker run –name psql -p 5432:5432 -e POSTGRES_PASSWORD=dmadmin -e POSTGRES_USER=dba -v cs_db_data:/var/lib/postgresql/data -d postgres

  • Configure the user and tablespace folder:

[dmdocker@vm-dctm73 installers]$ docker exec -it psql /bin/bash
root@35d05a7640ff:/# su postgres
$ mkdir /var/lib/postgresql/data/db_d2repo_dat.dat

If you want to check if it is running, you can connect with any client such as SquirrelSQL

Content Server 7.3 + D2 files

This is similar to the “normal” content server configuration with docker:

  • Load the image:

[dmdocker@vm-dctm73 ~]$ docker load -i D2cs_Corepack_Centos.tar

  • Update environment variables:

dmdocker@vm-dctm73 ~]$ vi .bash_profile

#app server admin password
export APP_SERVER_ADMIN_PASSWORD=dmadmin
#This is install owner password
export INSTALL_OWNER_PASSWORD=dmadmin
#This is root user password
export ROOT_USER_PASSWORD=dmadmin
#Repository password. Required only for stateless configuration
export REPOSITORY_PASSWORD=dmadmin
#External Data base Server Admin password
export EXTERNALDB_ADMIN_PASSWORD=dmadmin
#Global Registry password
export BOF_REGISTRY_USER_PASSWORD=dmadmin
#AEK passphrase
export AEK_PASSPHRASE=dmadmin
export LOCKBOX_PASSPHRASE=Documentum.73

  • Update configuration files:

[dmdocker@vm-dctm73 Scripts]$ vi statelesscs.conf

###EMC Documentum on Docker
###(c) Copyright EMC Corp., 1992 – 2016
###All rights reserved.
###Version 1.0 dated 08/Sep/2016

#Documentum Content Server Image name
#Here 10.31.4.205 is Bangalore HUB.
#For PLE hub please change the ip as 10.8.46.202
#Here 7.3.0000 pointing to the latest 7.3 CS image. If we need perticular build version then just use 7.3.0000.0xxx
#Ex :  7.3.0000.0176
#Ubuntu Image:  10.31.4.205:5000/contentserver/ubuntu/stateless/cs:7.3.0000
#CentOS Image: 10.31.4.205:5000/contentserver/centos/stateless/cs:7.3.0000
#RHEL Image : 10.31.4.205:5000/contentserver/rhelora/stateless/cs:7.3.0000
IMAGE_NAME = d2cs_corepack_centos:4.7.0000.0246

#documentum License
HIGH_VOLUME_SERVER_LICENSE =
TRUSTED_LICNESE=
STORAGEAWARE_LICENSE=
XMLSTORE_LICENSE=
SNAPLOCKSTORE_LICENSE=LDNAPJEWPXQ
RPS_LICENSE=
FED_RECD_SERVICE_LICENSE=
RECORD_MANAGER_LICENSE=
PRM_LICENSE=

#Docbase configuration details
#Base machine IP
EXTERNAL_IP = 192.168.42.131

#External Data base server IP
EXTERNALDB_IP = 192.168.42.131

#External Data base Server Admin User
EXTERNALDB_ADMIN_USER = dba

#External Data base Server Port number
#Default port for postgres is 5432. Oracle is 1521
DB_SERVER_PORT=5432

#Docbase ID
DOCBASE_ID = 45321

#Docbase name
DOCBASE_NAME = d2repo

#Container host name.
CONTAINER_HOSTNAME = d2cs

#Container name.
CONTAINER_NAME = d2cs

#Conent Server port number to map in the base machine
CONTENT_SERVER_PORT= 50000
#Docbroker port number to map in the base machine
DOCBROKER_PORT =1689
#Method Server port number to map in the base machine
METHOD_SVR_PORT=9080

#App server management port
APP_SERVER_MGMNT_PORT=9084

#lockbox and aek related info
AEK_ALGORITHM = AES_256_CBC
#aek name
AEK_NAME = CSaek
#User wants to enable lock box then make it as true and provide the name and passphrase. To disable  lockbox then make it as false
ENABLE_LOCKBOX = true
LOCKBOX_FILE_NAME = lockbox.lb

#These are default values for 7.3. IF any thing is change like Jboss version or product version the change the values here
INSTALL_OWNER_USER=dmadmin
INSTALL_HOME=/opt
JBOSS=wildfly9.0.1
PRODUCT_MAJOR_VERSION=7.3

### remote data machine and docker plugin details.
#docker plugin type local,cifs,nfs etc. By default plugin is local, means the data file system is local. If you use the file system has remote then use proper plugin type and remote host details.
DOCKER_PLUGIN_TYPE=local
#Remote data machine.
EXTERNALDATA_HOST=192.168.42.131
#Data path folder which is on remote machine.You need to create a folder and share it on remote machine
REMOTE_DATA_PATH=/opt/dctmdocker/data
#Share path which is on remote machine. You need to create a folder and share it on remote machine
REMOTE_SHARE_PATH=/opt/dctmdocker/share
#If the docker plugin type is cifs then create a dmadmin user in base machine and provide the uid here. Otherwise this filed is empty.
#While starting the nethsare plugin please use  the same uid and gid as -o parameter
INSTALL_OWNER_UID=

#THUMBNAIL SERVER Configuration parameters. To enable Thumnail server make it as YES.
CONFIGURE_THUMBNAIL_SERVER = NO
THUMBNAIL_SERVER_PORT = 8081
THUMBNAIL_SERVER_SSL_PORT = 8443

[dmdocker@vm-dctm73 Scripts]$ vi statelesscs_config_compose.yml

version: ‘2’
services:
dctm_cs:
image: d2cs_corepack_centos:4.7.0000.0246
environment:
– HIGH_VOLUME_SERVER_LICENSE=
– TRUSTED_LICNESE=
– STORAGEAWARE_LICENSE=
– XMLSTORE_LICENSE=
– SNAPLOCKSTORE_LICENSE=
– RPS_LICENSE=
– FED_RECD_SERVICE_LICENSE=
– RECORD_MANAGER_LICENSE=
– PRM_LICENSE=
– ROOT_USER_PASSWORD=${ROOT_USER_PASSWORD}
– INSTALL_OWNER_PASSWORD=${INSTALL_OWNER_PASSWORD}
– INSTALL_OWNER_USER=dmadmin
– REPOSITORY_PASSWORD=${REPOSITORY_PASSWORD}
– EXTERNAL_IP=192.168.42.131
– EXTERNALDB_IP=192.168.42.131
– EXTERNALDB_ADMIN_USER=dba
– EXTERNALDB_ADMIN_PASSWORD=${EXTERNALDB_ADMIN_PASSWORD}
– DB_SERVER_PORT=5432
– DOCBASE_ID=45321
– DOCBASE_NAME=centdb
– USE_EXISTING_DATABASE_ACCOUNT=false
– INDEXSPACE_NAME=dm_repo_docbase
– BOF_REGISTRY_USER_PASSWORD=${BOF_REGISTRY_USER_PASSWORD}
– AEK_ALGORITHM=AES_256_CBC
– AEK_PASSPHRASE=${AEK_PASSPHRASE}
– AEK_NAME=CSaek
– ENABLE_LOCKBOX=true
– LOCKBOX_FILE_NAME=lockbox.lb
– LOCKBOX_PASSPHRASE=${LOCKBOX_PASSPHRASE}
– USE_EXISTING_AEK_LOCKBOX=false
– CONFIGURE_THUMBNAIL_SERVER=NO
– EXTDOCBROKERPORT=1689
– CONTENTSERVER_PORT=50000
– APP_SERVER_ADMIN_PASSWORD=${APP_SERVER_ADMIN_PASSWORD}
– INSTALL_OWNER_UID=
hostname:
“cont-d2cs”
container_name:
“d2csdocker”
ports:
– “DOCBROKER_PORT:DOCBROKER_PORT”
– “DOCBROKER_SECURE_PORT:DOCBROKER_SECURE_PORT”
– “CONTENT_SERVER_PORT:CONTENT_SERVER_PORT”
– “CONTENT_SERVER_SECURE_PORT:CONTENT_SERVER_SECURE_PORT”
– “METHOD_SVR_PORT:9080”
– “METHOD_SVR_SECURE_PORT:9082”
– “METHOD_SVR_JMX_PORT:9081”
– “THUMBNAIL_SERVER_PORT:8081”
– “THUMBNAIL_SERVER_SSL_PORT:8443”
– “APP_SERVER_MGMNT_PORT:9084”
volumes:
– DocbaseName_odbc:INSTALL_HOME/dctm/odbc
– DocbaseName_data:INSTALL_HOME/dctm/data
– DocbaseName_dba:INSTALL_HOME/dctm/dba
– DocbaseName_share:INSTALL_HOME/dctm/share
– DocbaseName_dfc:INSTALL_HOME/dctm/config
– DocbaseName_xhive_storage:INSTALL_HOME/dctm/xhive_storage
– DocbaseName_XhiveConnector:INSTALL_HOME/dctm/JBOSS/server/DctmServer_MethodServer/deployments/XhiveConnector.ear
– DocbaseName_mdserver_conf:INSTALL_HOME/dctm/mdserver_conf
– DocbaseName_mdserver_log:INSTALL_HOME/dctm/JBOSS/server/DctmServer_MethodServer/log
– DocbaseName_mdserver_logs:INSTALL_HOME/dctm/JBOSS/server/DctmServer_MethodServer/logs
– DocbaseName_Thumbnail_Server_conf:INSTALL_HOME/dctm/product/PRODUCT_MAJOR_VERSION/thumbsrv/conf
– DocbaseName_Thumbnail_Server_webinf:INSTALL_HOME/dctm/product/PRODUCT_MAJOR_VERSION/thumbsrv/container/webapps/thumbsrv/WEB-INF
– DocbaseName_ServerApps:INSTALL_HOME/dctm/wildfly9.0.1/server/DctmServer_MethodServer/deployments/ServerApps.ear
– DocbaseName_acs:INSTALL_HOME/dctm/wildfly9.0.1/server/DctmServer_MethodServer/deployments/acs.ear
– DocbaseName_mdserver_modules_emc:INSTALL_HOME/dctm/wildfly9.0.1/modules/system/layers/base/emc
– DocbaseName_opt_emc_d2:/opt/EMC/D2
privileged: true
volumes:
DocbaseName_data:
driver: DOCKER_PLUGIN_TYPE
driver_opts:
share: EXTERNALDATA_HOST/REMOTE_DATA_PATH
DocbaseName_dba:
DocbaseName_share:
driver: DOCKER_PLUGIN_TYPE
driver_opts:
share: EXTERNALDATA_HOST/REMOTE_SHARE_PATH
DocbaseName_dfc:
DocbaseName_odbc:
DocbaseName_XhiveConnector:
DocbaseName_mdserver_conf:
DocbaseName_mdserver_log:
DocbaseName_mdserver_logs:
DocbaseName_Thumbnail_Server_conf:
DocbaseName_Thumbnail_Server_webinf:
DocbaseName_xhive_storage:
DocbaseName_ServerApps:
DocbaseName_acs:
DocbaseName_mdserver_modules_emc:
DocbaseName_opt_emc_d2:

  • Run the creation script (the container will keep running with the repository started)

[dmdocker@vm-dctm73 Scripts]$ ./stateless_config.sh

DA

  • Load the image:

[dmdocker@vm-dctm73 da]$ docker load -i Documentum_Adminstrator_Centos.tar

  • Update configuration files (I’ve mapped the port used by DA to 80, so D2 can use the default 8080 and 8181, you can change this to any port you want):

[dmdocker@vm-dctm73 Scripts]$ vi statelessda_compose.yml

version: ‘2’
services:
dastateless:
image: dastatelessimage
environment:
– DOCBROKER_IP=192.168.42.131
– DOCBROKER_PORT=1689
– GLOBAL_REGISTRY_DOCBASE_NAME=d2repo
– BOF_REGISTRY_USER_PASSWORD=dmadmin
– CRYPTO_REGISTRY_DOCBASE_NAME=d2repo
– PRESETS_PREFERENCES_USER_PASSWORD=webtop
– APPSERVER_PORT=8080
– DFC_SESSION_SECURE_CONNECT_DEFAULT=try_native_first
container_name:
“da”
ports:
– “80:8080”
volumes:
– dalogs:/opt/tomcat/logs
– dacustom:/opt/tomcat/webapps/da/custom
privileged: true
volumes:
dalogs:
dacustom:

[dmdocker@vm-dctm73 Scripts]$ vi statelessda.conf

DOCBROKER_IP = 192.168.42.131
DOCBROKER_PORT = 1689
GLOBAL_REGISTRY_DOCBASE_NAME = d2repo
BOF_REGISTRY_USER_PASSWORD = dmadmin
CRYPTO_REGISTRY_DOCBASE_NAME = d2repo
PRESETS_PREFERENCES_USER_PASSWORD = webtop
IMAGE_NAME = da_centos:7.3.0000.0074
CONTAINER_HOSTNAME = dastatelessimage
APPSERVER_PORT = 8080
DFC_SESSION_SECURE_CONNECT_DEFAULT = try_native_first

  • Run the configuration script:

[dmdocker@vm-dctm73 Scripts]$ ./statelessda_config.sh

And you should be able to access DA in http://<your_vm_ip/da

D2 Config

  • Update provided dfc.properties in Config folder:

dfc.data.dir=/home/root/dctm
dfc.tokenstorage.dir=/home/root/dctm/apptoken
dfc.tokenstorage.enable=false
dfc.docbroker.host[0]=cont-d2cs
dfc.docbroker.port[0]=1489
dfc.docbroker.host[1]=cont-d2cs
dfc.docbroker.port[1]=1689
dfc.crypto.repository=d2repo
dfc.session.secure_connect_default=try_native_first
dfc.globalregistry.repository=d2repo
dfc.globalregistry.username=dm_bof_registry
dfc.globalregistry.password=AAAAEKirNMA6wt15JG4eDkp2cZ39euSH+HZGKgH+x3j7H4dK

  • Load the image:

[dmdocker@vm-dctm73 d2-config]$ docker load -i D2config_Corepack_Ubuntu.tar

  • Create a volume to store the log files:

[dmdocker@vm-dctm73 d2-config]$ docker volume create –name=d2configlogs

  • Start a container with the following command:

[dmdocker@vm-dctm73 Configfiles]$ docker run -h d2config –name d2config -d -v /opt/dctmdocker/installers/d2-config/Configfiles:/usr/local/tomcat/CustomConf -v d2configlogs:/usr/local/tomcat/webapps/D2-Config/logs -ti –add-host cont-d2cs:192.168.42.131 -p 8181:8080 d2config_corepack_ubuntu:4.7.0000.0246

Now we need to add the D2 Config instance to the privileged clients list, so if you don’t have Java in the machine, install it:

[dmdocker@vm-dctm73 Configfiles]$ sudo yum install java-1.8.0-openjdk

  • Get the keystore info:

[dmdocker@vm-dctm73 Configfiles]$ keytool -list -keystore dfc.keystore -storepass dfc -v

The line you want is the one that starts with “Owner”:

Owner: CN=dfc_K26safmZbYRvAPA6Q2XkHBGvOZQa, O=EMC, OU=Documentum

Now, go to DA, Client Rights Management, Privileged clients, Manage Clients, add the DFC instance to the privileged client list and then approve the client.

Now you should be able to access D2-Config in http://<your_vm_ip&gt;:8181/D2-Config

D2 Client

This exactly the same procedure described for D2 Config:

  • Update provided dfc.properties in Config folder

dfc.data.dir=/home/root/dctm
dfc.tokenstorage.dir=/home/root/dctm/apptoken
dfc.tokenstorage.enable=false
dfc.docbroker.host[0]=cont-d2cs
dfc.docbroker.port[0]=1489
dfc.docbroker.host[1]=cont-d2cs
dfc.docbroker.port[1]=1689
dfc.crypto.repository=d2repo
dfc.session.secure_connect_default=try_native_first
dfc.globalregistry.repository=d2repo
dfc.globalregistry.username=dm_bof_registry
dfc.globalregistry.password=AAAAEKirNMA6wt15JG4eDkp2cZ39euSH+HZGKgH+x3j7H4dK

  • Load the image:

[dmdocker@vm-dctm73 d2-client]$ docker load -i D2client_Corepack_Ubuntu.tar

  • Create a volume to store the log files:

[dmdocker@vm-dctm73 d2-client]$ docker volume create –name=d2clientlogs

  • Start a container with the following command:

[dmdocker@vm-dctm73 Configfiles]$ docker run -h d2client –name d2client -d -v /opt/dctmdocker/installers/d2-client/Configfiles:/usr/local/tomcat/CustomConf -v d2clientlogs:/usr/local/tomcat/webapps/D2/logs -ti –add-host cont-d2cs:192.168.42.131 -p 8080:8080 d2client_corepack_ubuntu:4.7.0000.0246

  • Get the keystore info:

[dmdocker@vm-dctm73 Configfiles]$ keytool -list -keystore dfc.keystore -storepass dfc -v

Again, get the owner info:

Owner: CN=dfc_nwacq6MGbSWEGIYstBDnukYIYWUa, O=EMC, OU=Documentum

Now, go to DA, Client Rights Management, Privileged clients, Manage Clients, add the DFC instance to the privileged client list and then approve the client.

Now you should be able to access D2 in http://<your_vm_ip&gt;:8080/D2, and a full docker Documentum environtment.

DCTM 7.3 PostgreSQL with Docker install guide

This is a step-by-step guide to install Documentum 7.3 with Docker in a Linux host with PostgreSQL 9.4.

Environment

Host:
Windows 10 x64 8GB RAM
VMware Workstation Player 12

Guest:
CentOS 7 x64 25GB HD 4GB RAM 2 cores
PostgreSQL 9.4
Docker 1.12
Documentum 7.3 PostgreSQL docker tar file

VM Creation

Mount the CentOS 7 DVD image, boot the machine and follow the steps. You can choose to let EasyInstall do the work for you. I used minimal package install to save resources, named the machine vm-dctm73, configure the network and set the root password.

OS Configuration

Follow the instructions posted in the DCTM 7.3 PostgreSQL Dev. Edition post for configuring the OS and PostgreSQL 9.4 (no need to configure the ODBC, just install PostgreSQL and phpPgAdmin). This time I’ve used “dmdocker” instead of “dmadmin”.

Extra steps to perform:

  • Create the following folder structure:

[dmdocker@vm-dctm73 ~]$ sudo mkdir /opt/dctmdocker
[dmdocker@vm-dctm73 ~]$ sudo chown dmdocker.dmdocker /opt/dctmdocker
[dmdocker@vm-dctm73 ~]$ mkdir /opt/dctmdocker/installers
[dmdocker@vm-dctm73 ~]$ mkdir /opt/dctmdocker/data
[dmdocker@vm-dctm73 ~]$ mkdir /opt/dctmdocker/share

  • Update the distribution (you need at least kernel 3.10.0.229, you can check the version by running “uname -r”)

[dmdocker@vm-dctm73 ~]$ sudo yum update

  • Enable connections from 172.18.x.x to the database (IP used by docker containers, you can set this up after you run a docker contanier and know which IP range will be using, or you can enable access for anyone):

[dmadmin@vm-dctm73 opt]$ sudo vi /var/lib/pgsql/9.4/data/pg_hba.conf
host    all             all             172.18.0.1/24           md5
[dmadmin@vm-dctm73 opt]$ sudo systemctl restart postgresql-9.4

And don’t forget to copy the Documentum 7.3 docker tar file to /opt/dctmdocker/installers

Docker Configuration

  • Install docker:

[dmdocker@vm-dctm73 ~]$ curl -fsSL https://get.docker.com/ | sh

  • I had to remove docker selinux due to incompatibily problems so:

[dmdocker@vm-dctm73 ~]$ yum remove docker-engine-selinux

  • Add user to docker group to avoid using sudo every time we use the docker command:

[dmdocker@vm-dctm73 ~]$ sudo usermod -aG docker dmdocker

  • Enable the service and start docker daemon:

[dmdocker@vm-dctm73 ~]$ sudo systemctl enable docker.service
[dmdocker@vm-dctm73 ~]$ sudo systemctl start docker

  • Check docker is correctly installed by running the hello-world container:

[dmdocker@vm-dctm73 ~]$ docker run –rm hello-world

  • Install docker-compose (using root):

[root@vm-dctm73 ~]# curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
[root@vm-dctm73 ~]# chmod +x /usr/local/bin/docker-compose

Content Server Configuration

  • Import the docker image:

[dmdocker@vm-dctm73 installers]$ docker load -i Contentserver_Centos.tar

  • Check the image is listed now in the local docker repository:

[dmdocker@vm-dctm73 ~]$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
contentserver_centos    7.3.0000.0214        5a22b41bc55f        10 seconds ago      2.252 GB
hello-world         latest              c54a2cc56cbb        5 months ago        1.848 kB

  • Create the tablespace file:

[dmdocker@vm-dctm73 cs]$ su –
[root@vm-dctm73 ~]# su – postgres
-bash-4.2$ mkdir /var/lib/pgsql/9.4/data/db_centdb_dat.dat

  • Configure the required environment variables (remember that lockbox passphrase requires at least one uppercase letter, one symbol and one number):

[dmdocker@vm-dctm73 ~]$ vi .bash_profile

#app server admin password
export APP_SERVER_ADMIN_PASSWORD=dmadmin
#This is install owner password
export INSTALL_OWNER_PASSWORD=dmadmin
#This is root user password
export ROOT_USER_PASSWORD=dmadmin
#Repository password. Required only for stateless configuration
export REPOSITORY_PASSWORD=dmadmin
#External Data base Server Admin password
export EXTERNALDB_ADMIN_PASSWORD=dmadmin
#Global Registry password
export BOF_REGISTRY_USER_PASSWORD=dmadmin
#AEK passphrase
export AEK_PASSPHRASE=dmadmin
export LOCKBOX_PASSPHRASE=Documentum.73

  • Configure statelesscs.conf. Few notes:
    • Change IMAGE_NAME to the name of your image in your docker repository.
    • IP here is the IP of the virtual machine (CentOS) because our database is installed in the host.
    • ENABLE_LOCKBOX=false doesn’t work. It didn’t work for me when I did the (Unofficial) D7.2 Developer Docker edition (I) and it still doesn’t work. It’s probably a misconfiguration of the installer though.

[dmdocker@vm-dctm73 ~]$ vi /opt/dctmdocker/installers/Scripts/statelesscs.conf

###EMC Documentum on Docker
###(c) Copyright EMC Corp., 1992 – 2016
###All rights reserved.
###Version 1.0 dated 08/Sep/2016

#Documentum Content Server Image name
#Here 10.31.4.205 is Bangalore HUB.
#For PLE hub please change the ip as 10.8.46.202
#Here 7.3.0000 pointing to the latest 7.3 CS image. If we need perticular build version then just use 7.3.0000.0xxx
#Ex :  7.3.0000.0176
#Ubuntu Image:  10.31.4.205:5000/contentserver/ubuntu/stateless/cs:7.3.0000
#CentOS Image: 10.31.4.205:5000/contentserver/centos/stateless/cs:7.3.0000
#RHEL Image : 10.31.4.205:5000/contentserver/rhelora/stateless/cs:7.3.0000
IMAGE_NAME = contentserver_centos:7.3.0000.0214

#documentum License
HIGH_VOLUME_SERVER_LICENSE =
TRUSTED_LICNESE=
STORAGEAWARE_LICENSE=
XMLSTORE_LICENSE=
SNAPLOCKSTORE_LICENSE=LDNAPJEWPXQ
RPS_LICENSE=
FED_RECD_SERVICE_LICENSE=
RECORD_MANAGER_LICENSE=
PRM_LICENSE=

#Docbase configuration details
#Base machine IP
EXTERNAL_IP = 192.168.42.131

#External Data base server IP
EXTERNALDB_IP = 192.168.42.131

#External Data base Server Admin User
EXTERNALDB_ADMIN_USER = postgres

#External Data base Server Port number
#Default port for postgres is 5432. Oracle is 1521
DB_SERVER_PORT=5432

#Docbase ID
DOCBASE_ID = 45321

#Docbase name
DOCBASE_NAME = centdb

#Container host name.
CONTAINER_HOSTNAME = centstateless

#Container name.
CONTAINER_NAME = centstateless

#Conent Server port number to map in the base machine
CONTENT_SERVER_PORT= 50000
#Docbroker port number to map in the base machine
DOCBROKER_PORT =1689
#Method Server port number to map in the base machine
METHOD_SVR_PORT=9080

#App server management port
APP_SERVER_MGMNT_PORT=9084

#lockbox and aek related info
AEK_ALGORITHM = AES_256_CBC
#aek name
AEK_NAME = CSaek
#User wants to enable lock box then make it as true and provide the name and passphrase. To disable  lockbox then make it as false
ENABLE_LOCKBOX = true
LOCKBOX_FILE_NAME = lockbox.lb

#These are default values for 7.3. IF any thing is change like Jboss version or product version the change the values here
INSTALL_OWNER_USER=dmadmin
INSTALL_HOME=/opt
JBOSS=wildfly9.0.1
PRODUCT_MAJOR_VERSION=7.3

### remote data machine and docker plugin details.
#docker plugin type local,cifs,nfs etc. By default plugin is local, means the data file system is local. If you use the file system has remote then use proper plugin type and remote host details.
DOCKER_PLUGIN_TYPE=local
#Remote data machine.
EXTERNALDATA_HOST=192.168.42.131
#Data path folder which is on remote machine.You need to create a folder and share it on remote machine
REMOTE_DATA_PATH=/opt/dctmdocker/data
#Share path which is on remote machine. You need to create a folder and share it on remote machine
REMOTE_SHARE_PATH=/opt/dctmdocker/share
#If the docker plugin type is cifs then create a dmadmin user in base machine and provide the uid here. Otherwise this filed is empty.
#While starting the nethsare plugin please use  the same uid and gid as -o parameter
INSTALL_OWNER_UID=

#THUMBNAIL SERVER Configuration parameters. To enable Thumnail server make it as YES.
CONFIGURE_THUMBNAIL_SERVER = NO
THUMBNAIL_SERVER_PORT = 8081
THUMBNAIL_SERVER_SSL_PORT = 8443

  • Configure statelesscs_config_compose.yml:

[dmdocker@vm-dctm73 ~]$ vi /opt/dctmdocker/installers/Scripts/statelesscs_config_compose.yml

version: ‘2’
services:
dctm_cs:
image: contentserver_centos:7.3.0000.0214
environment:
– HIGH_VOLUME_SERVER_LICENSE=
– TRUSTED_LICNESE=
– STORAGEAWARE_LICENSE=
– XMLSTORE_LICENSE=
– SNAPLOCKSTORE_LICENSE=
– RPS_LICENSE=
– FED_RECD_SERVICE_LICENSE=
– RECORD_MANAGER_LICENSE=
– PRM_LICENSE=
– ROOT_USER_PASSWORD=${ROOT_USER_PASSWORD}
– INSTALL_OWNER_PASSWORD=${INSTALL_OWNER_PASSWORD}
– INSTALL_OWNER_USER=dmadmin
– REPOSITORY_PASSWORD=${REPOSITORY_PASSWORD}
– EXTERNAL_IP=192.168.42.131
– EXTERNALDB_IP=192.168.42.131
– EXTERNALDB_ADMIN_USER=postgres
– EXTERNALDB_ADMIN_PASSWORD=${EXTERNALDB_ADMIN_PASSWORD}
– DB_SERVER_PORT=5432
– DOCBASE_ID=45321
– DOCBASE_NAME=centdb
– USE_EXISTING_DATABASE_ACCOUNT=false
– INDEXSPACE_NAME=dm_repo_docbase
– BOF_REGISTRY_USER_PASSWORD=${BOF_REGISTRY_USER_PASSWORD}
– AEK_ALGORITHM=AES_256_CBC
– AEK_PASSPHRASE=${AEK_PASSPHRASE}
– AEK_NAME=CSaek
– ENABLE_LOCKBOX=true
– LOCKBOX_FILE_NAME=lockbox.lb
– LOCKBOX_PASSPHRASE=${LOCKBOX_PASSPHRASE}
– USE_EXISTING_AEK_LOCKBOX=false
– CONFIGURE_THUMBNAIL_SERVER=NO
– EXTDOCBROKERPORT=1689
– CONTENTSERVER_PORT=50000
– APP_SERVER_ADMIN_PASSWORD=${APP_SERVER_ADMIN_PASSWORD}
– INSTALL_OWNER_UID=1001
hostname:
“cont-dctm73”
container_name:
“dctm73docker”
ports:
– “DOCBROKER_PORT:DOCBROKER_PORT”
– “DOCBROKER_SECURE_PORT:DOCBROKER_SECURE_PORT”
– “CONTENT_SERVER_PORT:CONTENT_SERVER_PORT”
– “CONTENT_SERVER_SECURE_PORT:CONTENT_SERVER_SECURE_PORT”
– “METHOD_SVR_PORT:9080”
– “METHOD_SVR_SECURE_PORT:9082”
– “METHOD_SVR_JMX_PORT:9081”
– “THUMBNAIL_SERVER_PORT:8081”
– “THUMBNAIL_SERVER_SSL_PORT:8443”
– “APP_SERVER_MGMNT_PORT:9084”
volumes:
– DocbaseName_odbc:INSTALL_HOME/dctm/odbc
– DocbaseName_data:INSTALL_HOME/dctm/data
– DocbaseName_dba:INSTALL_HOME/dctm/dba
– DocbaseName_share:INSTALL_HOME/dctm/share
– DocbaseName_dfc:INSTALL_HOME/dctm/config
– DocbaseName_xhive_storage:INSTALL_HOME/dctm/xhive_storage
– DocbaseName_XhiveConnector:INSTALL_HOME/dctm/JBOSS/server/DctmServer_MethodServer/deployments/XhiveConnector.ear
– DocbaseName_mdserver_conf:INSTALL_HOME/dctm/mdserver_conf
– DocbaseName_mdserver_log:INSTALL_HOME/dctm/JBOSS/server/DctmServer_MethodServer/log
– DocbaseName_mdserver_logs:INSTALL_HOME/dctm/JBOSS/server/DctmServer_MethodServer/logs
– DocbaseName_Thumbnail_Server_conf:INSTALL_HOME/dctm/product/PRODUCT_MAJOR_VERSION/thumbsrv/conf
– DocbaseName_Thumbnail_Server_webinf:INSTALL_HOME/dctm/product/PRODUCT_MAJOR_VERSION/thumbsrv/container/webapps/thumbsrv/WEB-INF
privileged: true
volumes:
DocbaseName_data:
driver: DOCKER_PLUGIN_TYPE
driver_opts:
share: EXTERNALDATA_HOST/REMOTE_DATA_PATH
DocbaseName_dba:
DocbaseName_share:
driver: DOCKER_PLUGIN_TYPE
driver_opts:
share: EXTERNALDATA_HOST/REMOTE_SHARE_PATH
DocbaseName_dfc:
DocbaseName_odbc:
DocbaseName_XhiveConnector:
DocbaseName_mdserver_conf:
DocbaseName_mdserver_log:
DocbaseName_mdserver_logs:
DocbaseName_Thumbnail_Server_conf:
DocbaseName_Thumbnail_Server_webinf:
DocbaseName_xhive_storage:

  • Run the configuration script:

[dmdocker@vm-dctm73 ~]$ cd /opt/dctmdocker/installers/Scripts/
[dmdocker@vm-dctm73 Scripts]$ chmod 755 stateless_config.sh
[dmdocker@vm-dctm73 Scripts]$ ./stateless_config.sh

  • Now you can get a terminal from the container:

[dmdocker@vm-dctm73 Scripts]$ docker exec -i -t dctm73docker /bin/bash

And check the progress of the installation in /opt/dctm_docker/logs/centstateless/cont-dctm73.log

If anything fails and you need to run the script again, make sure the created volumes (docker volume ls) are removed before running again the script or the installer will fail.

(Unofficial) D7.2 Developer Docker edition (II)

In this post I’ll explain how to move from the full environment in a single image/container described in the previous post ((Unofficial) D7.2 Developer Docker edition (I)) to a multi-image/container environment. As I said in the previous post, if you want to set up a complete environment you better check the existing guides (GitHub – jppop/dctm-docker: Documentum running in containers, dctm/docker at master · andreybpanfilov/dctm · GitHub) instead of this one

Database:

This is the easiest part, as the Dockerfile is exactly the same we used previously to set up the database:

FROM centos
RUN echo root:root | chpasswd

RUN yum install -y passwd sudo tail vi libaio bc initscripts net-tools libXp.x86_64 libXp.i686 libXi.i686 libXtst.i686 libXt.i686 glibc.i686 libgcc.i686 libstdc++.i686 libaio.i686; \
yum clean all

RUN mkdir -p /run/lock/subsys

ADD db/oracle-xe-11.2.0-1.0.x86_64.rpm /tmp/
RUN yum localinstall -y /tmp/oracle-xe-11.2.0-1.0.x86_64.rpm; \
rm -rf /tmp/oracle-xe-11.2.0-1.0.x86_64.rpm

ADD db/config/xe.rsp db/config/init.ora db/config/initXETemp.ora /u01/app/oracle/product/11.2.0/xe/config/scripts/
RUN chown oracle:dba /u01/app/oracle/product/11.2.0/xe/config/scripts/*.ora \
/u01/app/oracle/product/11.2.0/xe/config/scripts/xe.rsp
RUN chmod 755 /u01/app/oracle/product/11.2.0/xe/config/scripts/*.ora \
/u01/app/oracle/product/11.2.0/xe/config/scripts/xe.rsp
ENV ORACLE_HOME /u01/app/oracle/product/11.2.0/xe
ENV ORACLE_SID XE
ENV PATH $ORACLE_HOME/bin:$PATH

RUN /etc/init.d/oracle-xe configure responseFile=/u01/app/oracle/product/11.2.0/xe/config/scripts/xe.rsp

RUN echo oracle:oracle | chpasswd

RUN mkdir /u01/app/oracle/product/11.2.0/xe/lib32; \
chown oracle:dba /u01/app/oracle/product/11.2.0/xe/lib32

ADD db/instantclient_11_2/lib* /u01/app/oracle/product/11.2.0/xe/lib32/

RUN ln -s /u01/app/oracle/product/11.2.0/xe/lib32/libclntsh.so.11.1 /u01/app/oracle/product/11.2.0/xe/lib32/libclntsh.so; \
ln -s /u01/app/oracle/product/11.2.0/xe/lib32/libocci.so.11.1 /u01/app/oracle/product/11.2.0/xe/lib32/libocci.so; \
chown -h oracle:dba /u01/app/oracle/product/11.2.0/xe/lib32/*; \
chown -h oracle:dba /u01/app/oracle/product/11.2.0/xe/lib32/libclntsh.so; \
chown -h oracle:dba /u01/app/oracle/product/11.2.0/xe/lib32/libocci.so

ADD db/config/startdb.sh /

EXPOSE 1521

CMD /startdb.sh ; bash

Then build the image:

docker build -t database .

Now we can run the image by running:

docker run -dit -p 1521:1521 db

which will run the container as a daemon publishing the port 1521 so we can connect from another container.

Content Server / Repository:

This needs extra work from the previous setup. First, we need to install the oracle client:

FROM centos

RUN echo root:root | chpasswd

RUN yum install -y libaio sudo tail vi openssh-server; \
yum clean all; \
sed -i ‘s/PermitRootLogin without-password/PermitRootLogin yes/’ /etc/ssh/sshd_config; \
sed ‘s@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g’ -i /etc/pam.d/sshd

ADD db/install/oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm /tmp/oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm
ADD db/install/oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm /tmp/oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm

RUN rpm -ivh /tmp/oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm /tmp/oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm; \
rm /tmp/oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm; \
rm /tmp/oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm

Now, let’s install CS:

Create the dmadmin user:

RUN useradd dmadmin; \
passwd -f -u dmadmin; \
mkdir -p /home/dmadmin/.ssh; chown dmadmin /home/dmadmin/.ssh; chmod 700 /home/dmadmin/.ssh; \
echo “dmadmin ALL=(ALL) ALL” >> /etc/sudoers.d/dmadmin; \
sed -i -e ‘s/Defaults requiretty.*/ #Defaults requiretty/g’ /etc/sudoers

Create folder structure:

RUN mkdir /opt/documentum; \
mkdir /opt/documentum/product; \
mkdir /opt/documentum/product/7.2; \
mkdir /opt/documentum/install; \
mkdir /opt/documentum/db; \
chown -R dmadmin:dmadmin /opt/documentum

Copy files, including a new config.properties containing the setup of an additional docbroker (we need this to do the IP translation so external machines can connect to the repository):

ADD cs/install/* /opt/documentum/install/
ADD cs/config/installProperties.properties /opt/documentum/install/
ADD cs/config/configProperties.properties /opt/documentum/install/
ADD cs/config/configPropertiesDoc.properties /opt/documentum/install/

Preinstallation checks:

RUN echo “#dctm services” >> /etc/services ; \
echo “dctm72 49001/tcp # 7.2 Repository native connection” >> /etc/services ; \
echo “dctm72_s 49002/tcp # 7.2 Repository secure connection” >> /etc/services ; \
ln /usr/lib64/libsasl2.so.3 /usr/lib64/libsasl2.so.2; \
ln -s /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1 /usr/lib/oracle/11.2/client64/lib/libclntsh.so; \
ln -s /usr/lib/oracle/11.2/client64/lib/libocci.so.11.1 /usr/lib/oracle/11.2/client64/lib/libocci.so; \
chown -R dmadmin:dmadmin /opt/documentum/install; \
chmod u+x /opt/documentum/install/serverSetup.bin

ENV DOCUMENTUM /opt/documentum
ENV DM_HOME $DOCUMENTUM/product/7.2
ENV LC_ALL C
ENV JAVA_HOME /opt/documentum/java64/1.7.0_72
ENV ORACLE_HOME /usr/lib/oracle/11.2/client64
ENV ORACLE_SID XE
ENV PATH $ORACLE_HOME/bin:$DM_HOME/bin:$PATH
ENV NLS_LANG AMERICAN_AMERICA.AL32UTF8
ENV LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib:$DM_HOME/bin/FIPS/:$JAVA_HOME/jre/lib/amd64/server:$DM_HOME/bin:$LD_LIBRARY_PATH
ENV PATH=/usr/lib/oracle/11.2/client64/bin:$PATH
ENV TNS_ADMIN=/opt/documentum/db

And run the silent install:

RUN $DOCUMENTUM/install/serverSetup.bin -f installProperties.properties

Now that the content server is installed, we need to create a repository. We’ll need to use a tnsnames.ora pointing to our running database container. In this case I’m hadrdcoding the docker virtual machine IP for the installation, however, fix_tnsnames.sh takes an environment variable (defined in the docker run command) and updates the file so the container can connect to the database if the IP changes:

ENV DBHOST 192.168.99.100
ADD db/config/tnsnames.ora /opt/documentum/db/
ADD db/config/fix_tnsnames.sh /opt/documentum/

The dmdbtest “patch”:

RUN /opt/documentum/fix_tnsnames.sh; \
mv $DM_HOME/bin/dmdbtest $DM_HOME/bin/dmdbtest.bak; \
echo “exit 0” >> $DM_HOME/bin/dmdbtest; \
chmod u+x $DM_HOME/bin/dmdbtest

And run the docbrokers/repository configuration:

RUN sed -i “/SERVER.PROJECTED_DOCBROKER_HOST/cSERVER.PROJECTED_DOCBROKER_HOST=$HOSTNAME” /opt/documentum/install/configProperties.properties; \
sed -i “/SERVER.SMTP_SERVER_NAME/cSERVER.SMTP_SERVER_NAME=$HOSTNAME” /opt/documentum/install/configProperties.properties; \
sed -i “/SERVER.FQDN/cSERVER.FQDN=$HOSTNAME” /opt/documentum/install/configProperties.properties; \
/opt/documentum/product/7.2/install/dm_launch_server_config_program.sh -f /opt/documentum/install/configPropertiesDoc.properties; \
/opt/documentum/product/7.2/install/dm_launch_server_config_program.sh -f /opt/documentum/install/configProperties.properties

Final touches:

EXPOSE 22 1489 1492 49001 49002
ADD cs/config/startup-dctm.sh /opt/documentum/startup-dctm.sh
CMD /opt/documentum/fix_tnsnames.sh; /opt/documentum/startup-dctm.sh ; bash

startup-dctm.sh should:

  • Update server.ini host and projection target 1 for the additional docbroker.
  • Update dfc.properties with the right hostname
  • Delete dfc.keystore
  • Run dm_crypto_boot
  • Add the IP translation section to DocbrokerExt.ini
  • Update dfc.properties with both dockbrokers
  • Launch docbroker services (using -init_file for our additional docbroker)
  • Run JMS
  • Start repository.

Now we just have to build the image:

docker build -t dctm72 .

and run it:

docker run -dit -p 1489:1489 -p 1492:1492 -p 49001:49001 -p 49002:49002 –env DBHOST=192.168.99.100 dctm

Application Server

Finally, let’s build the application server image (quite self-explanatory):

FROM centos
ADD install/apache-tomcat-8.0.14.tar.gz /opt/

RUN mv /opt/apache-tomcat-8.0.14 /opt/tomcat

RUN yum install -y unzip; \
yum clean all

ADD install/da.war /opt/tomcat/webapps/
RUN unzip /opt/tomcat/webapps/da.war -d /opt/tomcat/webapps/da; \
sed -i “/<compression_filter_enabled>true</compression_filter_enabled>/c<compression_filter_enabled>false</compression_filter_enabled>” /opt/tomcat/webapps/da/wdk/app.xml; \
rm /opt/tomcat/webapps/da.war
ADD config/catalina.properties /opt/tomcat/conf/
ADD config/context.xml /opt/tomcat/conf/
ADD config/server.xml /opt/tomcat/conf/
ADD config/web.xml /opt/tomcat/conf/
ADD config/catalina.sh /opt/tomcat/bin/
ADD config/starttomcat.sh /opt/tomcat/bin/

ADD install/jdk-8u91-linux-x64.tar.gz /opt/
EXPOSE 8080
CMD /opt/tomcat/bin/starttomcat.sh ; bash

starttomcat.sh will simply update da/WEB-INF/classes/dfc.properties with the right CS host/port

So let’s build the image:

docker build -t appserver .

And run it with:

docker run -dit -p 8080:8080 –env CSHOST=192.168.99.100 –env CSPORT=1492 tomcat

And if everything worked fine, you’ll have 3 containers running the same Documentum environment we had previously running in a single container.

(Unofficial) D7.2 Developer Docker edition (I)

I was playing around with Docker (well, with Docker toolbox for Windows…) and decided to give this a go. The following post contains instructions on how to build a single image hosting a similar environment to the previously posted (Unofficial) D7.2 Developer Edition.

This is not the cleanest, nor more elegant solution, so I wouldn’t use this for anything else than testing/learning purposes. If you want something more “professional” you should check the existing guides/scripts to build a documentum environment using docker: xCP dockerized environment (GitHub – jppop/dctm-docker: Documentum running in containers) and docker-dctm (dctm/docker at master · andreybpanfilov/dctm · GitHub) by PanfilovAB

So here we go:

Step 1: Install docker-toolbox

Well, simply run the installer, next, next, next, Finish. Just be sure to check the option to install the NDIS5 driver. The docker toolbox for Windows installs Oracle VirtualBox and has a headless vbox running a base *nix image (boot2docker) designed to run containers (there’s is a beta docker for Windows 10 enterprise that works directaly against MS HyperV without an intermediate virtualization software).

Step 2: Get a “more suitable” default docker machine

Default docker vm has 1gb ram, so we’ll delete it:

docker-machine rm default

And create a new one with 4g RAM and using 2 cpus

docker-machine create -d virtualbox –virtualbox-memory 4096 –virtualbox-cpu-count 2 –engine-storage-driver overlay default

Step 3: Fix swap space for Oracle XE

thanks to GitHub – madhead/docker-oracle-xe: CentOS 7 Docker image with Oracle XE 11.2.0 onboard:

The steps are same as for usual build, but you need to configure swap space in boot2docker / Docker Machine prior the build:

Log into boot2docker / Docker Machine: boot2docker ssh or docker-machine ssh default (replace default if needed).

Create a file named bootlocal.sh in /var/lib/boot2docker/ with the following content:

#!/bin/sh
SWAPFILE=/mnt/sda1/swapfile
dd if=/dev/zero of=$SWAPFILE bs=1024 count=2097152
mkswap $SWAPFILE && chmod 600 $SWAPFILE && swapon $SWAPFILE
Make this file executable: chmod u+x /var/lib/boot2docker/bootlocal.sh

After restarting boot2docker / Docker Machine, it will have increased swap size. Just follow the steps above to build this image.

Step 4: Get the installers ready

You should have a folder structure similar to this one:

cs\config\configProperties.properties -&gt; repository install script
cs\config\installProperties.properties -&gt; cs install script
cs\config\startup-dctm.sh -&gt; dctm startup script
cs\install\appServer.jar
cs\install\bocs-ws.ear
cs\install\composer.jar
cs\install\dfcUnix.zip
cs\install\dms.ear
cs\install\docApps.jar
cs\install\Documentum_DFC_Environment.iam.zip
cs\install\jboss711.zip
cs\install\ServerApps.ear
cs\install\serverSetup.bin
cs\install\Server_linux_ora.zip
cs\install\serviceWrapperManager.jar
cs\install\tanukisoftware.zip
cs\install\tcf.zip
cs\install\XhiveConnector.ear
db\oracle-xe-11.2.0-1.0.x86_64.rpm
db\config\init.ora -&gt; oracle xe config
db\config\initXETemp.ora -&gt; oracle xe config
db\config\startdb.sh -&gt; oracle xe startup script
db\config\xe.rsp -&gt; oracle xe config
db\instantclient_11_2\adrci
db\instantclient_11_2\BASIC_README
db\instantclient_11_2\genezi
db\instantclient_11_2\libclntsh.so.11.1
db\instantclient_11_2\libnnz11.so
db\instantclient_11_2\libocci.so.11.1
db\instantclient_11_2\libociei.so
db\instantclient_11_2\libocijdbc11.so
db\instantclient_11_2\ojdbc5.jar
db\instantclient_11_2\ojdbc6.jar
db\instantclient_11_2\uidrvci
db\instantclient_11_2\xstreams.jar
tomcat\config\catalina.properties -&gt; tomcat updated config files
tomcat\config\catalina.sh -&gt; tomcat modified startup script
tomcat\config\context.xml -&gt; tomcat updated config files
tomcat\config\server.xml -&gt; tomcat updated config files
tomcat\config\web.xml -&gt; tomcat updated config files
tomcat\install\apache-tomcat-8.0.14.tar.gz
tomcat\install\da.war

Step 5: Get latest centos as base OS

Open docker terminal and run:

docker pull centos:latest

From now on, we’ll be editing the Dockerfile that we’ll use to create the image

Step 6: Installing Oracle XE

We’ll be building and image based on the centos we’ve just pulled, so we start our Dockerfile with:

FROM centos

Now we need to setup user accounts:

RUN echo root:root | chpasswd
RUN useradd dmadmin
RUN passwd -f -u dmadmin

RUN echo “dmadmin ALL=(ALL) ALL” >> /etc/sudoers.d/dmadmin
RUN sed -i -e ‘s/Defaults requiretty.*/ #Defaults requiretty/g’ /etc/sudoers

Install required libraries:

RUN yum install -y passwd sudo tail libaio bc initscripts net-tools libXp.x86_64 libXp.i686 libXi.i686 libXtst.i686 libXt.i686 glibc.i686 libgcc.i686 libstdc++.i686 libaio.i686; \
yum clean all

And run the Oracle installation:

RUN mkdir -p /run/lock/subsys

ADD db/oracle-xe-11.2.0-1.0.x86_64.rpm /tmp/
RUN yum localinstall -y /tmp/oracle-xe-11.2.0-1.0.x86_64.rpm; \
rm -rf /tmp/oracle-xe-11.2.0-1.0.x86_64.rpm

ADD db/config/xe.rsp db/config/init.ora db/config/initXETemp.ora /u01/app/oracle/product/11.2.0/xe/config/scripts/
RUN chown oracle:dba /u01/app/oracle/product/11.2.0/xe/config/scripts/*.ora \
/u01/app/oracle/product/11.2.0/xe/config/scripts/xe.rsp
RUN chmod 755 /u01/app/oracle/product/11.2.0/xe/config/scripts/*.ora \
/u01/app/oracle/product/11.2.0/xe/config/scripts/xe.rsp

ENV ORACLE_HOME /u01/app/oracle/product/11.2.0/xe
ENV ORACLE_SID XE
ENV PATH $ORACLE_HOME/bin:$PATH
RUN /etc/init.d/oracle-xe configure responseFile=/u01/app/oracle/product/11.2.0/xe/config/scripts/xe.rsp

RUN echo oracle:oracle | chpasswd

those scripts have the Oracle configuration and you can get them from GitHub – madhead/docker-oracle-xe: CentOS 7 Docker image with Oracle XE 11.2.0 onboard

Configure instantclient:

RUN mkdir /u01/app/oracle/product/11.2.0/xe/lib32; \
chown oracle:dba /u01/app/oracle/product/11.2.0/xe/lib32

ADD db/instantclient_11_2/lib* /u01/app/oracle/product/11.2.0/xe/lib32/

RUN ln -s /u01/app/oracle/product/11.2.0/xe/lib32/libclntsh.so.11.1 /u01/app/oracle/product/11.2.0/xe/lib32/libclntsh.so; \
ln -s /u01/app/oracle/product/11.2.0/xe/lib32/libocci.so.11.1 /u01/app/oracle/product/11.2.0/xe/lib32/libocci.so; \
chown -h oracle:dba /u01/app/oracle/product/11.2.0/xe/lib32/*; \
chown -h oracle:dba /u01/app/oracle/product/11.2.0/xe/lib32/libclntsh.so; \
chown -h oracle:dba /u01/app/oracle/product/11.2.0/xe/lib32/libocci.so

And copy the db startup script to the image:

ADD db/config/startdb.sh /

Step 7: Installing Documentum 7.2

You need to get a copy of the silent install scripts, you can get them by running the dctm installers with “-r <path to file>” or by checking support.emc.com for a SN with an attached copy.

Just be sure to fill in the usual required fields and the AEK password option or the installer will fail (you can avoid using lockbox though)

Avoid problems with the Oracle client:

RUN usermod -a -G dba dmadmin

Create the folder structure and copy the installers and the configuration scripts:

RUN mkdir /opt/documentum; \
mkdir /opt/documentum/product; \
mkdir /opt/documentum/product/7.2; \
mkdir /opt/documentum/install; \
chown -R dmadmin:dmadmin /opt/documentum

ADD cs/install/* /opt/documentum/install/
ADD cs/config/installProperties.properties /opt/documentum/install/installProperties.properties
ADD cs/config/configProperties.properties /opt/documentum/install/configProperties.properties

Additional configurations before running the installer:

USER root
RUN echo “#dctm services” >> /etc/services ; \
echo “dctm72 49001/tcp # 7.2 Repository native connection” >> /etc/services ; \
echo “dctm72_s 49002/tcp # 7.2 Repository secure connection” >> /etc/services

RUN ln /usr/lib64/libsasl2.so.3 /usr/lib64/libsasl2.so.2

RUN chown -R dmadmin:dmadmin /opt/documentum/install; \
chmod u+x /opt/documentum/install/serverSetup.bin

USER dmadmin
WORKDIR $DOCUMENTUM

ENV DOCUMENTUM /opt/documentum
ENV DM_HOME $DOCUMENTUM/product/7.2
ENV ORACLE_HOME /u01/app/oracle/product/11.2.0/xe
ENV ORACLE_SID XE
ENV NLS_LANG AMERICAN_AMERICA.AL32UTF8
ENV PATH $ORACLE_HOME/bin:$DM_HOME/bin:$PATH
ENV LC_ALL C
ENV JAVA_HOME /opt/documentum/java64/1.7.0_72
ENV PATH $JAVA_HOME/bin:$ORACLE_HOME/bin:$DM_HOME/bin:$PATH
ENV LD_LIBRARY_PATH=$ORACLE_HOME/lib32:$DM_HOME/bin/FIPS/:$JAVA_HOME/jre/lib/amd64/server:$DM_HOME/bin:$LD_LIBRARY_PATH

And run CS install:

RUN $DOCUMENTUM/install/serverSetup.bin -f installProperties.properties

Let’s configure the repository. First, “fix” dmdbtest (bad, dirty fix)

RUN mv $DM_HOME/bin/dmdbtest $DM_HOME/bin/dmdbtest.bak; \
echo “exit 0” >> $DM_HOME/bin/dmdbtest; \
chmod u+x $DM_HOME/bin/dmdbtest

While building an image, docker generates intermediate containers. These containers are like individual VMs with their own configuration, so starting the DB and the installer in different docker commands makes the DB run in a different container than the installation, so the installer won’t be able to connect to Oracle. In order to avoid this problem we need to run everything in the same run command (dirty workaround). Also, update hostnames with the current container hostname:

RUN sed -i “/SERVER.PROJECTED_DOCBROKER_HOST/cSERVER.PROJECTED_DOCBROKER_HOST=$HOSTNAME” /opt/documentum/install/configProperties.properties; \
sed -i “/SERVER.SMTP_SERVER_NAME/cSERVER.SMTP_SERVER_NAME=$HOSTNAME” /opt/documentum/install/configProperties.properties; \
sed -i “/SERVER.FQDN/cSERVER.FQDN=$HOSTNAME” /opt/documentum/install/configProperties.properties; \
sudo -E /startdb.sh; \
/opt/documentum/product/7.2/install/dm_launch_server_config_program.sh -f /opt/documentum/install/configProperties.properties

Step 8: Installing Tomcat / DA 7.2

The configuration files are the same used in the (Unofficial) D7.2 Developer Edition, I simply copied those to avoid further manual modifications:

ADD tomcat/install/apache-tomcat-8.0.14.tar.gz /opt/

RUN mv /opt/apache-tomcat-8.0.14 /opt/tomcat; \
chown -R dmadmin:dmadmin /opt/tomcat

ADD tomcat/install/da.war /opt/tomcat/webapps/
RUN unzip /opt/tomcat/webapps/da.war -d /opt/tomcat/webapps/da; \
sed -i “/<compression_filter_enabled>true</compression_filter_enabled>/c<compression_filter_enabled>false</compression_filter_enabled>” /opt/tomcat/webapps/da/wdk/app.xml; \
rm /opt/tomcat/webapps/da.war
ADD tomcat/config/catalina.properties /opt/tomcat/conf/
ADD tomcat/config/context.xml /opt/tomcat/conf/
ADD tomcat/config/server.xml /opt/tomcat/conf/
ADD tomcat/config/web.xml /opt/tomcat/conf/
ADD tomcat/config/catalina.sh /opt/tomcat/bin/

Step 9: Exposing ports and configuring default command to be run:

EXPOSE 8080 1521

CMD /opt/documentum/startup-dctm.sh ; bash

Save and get ready to build the image!

Step 10: building the image

docker build -t dctm72 .

And wait 40-60 minutes

Step 11: Running the image

Now that everything is setup, just run the image:

docker run -it -p 8080:8080 dctm72

the startup-dctm.sh command will start the database listening to the container’s IP, update server.ini, dfc.properties with the new hostname, remove dfc.keystore (just to be sure), load the aek passphrase and start docbroker, repository, jms and tomcat.

You can run idql from the container to check that you can connect to the repository. Now point your host browser to the docker-machine ip (you can see the ip on the docker terminal or by running “docker-machine ip”) through the 8080 port and try to open DA and login using the usual dmadmin/dmadmin.

Everything should be (kind of) working, Congrats!

In the next post I’ll explain how to “split” this image in three different images (db, cs and tomcat)