Connecting XL JetPack Release and Deploy


#1

I have XL JetPack Release and XL JetPack Deploy running, and I can access them both using localhost. However, when I try to add Deploy as a server in the Release configuration, http://localhost:4516 doesn’t work.


#2

To ensure that the Docker containers can “talk to” each other, it’s best to start them in the same network. There are two ways you can do it.

#1 - Specify a network in the run command

You can create a network using the docker network create command:

docker network create jetpack

Then, refer to that network in the Docker run commands:

docker run --network=jetpack -e "ADMIN_PASSWORD=admin" -e "ACCEPT_EULA=Y" -p 4516:4516 --name xld xebialabs/xl-jetpack-deploy:8.5

docker run --network=jetpack -e "ADMIN_PASSWORD=admin" -e "ACCEPT_EULA=Y" -p 5516:5516 --name xlr xebialabs/xl-jetpack-release:8.5

Tip: To see the Docker networks that already exist in your environment, run docker network ls.

#2 - Use a Docker Compose file

If you stop and start the containers repeatedly, it’s a good idea to create a Docker Compose file that contains the settings that you’d normally specify in the run command. Docker Compose automatically puts all of the images listed in the file in the same network, as described here. See here for a sample Docker Compose file that you can use for XL JetPack.

After the containers start, you can use the URL that you see in the Deploy server log for communication between Release and Deploy; it should look something like http://d76e8c6ea0cf:4516/.


#3

In Amy’s response above, your XLR instance can refer to xld:4516 because the name “xld” will resolve correctly.

From your working computer (your host), localhost is the name your computer uses to refer to itself. When you run a container, you are mapping ports 4516 and 5516 to the respective XLD and XLR containers. So localhost:4516 is routed over to your container. Your containers, on the other hand, use “localhost” to refer to themselves, and have no idea of what routes your host computer are using. This is why you create the network (named “jetpack” above) for proper namespaces.


#4

After the containers start, you can use the URL that you see in the Deploy server log for communication between Release and Deploy; it should look something like http://d76e8c6ea0cf:4516/ .

You can also refer to Deploy using its container name in the URL; for example, http://xl-deploy:4516.