Running OBIEE 11g inside Docker
Oracle Business Intelligence Enterprise Edition 11g (OBIEE) is a comprehensive business intelligence platform that delivers a full range of capabilities — including interactive dashboards, ad hoc queries, notifications and alerts, enterprise and financial reporting, scorecard and strategy management, business process invocation, search and collaboration, mobile, integrated systems management and more.
Slowly enterprises are leaning towards deploying applications in the cloud.Few days agao, I have asked myself a question:Can I run OBIEE inside Docker as a container.The answer is yes we can setup and here’s how
Creating the Docker images
Step 1: Preparing the docker host
Before we attempt to build the image, configure the host so that docker uses a faster and bigger pool as below(https://jpetazzo.github.io/2014/01/29/docker-device-mapper-resize/):
1.Stop the Docker daemon
2.Wipe out /var/lib/docker
3.Create the storage directory: mkdir -p /var/lib/docker/devicemapper/devicemapper
4.Create a data symbolic link in that directory, pointing to the device:
#ln -s /dev/xvdg /var/lib/docker/devicemapper/devicemapper/var/lib/docker/devicemapper/devicemapper# ls -lrt
total 62856
lrwxrwxrwx 1 root root 9 Apr 5 19:44 data -> /dev/xvdg
-rw------- 1 root root 2147483648 Apr 13 05:54 metadata
5.Restart Docker
6.Check with docker info that the Data Space Total value is correct.
By default the docker creates images/containers who size is 10G.This will not help with building the image/containers running OBIEE as the setup files are huge.Googling for a solution turned up this page(http://blog.senthilthecoder.com/post/docker-devicemapper-imagesize/).It appears dm.basesize is the parameter that does the trick.
Below are the steps on how to increase dm.basesize parameter in Ubuntu.
1.Navigate to /etc/default
2.Add DOCKER_OPTS=” — storage-opt dm.basesize=60G” in docker.io file
# Docker Upstart and SysVinit configuration file
# Customize location of Docker binary (especially for development testing).
#DOCKER="/usr/local/bin/docker"
# Use DOCKER_OPTS to modify the daemon startup options.
DOCKER_OPTS="--storage-opt dm.basesize=60G"
# If you need Docker to use an HTTP proxy, it can also be specified here.
#export http_proxy="http://127.0.0.1:3128/"
# This is also a handy place to tweak where Docker's temporary files go.
#export TMPDIR="/mnt/bigdrive/docker-tmp"
3.Restart Docker
Step 2: Creating the docker image
1.Setting up OBIEE 11g involves setting up RCU schemas in Oracle database
2.For this we can reuse existing docker image i.e. Oracle Express 11g R2 on Ubuntu 14.04.1 LTS in docker hub
3.Pull wnameless / oracle-xe-11g image and bring up docker container running oracle-xe-11g.(https://registry.hub.docker.com/u/wnameless/oracle-xe-11g/)
4.Obtain RCU from OTN(http://www.oracle.com/technetwork/middleware/bi-enterprise-edition/downloads/bi-downloads-1923016.html)
5.Run the RCU to create and populate DEV_BIPLATFORM and DEV_MDS schemas
6.Commit the container as a new image named obi_rep
#sudo docker commit distracted_blackwell obi_rep
7.Run a new container from obi_rep image
#sudo docker run -d -p 49160:22 -p 49161:1521 --name obi_rep obi_rep
8.Build the image for OBIEE using the Docker file.Please note the associated installation files for OBIEE and weblogic need to placed in the same directory
as that of Docker file.This directory also need to contain files for silent installation and configuration of weblogic and OBIEE i.e. silent.xml,obi_install.rsp,obi_config.rsp and oraInst.loc
#sudo docker build -t oracle_obi .
9.During the above build oraclelinux official docker images are being used (https://registry.hub.docker.com/u/library/oraclelinux/). The above build is only limited to installation of OBIEE.Configuration happens when the container is created from the image.
10.Run the container from the above built image i.e. oracle_obi
#sudo docker run --privileged -d -P --name obi_server -h OBIEE11117Linux -p 7001:7001 -p 9704:9704 --link obi_rep:obi_rep oracle_obi
11.When the container starts the below configuration step gets executed.
#CMD /opt/Middleware/weblogic/Oracle_BI1/bin/config.sh -silent -response /opt/Middleware/obi_config.rsp -ignoreSysPrereqs -waitforcompletion
12.Inorder to bake the configuration permanently into the image, the commit the above container as a new image
#sudo docker commit obi_server obi_server:version1
13.The VIRTUAL SIZE of the image obi_server:version1 is nearly 39.6 GB
14.The size of the image can be reduced by following the blog post Shrinking Docker Images by Matt Williams (http://matthewkwilliams.com/index.php/2015/03/23/shrinking-docker-images/)
15.The name of the final image is obi_server:version2
Step 3: Running the docker container
1.Run the container from RCU database image
#sudo docker run -d -p 49160:22 -p 49161:1521 --name obi_rep obi_rep
2.Run the container from OBIEE 11g image
#sudo docker run --privileged -d -P --name obi_server -h OBIEE11117Linux -p 7001:7001 -p 9704:9704 --link obi_rep:obi_rep oracle_obi:version2
3.Login to the OBIEE11g container using nsenter (https://blog.docker.com/tag/nsenter/) to start weblogic and OBIEE11g services.
Docker file
#Set the base image :
FROM oraclelinux:6.6#File Author/Maintainer :
MAINTAINER Sasikanth Kotti <kotti.sasikanth@gmail.com>#Update packages and install wget and man :
RUN yum update -y -q
RUN yum install -y -q wget man tar sudo zip unzip ping glibc make binutils gcc libaio bc perl binutils compat-libstd* elfutils-libelf elfutils-libelf-devel gcc gcc-c++
glibc glibc-common glibc-devel libaio libaio-devel libgcc libstdc++ libstd c++-devel make sysstat
RUN yum reinstall -y -q glibc-common
RUN localedef -c -i en_US -f UTF-8 en_US.UTF-8
RUN yum reinstall -y -q --exclude=filesystem-2.4.30-3.el6.x86_64 \*
RUN useradd obiee#Set workdir to /opt/Middleware :
WORKDIR /opt/Middleware#Obtain/download Java SE Development Kit 7u75 using wget :
RUN wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u71-b14/jdk-7u71-l
inux-x64.tar.gz#Set permissions to Middleware directory to enable obiee user perform operations :
RUN chmod 777 /opt/Middleware#Set the username to obiee :
USER obiee#Setup jdk1.7.0_71 and create softlink :
RUN gunzip jdk-7u71-linux-x64.tar.gz
RUN tar -xvf jdk-7u71-linux-x64.tar
RUN ln -s jdk1.7.0_71 current_java
RUN rm jdk-7u71-linux-x64.tar
#Setup environment variables for java :
ENV JAVA_HOME /opt/Middleware/current_java
ENV PATH $PATH:/opt/Middleware/current_java:/opt/Middleware/current_java/bin
#Add weblogic installation file and configuration file for silent installation :
ADD ./wls1036_generic.jar /opt/Middleware/
ADD ./silent.xml /opt/Middleware/
#Silent Installation of weblogic :
RUN java -Xmx1024m -jar wls1036_generic.jar -mode=silent -silent_xml=/opt/Middleware/silent.xml
ADD ./bi_linux_x86_111170_64_disk1_2of2.zip /opt/Middleware/
ADD ./bi_linux_x86_111170_64_disk1_1of2.zip /opt/Middleware/
ADD ./bi_linux_x86_111170_64_disk2_1of2.zip /opt/Middleware/
ADD ./bi_linux_x86_111170_64_disk2_2of2.zip /opt/Middleware/
ADD ./bi_linux_x86_111170_64_disk3.zip /opt/Middleware/
ADD ./obi_install.rsp /opt/Middleware/
ADD ./obi_config.rsp /opt/Middleware/
ADD ./oraInst.loc /opt/Middleware/
#ADD ./oracle-xe-11.2.0-1.0.x86_64.rpm.zip /opt/Middleware/
#ADD ./xe.rsp /opt/Middleware/
RUN unzip ./bi_linux_x86_111170_64_disk1_1of2.zip
RUN unzip ./bi_linux_x86_111170_64_disk1_2of2.zip
RUN unzip ./bi_linux_x86_111170_64_disk2_1of2.zip
RUN unzip ./bi_linux_x86_111170_64_disk2_2of2.zip
RUN unzip ./bi_linux_x86_111170_64_disk3.zip
RUN rm bi_linux_x86_111170_64_disk1_1of2.zip bi_linux_x86_111170_64_disk1_2of2.zip bi_linux_x86_111170_64_disk2_1of2.zip bi_linux_x86_111170_64_disk2_2of2.zip bi_linux_x86_111170_64_disk3.zip
USER obiee
#Install OBIEE 11g
RUN /opt/Middleware/bishiphome/Disk1/runInstaller -silent -response /opt/Middleware/obi_install.rsp -invPtrLoc /opt/Middleware/oraInst.loc -ignoreSysPrereqs -waitforcompletion
#Set the username to root and hostname to OBIEE11117Linux
USER root
ENV HOSTNAME OBIEE11117Linux
#RUN hostname OBIEE11117Linux
RUN hostname
USER obiee
ENV LANG en_US.UTF-8
CMD /opt/Middleware/weblogic/Oracle_BI1/bin/config.sh -silent -response /opt/Middleware/obi_config.rsp -ignoreSysPrereqs -waitforcompletionConclusionThat’s all folks! I hope you enjoyed the guide.Please feel free to post questions in the comments section.