pondělí 14. prosince 2015

PerfRepo in Docker

Using PerfRepo now became much easier than it was before. How so? It comes to Docker. To run an instance of PerfRepo is as simple as starting 2 docker containers - one with PerfRepo web application and the second with the DB - and link them together.

So, let's have a look at how to run PerfRepo with Docker...
  • Start a DB using perfcake/perfrepo-postgresql image with container name perfrepo-db:
$ docker run -d --name perfrepo-db perfcake/perfrepo-postgresql:v1.4

  • Start PerfRepo container from perfcake/perfrepo image at a specific port (e.g. 5000) and link it with the previously created DB container (the link alias needs to be perfrepo-db):
$ docker run -d -p 5000:8080 --name perfrepo --link perfrepo-db perfcake/perfrepo:v1.4
  • Verify Docker containers are running:
$ docker ps
CONTAINER ID   IMAGE                               COMMAND                  CREATED          STATUS         PORTS                    NAMES
251863199f81   perfcake/perfrepo:v1.4              "/root/jboss-eap-6.4/"   4 seconds ago    Up 3 seconds   0.0.0.0:5000->8080/tcp   perfrepo
baaeacfd98f5   perfcake/perfrepo-postgresql:v1.4   "/usr/bin/postgres -D"   35 minutes ago   Up 35 minutes  5432/tcp                 perfrepo-db

PerfRepo should be running on the port set in the previous step (e.g. 5000) http://localhost:5000. The default user and password are:
  • login: perfrepouser
  • password: perfrepouser1.
And that's all it takes...

The docker images are ready for you in the Docker Hub so have fun!!