top of page

How to Install XME.Digital Using Docker

System requirements

  • OS - any which supports Docker (Linux is recommended)

  • RAM - 8 Gb minimum (16 Gb recommended)

  • CPU - 2 cores minimum (6 cores recommended)

  • Storage - 20 Gb minimum

Applications:

  • Docker v17.06+ (For installation follow its official documentation)

  • Git

Installation steps

  • set net.core.somaxconn = 4096 in /etc/sysctl.conf and reload

Clone this project and set up a mirror of the source repository xm2-config for local configuration, make git clone --mirror project xm2-config

  • and set up a mirror of the source repository xm2-config for local configuration

From the  xm-online/assets/ run docker to start containers defined.

  • start Docker

  • start swarm for work docker stack

  • start each misc service for XM^online2

  • change default max connections to 300 in /var/lib/docker/volumes/xm2local_pg-data/_data/postgresql.conf

  • restart postgres

  • initialize postgres databases

  • initialize passwords for each XM^online2 service (postgres is default)

  • start each XM^online2 service

If it is the first time you are using those images, it will first download the images from hub which may take some time.

If nothing goes wrong you should see a couple of containers are running on your machine. To see them you can type:

In this example, we simply map port 80 of the host to port 80 of the Docker (or whatever port was exposed in the docker-compose.yml) Verify the deployment by navigating to your server address in your preferred browser.

or

Default user xm/P@ssw0rd could be used to sign-in.

Note: some browsers for example Chrome prevents accessing to the url localhost:80 so we recommend to use direct IP

The ports of all the services like Postgresql, Kafka etc. were intentionally changed to custom ones to not to conflict with the default ones that may be installed and running on machine. For example, to connect to Postgresql here is the credentials (./assets/misc-services/postgres/password.txt):

To get credentials of other services you may want to see docker-compose.yml and docker logs

Start/Stop and health check

To stop Docker swarm use command:

To start:

Also you can check active services in consul by url: http://<IP>:8500 and ensure that next ervices are active (green):

  • balance

  • config

  • consul

  • dashboard

  • entity

  • gate

  • timeline

  • uaa

Debugging

In order to debug particular xm microservice:

Update docker file in microservice you want to debug:

Add to JAVA_OPTS variable (or simple pass this options after java -jar myservice.jar -Dagentlib:...):

Add port to expose command (or use any other options from Docker to expose port for container):

Update docker-compose.yml file and add/update microservice configuration you want to debug:

(Intellij idea) Run Remote configuration Open microservice you previously added debug to, In Run/Debug Configuration click on "+" button and find "Remote" configuration, Update "Port" field inside Remote configuration with value 8000, Click Apply and Ok, Run this Remote configuration from menu by click on the green "->" button.

For checking microservice logs you can run

Sometimes you may need to bash into a specific container for debugging purposes. To do that:

bottom of page