Not long ago, Oracle adopted the Docker engine as one of the accepted platforms for its products and published a set of scripts and examples in the Oracle GitHub repository. This includes sets for rapid deployment of Oracle databases, WebLogic, and for a number of other products.
I tried some of the published Docker implementations including the Oracle database using my sandbox, and it worked pretty well for me. Among the published containers, I didn't find an example for Oracle Data Integrator (ODI) and decided to make one just for myself.
I created this container and found it to be useful when you need just to test one or another ODI scenario and wipe everything out after the tests. I've decided to share my scripts with you and describe how it had been made.
To build my version, I used the Oracle-developed images for Oracle Linux, Oracle Java, and Oracle Database as a basis for ODI, making only minor modifications to have the final product better suited to my needs. First, we need the Docker engine on your machine. The installation is pretty straightforward. If you are on Linux, you may need to add your user to the "docker" group:
[root@vm129-132 ~]# gpasswd -a oracle docker Adding user oracle to group docker
And make sure the docker service is up and running:
[root@vm129-132 ~]# systemctl status docker.service Active: active (running) since Tue 2017-06-06 12:29:35 EDT; 1 months 24 days ago
Then you need to clone or download the Oracle git repository for docker images to be able to build necessary base images before starting with the ODI. On your system with docker, run git clone https://github.com/oracle/docker-images.git.
We start with building a Linux image with Java JRE or JDK for our ODI. Oracle provides an "OracleJava" docker configuration where we can build an image with Java 7 or 8. I used Oracle JDK 8 and modified the Dockerfile in the OracleJava/java-8 directory:
# Replacing server JRE with JDK ENV JAVA_PKG=jdk-8u*-linux-x64.tar.gz
After building the Java base, I created an incremental image called oracle/serverjrevnc:8 that includes diagnostic tools, a VNC server, and the vi editor.
The next step is building the database that will serve as the repository. We modify the Oracle Database Dockerfile.ee to use our new oracle/serverjrevnc:8 as the base image. Once the database image is ready, we can use the scripts I've prepared to build the final ODI image.
My repository includes several critical scripts for the standalone agent:
docker build command.We can now create our container. You have the option to store database files inside the Docker file system for a "fresh" start every time, or use a persistent volume to save time on subsequent deployments.
[oracle@vm129-132 dockerfiles]$ docker run --name oditest \ -p 1521:1521 -p 5500:5500 -p 5901:5901 -p 5902:5902 \ -v /home/oracle/oradata:/opt/oracle/oradata \ --env ORACLE_BASE=/opt/oracle \ --env ORACLE_HOME=/opt/oracle/product/12.2.0.1/dbhome_1 \ oracle/odi:12.2.1.2.6-standalone
Inside the container, you can start a VNC server and run ODI Studio. The studio is eventually up, and you can connect to the repository to start testing your scenarios.
Docker can be extremely useful for test deployments. The persistent database files make the deployment easy and quick. I have some reservations about using Docker for any production deployments of Oracle databases, but that discussion deserves a dedicated post. Stay tuned.
Are you ready to save up to 60% in operational costs?