Installing with Docker-compose

Localhost installation

For those of you familiar with simple Docker Compose, a docker-compose file is available within GitHub repository and can be used to rapidly test up things. First step is to clone the repository and then to execute docker-compose with local clone like in this commands :

git clone
cd microcks/install/docker-compose
docker-compose -f microcks.yml up -d

After some minutes and components have been deployed, you should end up with a Spring-boot container, a MongoDB container, a Postman-runtime and a Keycloak container like in the trace below. The default user is admin with 123 password. The Microcks application is now available on http://localhost:8080 URL.

$ docker ps
CONTAINER ID        IMAGE                                      COMMAND                  CREATED             STATUS              PORTS                    NAMES
6a563e9d87c1        microcks/microcks:latest                  "/bin/sh -c 'exec ..."   6 days ago          Up 33 seconds>8080/tcp   microcks
162e99a97a6f        microcks/microcks-postman-runtime:latest   "node app.js"            6 days ago          Up 39 seconds       3000/tcp                 microcks-postman-runtime
b3cb4840597b        mongo:3.3.12                               "/ mo..."   6 days ago          Up 39 seconds       27017/tcp                microcks-mongo
949e0b9bdac6        jboss/keycloak:3.4.0.Final                 "/opt/jboss/docker..."   6 days ago          Up 38 seconds>8080/tcp   microcks-keycloak

Server installation

When installing on a shared server that will be accessed from some other places and machines, you'll need to tweak some configuration files before launching the docker-compose command. The properties to setup/update in that case are the URL to access and redirect to Keycloak server and the access mode to Keycloak depending on the protocol your want to use.
The directives just below show the detailed operations when using simple HTTP. If want to use HTTPS, you'll have to update the sslRequired and keycloak.ssl-required properties to external value.

$ hostname -f
$ cd microcks/install/docker-compose/
$ cp keycloak-realm/microcks-realm-sample.json keycloak-realm/microcks-realm-sample.json.bak
$ apt-get install jq
$ jq '.applications |= map(if .name == "microcks-app-js" then .redirectUris = [ "*" ] else . end) | .sslRequired |= "none"' keycloak-realm/microcks-realm-sample.json.bak > keycloak-realm/microcks-realm-sample.json
$ perl -i.bak -pe 's|KEYCLOAK_URL=http://localhost:8180/auth|KEYCLOAK_URL=|' microcks.yml
$ perl -i.bak -pe 's|keycloak.ssl-required=external|keycloak.ssl-required=none|' config/
$ sudo docker-compose -f microcks.yml up -d

All this directives are grouped into a single script named you'll find into the install/docker-compose directory. You can use it to setup your single server installation of Microcks. Just run the docker-compose -f microcks.yml up -d
command after having used this script.

Quick Azure installation

We provide this side project microcks/microcks-azure for easily setting up a demo server on Azure. This project reuse some form of the simple script exposed above, triggered by the Azure template instanciation.