XM^ONLINE INSTALLATION 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.

XM^ONLINE
INSTALLATION

  • 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:

Digital service platform to launch any cloud or on-premise solution MVP in 4 weeks. We offer sustainable software to create a perfect customer experience for any real-time business industry (retail, telecommunication, IoT, etc.). The platform-as-a-service is recognized and used by SaaS startups and Fortune 500 companies.

Trending

Copyright ©2019-2020 XM ONLINE LLC. All rights reserved. XM^ONLINE FAST-CODE DEVELOPMENT PLATFORM