We are back here to start the blog post series a give a teaser last week about dockering the TIBCO world and we have to start with the basics for both worlds: Docker and TIBCO. We chose as our first layer or attempt you create a docker container from our TIBCO EMS node.
In this post we are going to create a simple TIBCO EMS node and we are going to be doing better configuration step by step so you could learn with us:
First of all, As we talk earlier we are going to supose general knowledge about Docker and its main tools, so we are going to start creating our Dockerfile.
- First of all, we downloaded the EMS version we are going to use (In our case we are going with an 8.2.1 version, so we can have the last version at the moment).
- We are going to select our base image yo create our node and we are going to choose CentOS as an operating system. You should be aware of CentOS is not an supported OS for any TIBCO software but due to its similarities with RHEL and its licensesing we think it’s a good choice for dev and test enviroments (we always use this software as at base for our dev boxes but if you want to use another way feel free and share with us in the comment area!!)
- We are going to choose the tutum/centos image because we think it’s a great base imagen and always have done the work for us (Please, if you want pay a visit to its site http://tutum.co it’ll be worth it)
- Ok, now we alreay have selected our base image so we have to COPY the installation files inside the docker container using a COPY command.
- We also are going to copy a JDK installer to have java run inside our machine.
- After that we are going to create a tibco user inside our new OS and established the home environment variable to the tibco home folder.
- We proceed to install the unzip command as long as the JDK we downloaded earlier.
- We unzip the EMS installer file and we proceed a silent install of the EMS.
- We expose the 7222 command to the outside world so anyone could connect to that port.
- We change the owner of the TIBCO realted files and start a script to start the EMS file.
Now we put all the content about the Dockerfile we were using:
FROM tutum/centos COPY files/TIB_ems_8.2.1_linux_x86.zip /tmp/ COPY files/jdk-7u75-linux-x64.rpm /tmp/ RUN useradd -ms /bin/bash tibco ENV HOME /home/tibco RUN rpm -Uvh /tmp/jdk-7u75-linux-x64.rpm RUN alternatives --install /usr/bin/java java /usr/java/latest/bin/java 2 RUN yum -y install unzip RUN mkdir /tmp/software/ RUN mv /tmp/TIB_ems_8.2.1_linux_x86.zip /tmp/software/ RUN unzip /tmp/software/TIB_ems_8.2.1_linux_x86.zip -d /tmp/software/ RUN /tmp/software/TIBCOUniversalInstaller-lnx-x86.bin -silent EXPOSE 7222 COPY files/ems.sh /opt/tibco/ems/ RUN chmod +x /opt/tibco/ems/ems.sh RUN chown -R tibco:tibco /tmp/software/ RUN chown -R tibco:tibco /opt/tibco/ RUN chown -R tibco:tibco /home/user/tibco/ USER tibco CMD /opt/tibco/ems/ems.sh
Please, feel free to try it and share your comments with us!!
UPDATE After different requests, here is my current content of the ems.sh file, but I think I’m going to use another method to share with you all the technical details, maybe using our GitHub repo or something similar:
cd /home/user/tibco /opt/tibco/ems/8.2/bin/tibemsd64.sh