Before You Begin
This tutorial shows you how to create and configure Oracle Unified Directory Services Manager (OUDSM) 12.2.1.4.0 Docker containers.
Background
Docker is a platform that enables users to build, package, ship and run distributed applications. Docker users package up their applications, and any dependent libraries or files, into a Docker image.
Docker images are portable artifacts that can be distributed across many environments. Images that have been distributed can be used to instantiate containers where applications can run in isolation from other applications running in other containers on the same host operating system.
What Do You Need?
- An OUDSM Docker image loaded into the Docker repository
- A basic understanding of Docker
- An understanding of OUDSM, OUD and their deployment options.
Prepare to Run OUD Docker Image
Create a Bridged Network
Create a bridged network so the OUDSM Docker container(s) can communicate with each other.
To create a docker network, run the following command:
$ docker network create -d bridge OUDNet
The output will look similar to the following:
f18ca45a95c8ae1b6885fcc1b489a1a1a76bcdd292272276c2960335734c8d39
Note: Any OUD containers you need to connect to from OUDSM should be accessible to the OUDSM container.
Mount a host directory as a data volume
Mount a volume (a directory stored outside a Docker container's file system), to store OUDSM Instance files and any other configuration. The default location of the user_projects
volume in the container is /u01/oracle/user_projects
(this is the directory under which the OUDSM instance is created).
This option allows you to mount a directory from your host to a container as a volume. This volume is used to store OUDSM Instance files.
To prepare a host directory (for example: /scratch/user_projects
) for mounting as a data volume, execute the command below:
Note: The userid can be anything but it must have uid:guid
with the value 1000:1000
. This is same value as the oracle
user running in the container. This ensures that the oracle
user has access to the data volume.
$ sudo su - root
$ mkdir -p /scratch/user_projects
$ chown 1000:1000 /scratch/user_projects
$ exit
All container operations are performed as the oracle
user.
Run an OUDSM Docker Container
In this section you will create a container and configure an Administration Server and OUDSM application using the OUDSM Docker image.
The following parameters can be passed to the docker run
command, using either an env-file or command line parameters, as shown below.
- ADMIN_USER=<username>
- ADMIN_PASS=<password>
- ADMIN_PORT=7001
- ADMIN_SSL_PORT=7002
- Create a file, ~/oudsm.env, containing the following values:
ADMIN_USER=weblogic ADMIN_PASS=Oracle123 ADMIN_PORT=7001 ADMIN_SSL_PORT=7002
- Run the following command to create the container:
$ docker run -d --network=OUDNet \ --name oudsm1 \ --volume /scratch/user_projects:/u01/oracle/user_projects \ --env-file ~/oudsm.env \ oracle/oudsm:12.2.1.4.0
- Run the following command to check that the container is created:
$ docker ps
The output should look similar to the following:CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 13ecf93d5179 oracle/oudsm:12.2.1.4.0 "sh -c ${SCRIPT_DIR}…" 5 seconds ago Up 4 seconds oudsm1
- Run the following command to tail the log and check the status of the container creation:
docker logs -f oudsm1
The output should look similar to the following:Domain Home is: /u01/oracle/user_projects/domains/base_domain DOMAIN_NAME=base_domain DOMAIN_HOME=/u01/oracle/user_projects/domains/base_domain Domain Configuration Phase ========================== Initializing WebLogic Scripting Tool (WLST) ... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands Sep 24, 2020 2:34:47 PM oracle.security.jps.az.internal.runtime.policy.AbstractPolicyImpl initializeReadStore INFO: Property for read store in parallel: oracle.security.jps.az.runtime.readstore.threads = null Successfully created OUDSM domain ... <Sep 24, 2020 2:36:47,556 PM GMT> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[1]" is now listening on 127.0.0.1:7002 for protocols iiops, t3s, ldaps, https.> ####<Sep 24, 2020 2:36:47,556 PM GMT> <Notice> <Server> <1beae5e7de96> <AdminServer> <weblogic.socket.ServerListenThread> <<WLS Kernel>> <> <c0414fd7-e78c-4442-abe7-fe7e2ecb6293-0000003d> <1600958207556> <[severity-value: 32] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-002613> <Channel "DefaultSecure[1]" is now listening on 127.0.0.1:7002 for protocols iiops, t3s, ldaps, https.> <Sep 24, 2020 2:36:47,556 PM GMT> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.> ####<Sep 24, 2020 2:36:47,556 PM GMT> <Notice> <Server> <1beae5e7de96> <AdminServer> <weblogic.socket.ServerListenThread> <<WLS Kernel>> <> <c0414fd7-e78c-4442-abe7-fe7e2ecb6293-0000003d> <1600958207556> <[severity-value: 32] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-002613> <Channel "Default[1]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.> <Sep 24, 2020 2:36:47,659 PM GMT> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.> ####<Sep 24, 2020 2:36:47,659 PM GMT> <Notice> <WebLogicServer> <1beae5e7de96> <AdminServer> <[STANDBY] ExecuteThread: '22' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <c0414fd7-e78c-4442-abe7-fe7e2ecb6293-0000003f> <1600958207659> <[severity-value: 32] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-000360> <The server started in RUNNING mode.> <Sep 24, 2020 2:36:47,676 PM GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.>
When you see the message "Server state changed to RUNNING" the OUDSM instance has started successfully. - Verify the OUDSM instance by invoking the application in a browser:
Inspect the container to return the service port to access via your browser:
$ docker inspect --format '{{.NetworkSettings.Networks.OUDNet.IPAddress}}' oudsm1 172.18.0.10 $
To access WLS Console enter http://xxx.xx.x.x:7001/console in a browser.
To access OUDSM Console enter http://xxx.xx.x.x:7001/oudsm in a browser.
Removing an OUD Docker Container
If you need to remove an OUDSM Docker container perform the following steps:
- Stop; the OUD container using the following command:
$ docker stop <containername>
For example:$ docker stop oudsm1
- Remove the OUD container using the following command:
$ docker rm <containername>
For example:$ docker rm oudsm1
Want to Learn More?
Feedback
To provide feedback on this tutorial, please contact Identity Management User Assistance.