Blog | Pythian

Oracle EBS Vision Instance on docker

Written by Vasu Balla | Aug 20, 2018 4:00:00 AM

Continuing my previous efforts in getting docker running on Oracle Linux in this blog post, I worked on getting Oracle E-Business Suite Vision Instance on docker. This blog explains the process.

The Concept: Moving from Virtual Appliances to Containers

Many are aware that Oracle nowadays ships Vision Instance as single node virtual machine through their e-delivery site. This virtual machine is packaged as OVA format, which can be deployed on Virtualbox, Oracle VM server and even VMWare or Hyper-V. Instead of installing Oracle EBS Vision instance from installation media onto docker, I chose to use this VM image provided by Oracle. This blog explains the process of converting this Oracle EBS Vision Instance VM image into a docker image and deploying it.

Step 1: Downloading and Preparing the EBS Vision Image

Let's get started with downloading the Oracle EBS 12.2.7 Vision instance image from Oracle Software Delivery Cloud aka edelivery.oracle.com. Search for "Oracle VM Virtual Appliance for Oracle E-Business Suite 12.2.7" on that website and download all the zip files related to it. Follow the process described in the README file in the zip file, and extract/build the OVA file.

Note: This OVA image is close to 70 GB in size, and an extracted VM image takes close to 250 GB, so make sure you have at least half a terabyte of disk space to play with.

Extract this ova file with the tar command and it will give a vmdk disk image of the whole VM.

[root@docker EBS1227]# tar -xvf 1227.ova -rw------- someone/someone 11601 2018-01-31 09:59 Oracle-E-Business-Suite-12.2.7_VISION_INSTALL.ovf -rw------- someone/someone 73656125952 2018-01-31 12:59 Oracle-E-Business-Suite-12.2.7_VISION_INSTALL-disk001.vmdk 

Step 2: Extracting the /u01 Directory from VMDK

We need to first install the guestfs tool pkg which helps in extracting the required files from this VMDK disk image. Please note this is a disk-intensive operation and it is time-consuming. We are basically extracting the /u01 directory from the vmdk disk image of the EBS Vision Virtual Machine.

# yum install libguestfs-tools.noarch  # export LIBGUESTFS_BACKEND=direct # guestfish --ro -a Oracle-E-Business-Suite-12.2.7_VISION_INSTALL-disk001.vmdk ><fs> run ><fs> list-filesystems /dev/sda1: ext4 /dev/vg_ebs/lv_home: ext4 /dev/vg_ebs/lv_root: ext4 /dev/vg_ebs/lv_swap: swap ><fs> mount /dev/vg_ebs/lv_root / ><fs> mount /dev/vg_ebs/lv_home /u01 ><fs> df Filesystem                   1K-blocks      Used Available Use% Mounted on tmpfs                            97440       212     97228   1% /run /dev                            240276         0    240276   0% /dev shmfs                           243596         0    243596   0% /dev/shm /dev/mapper/vg_ebs-lv_root    20531068   2583276  16881808  14% /sysroot /dev/mapper/vg_ebs-lv_home   484438504 277620368 182187048  61% /sysroot/u01 ><fs> tar-out /u01 - | gzip -1 >> EBS1227-U01.gz ><fs> quit 

Step 3: Building the Docker Image

This EBS1227-U01.gz file now has all the Apps code and database files related to EBS Vision Instance. We now need to import this to a docker image. For this, we are going to use the oraclelinux docker image provided by Oracle as a base and add the EBS files on top of that.

I wrote a couple of scripts that will help in speeding up this process and I put them on GitHub. Now proceed to this URL and download the files to your docker server. Copy the EBS1227-U01.gz you extracted from the vmdk file to the directory where you extracted the master.zip from github and run the build.sh script.

[docker@docker git]$ sh -x build.sh 

Verify that the image is stored in the docker repo using the command below:

[docker@docker git]$ docker images |grep 1227 r12dba/ebs          1227                4bd2ca6f64f0        2 hours ago         283GB 

Launching and Verifying the EBS Container

You can launch the image using the command below. It starts a docker container with the hostname apps.example.com and also exposes the web port and db port to outside users.

[docker@docker git]$ docker run -it -d -p 8000:8000 -p 1521:1521 --name ebsvis01 -h apps.example.com r12dba/ebs:1227 

You can now access the EBS URL using https://apps.example.com:8000. But note to add a host file entry in your laptop to access it. Here are some commands to verify the docker container:

# check the running containers [docker@docker git]$ docker ps CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                                            NAMES 7f5e42199455        r12dba/ebs:1227     "/bin/bash"         4 minutes ago       Up 13 seconds       0.0.0.0:1521->1521/tcp, 0.0.0.0:8000->8000/tcp, 7001-7002/tcp   ebsvis01  # shell access to container [root@docker ~]# docker exec -it ebsvis01 bash  # restart a container [root@docker ~]# docker restart ebsvis01 

Looking Ahead: Scaling with Kubernetes

The next step for me would be to deploy this on Kubernetes and see how we can scale this ...

Oracle Database Consulting Services

Ready to optimize your Oracle Database for the future?