Minimum System Requirements

These are expected on every developer laptop:

  • JDK 8

  • Maven 3.3.x

  • IDE (Intellij/Eclipse)

  • Git

Additional Software

The tutorial uses the WildFly application server for running the monolith and the Consul for service registration and discovery. WildFly can be run as simple java process, just download, unzip and run it (standalone.sh/standalone.bat).

Consul is written in Go and you would need to install the native binary for running the registry.

Consul Service Registry

Download Consul for your OS, including the web UI, which is a separate artifact:

You can start it like this (i.e. with CONSUL_IP=127.0.0.1):

./consul agent --ui-dir=<UI_DIR> --data-dir=/tmp/consul -bind <CONSUL_IP> -server -bootstrap

To verify that it’s successfully started you can visit the consul web interface:

http://<CONSUL_IP>:8500/ui/
Note
Make note of the registry address http://<CONSUL_IP>:8500. It’s the address that the services need to advertise their presence.

WildFly Application Server

WildFly will be used to host the monolith and remaining parts of it when we extract each service one after the other. Towards the end of the tutorial, WildFly becomes obsolete and all services will be replaced by WildFly Swarm.

Download and install WildFly

WildFly can be downloaded from the WildFly Homepage. Simply follow the instructions in the Getting Started Guide, on how to install, configure and start the application server.

Make note of the <WILDFLY_IP>, which by default is localhost. Without further configuration the HTTP server listens on port 8080. We do however need to bind WildFly to a public address (i.e. that of your network card), otherwise the services will advertise “localhost” as their address, which makes them inaccessible in some cases (docker, remote host, etc)

Note
When you start WildFly make sure to provide the consul.host system property. This tells any service deployed to WildFly, where to find consul: ./bin/standalone.sh -Dconsul.host=<CONSUL_IP>. Take a look at the services module to see how it’s implemented.

Before you get started

Make sure you have written down the main network addresses that we will use throughout the activities:

Table 1. Network Addresses In Use
Component Referred to as Address

Consul

<CONSUL_IP>

?

WildFly

<WILDFLY_IP>

?

Public IP

<PUBLIC_IP>

?

For the activities you need the software listed in section “Additional Software”. Both WildFly and Consul must be running.