UPDATE 13.09.2016: The files are now available on GitHub, https://github.com/gianniceresa/docker-images
Last week I wanted to test something (will come in a future post) and for that I needed a clean install of OBIEE 188.8.131.52.0. Started looking around the many VMs I have around but not one was matching and so I asked on the #obihackers channel on Freenode if someone maybe had a matching VM he was up to share. No luck for me no one had what I was looking for… So while complaining why Oracle doesn’t provide VM with clean install of all their products (I know it isn’t doable) and I was getting ready to start installing in a new VM a Linux OS, an Oracle Database and finally OBIEE somebody (actually it was Robin Moffatt) mentioned Docker: apparently there wasn’t an OBIEE image available, so it wasn’t going to help me directly but the idea was more on why not to make one? So next time I needed an OBIEE setup all I had to do was to run a new container based on that image and … done!
PACKAGE YOUR APPLICATION INTO A STANDARDIZED UNIT FOR SOFTWARE DEVELOPMENT
Docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment.
Oracle Database in a docker image in 2 commands
While checking if I had all the required binaries and downloading the latest OEL image, 7.2 with a 4.1.12 UEK kernel, (I often use the Oracle Linux as I guess it’s the one they use internally and so more chances things just works fine, and I actually I like it) I started googling a bit.
Official source for Docker configurations, images and examples of Dockerfiles for Oracle products and projects
In addition to that GitHub repository a nice blog by Gerald Venzl with all the steps to get the Oracle Database docker image built and running it.
I must be honest: it’s clean, well documented and super simple to setup.
So once my linux VM was up and running instead of installing the database directly I decided to deploy it in docker following the blog post and using the GitHub files: around 10 minutes to build, 5 more minutes at the first start and … done! No need to configure anything or get a valid response file for a silent install. Wow, impressive! It really made my life easier.
Why not do the same with OBIEE?
So I now have a linux based VM, I have a docker database container, time to start installing Oracle JDK (OpenJDK seems to be working as well but I prefer to follow the certification matrix for my tests as much as possible to avoid adding issues not related to what I’m testing), Weblogic and the Fusion Middleware, OBIEE and finally configure it to have my system ready.
Wait! What’s the difference between installing directly in the VM compared to do it into a docker container? Actually … nothing at all, I would do silent installs anyway, so let’s give it a try.
(This is just an intermediate step and the final solution using Docker Compose is coming in another post soon.)
Don’t reinvent the wheel, adapt what already exists
An OBIEE installation is not totally different than an Oracle Database install, similar preinstallation requirements (at least from tools/packages point of view), so why not take the Oracle Database docker files and adapt them to match OBIEE? Let’s do it!
Please be aware the scripts aren’t going to download the binaries, you must get the binaries yourself first (accepting the various licensing agreements etc.), the scripts simply automate all the next tasks.
Takes few parameter to decide which version of the tool to install, verify the MD5 checksum of binaries and stop everything if mismatching or missing, define some extra settings and finally build the docker image.
It contains all the steps docker execute when building an image, a set of variables, files to be added to the image, script executed etc. It’s the one loading the binaries into the docker container, using YUM to install the required packages, install the Oracle JDK, install Weblogic and OBIEE. It doesn’t do the domain configuration as this step require a database and it’s typically something you want to be able to do on the fly when starting a new container using the OBIEE image.
3) Response files
The Oracle way to install software silently, providing all the parameters a visual installer asks for. There are 3 response files for OBIEE: weblogic, OBIEE and the BI configuration (create domain, RCU etc.).
A docker container is supposed to be ready to use once started, so there is no point if you have to execute the start command for OBIEE by hand yourself. So with this file we can start automatically OBIEE when the container is started. It actually also decide at the first execution if it must start OBIEE or first run the configuration to create the domain etc. because it’s the first time it’s started (the steps requiring a database to be available).
All in all it wasn’t too complicated to get there, the Oracle Database docker files are well documented to make it simple to adapt. There are probably many things that could be done in a better way and more parameters added to the scripts but it works, I wasn’t asking for more …. (and actually I did something else with it, stay tuned to see where it ends up with Docker Compose).
The files and script to build and run an OBIEE Docker Image are available on GitHub: https://github.com/gianniceresa/docker-images