Deploying a Pentaho BA Server CE Docker Container with Dokku

In my last post, I showed how to create a Docker container running the Pentaho BA Server 5.3 Community Edition. In this post, I am going to show how easy it is to deploy a Docker container to the cloud or any server using Dokku.

First, Dokku is a lightweight docker deployment manager inspired by Heroku. I personally love Heroku's deployment model. It's as simple as it gets - you write your code, push it a repository, then Heroku takes care of the rest. Dokku tries to immitate this model. It's like having your own Heroku infrastructure, except you have full control of the servers (and of course, the costs).

Installing Dokku in your server is simple enough. It's just a matter of downloading and running a small script. See the instructions here.

But for the purpose of this exercise, you can provision a server from Digital Ocean with Dokku already installed. You can follow the instructions here to set it up: https://www.digitalocean.com/community/tutorials/how-to-use-the-digitalocean-dokku-application

Once your server is up and running, it's time to deploy the Docker container with the Pentaho BA Service image.

First, create a project directory in you development machine:

mkdir biserver && cd biserver

Then create a file named Dockerfile with the following contents:

FROM bytekast/docker-pentaho-ce-5.3

# Postgres AUFS bug hack
RUN mkdir /etc/ssl/private-copy; mv /etc/ssl/private/* /etc/ssl/private-copy/; rm -r /etc/ssl/private; mv /etc/ssl/private-copy /etc/ssl/private; chmod -R 0700 /etc/ssl/private; chown -R postgres /etc/ssl/private

# Start Service
EXPOSE 8080 22 5432
CMD /home/pentaho/start.sh && /usr/bin/supervisord

All this is doing is pulling the container we created in the previous post and running the default commands. Note that Dokku will automatically map the first port you exposed (in this case, 8080) to port 80 if you enabled virtual host naming when you set up the droplet in Digital Ocean.

Next, initialize a git repository containing just the Dockerfile.

git init
git add Dockerfile
git commit -m'Initial Commit'

Now, add a remote repository pointing to the Dokku server you created. In this example, let's say you assigned the domain name dokku.bytekast.com to the server

git remote add dokku dokku@dokku.bytekast.com:biserver

Notice the biserver path at the end of the remote address. We are telling Dokku that we are naming the app biserver. If you enabled virtualhost naming earlier, the docker container would then be accessible at this url: http://biserver.dokku.bytekast.com.

Finally, to deploy the Pentaho BI Server container, run:

git push dokku master

To see the logs, run:

ssh dokku@apps.dokku.com logs biserver

And, that's it!!! Once the application starts, you should be able to access the Pentaho BI Server Console at http://biserver.dokku.bytekast.com

Rowell Belen

Read more posts by this author.