April 2018
Intermediate to advanced
432 pages
10h 38m
English
We will begin with the simplest way of starting Consul agent on our local machines. The standalone development mode may be easily set up with the Docker container. Here's the command, which will start the Consul container from the official Hashicorp's image available on Docker Hub:
docker run -d --name consul -p 8500:8500 consul
After launching, Consul is available under the address http://192.168.99.100:8500. It exposes RESTful HTTP API, that is, the main interface. All the API routes are prefixed with /v1/. Of course, it is not required to use the API directly. There are some programming libraries that can be used to consume the API more conveniently. One of them is consul-api, the client written in Java and also used ...