I would like to request the ability to skip creating "kamal" network. In the docs, it is suggested that we pre-create the "kamal" network prior to deployment, but in my case it's not sufficient if you are trying to connect all the deployed apps to the same overlay, swarm network.
My use case is as follow:
I have Elixir apps deployed to multiple servers
These Elixir apps need to be connected to the same network to make them a single Erlang cluster
To make the above possible, these servers are connected to the same docker swarm with one of the nodes acts as the manager
It uses overlay network in swarm scope connecting all these servers
I don't mind naming it "kamal"
HOWEVER, overlay swarm network in Docker that spans multiple servers has a condition in which a host is not yet connected to the network unless it has a running container connected to the network.
So, currently, what happened in my setup is as follow:
I have a new node that I want to add as a deployment target
I have previously created the network in the manager node, named "kamal"; overlay driver + swarm scope
In the docker-setup hook, I connect the new node to the swarm as worker. Note: the new node is not automatically connected to the network since there is no running container that connected to the network. It's a new server after all.
In one of the deployment steps, Kamal tries to create "kamal" network in the worker node. It will successfully create the new local bridge network named "kamal" (because at this point before auto creation of the network, the new node is not yet connected to the previously created overlay network, so no conflicting network name)
Now there are two networks named kamal; one is the "correct" overlay network and the other is the local bridge network in the new node
With that new behavior in Kamal 2 (always tries to create new "kamal" network), I have 2 somewhat hacky solutions:
Make all nodes act as manager node in the swarm. No worker nodes. This way, all nodes can manage the swarm network.
Create a "dummy" service that make all the servers have a running container, making the "kamal" overlay network immediately discoverable
My ideal solution would be an ability to skip auto creation of "kamal" network.
I would like to request the ability to skip creating "kamal" network. In the docs, it is suggested that we pre-create the "kamal" network prior to deployment, but in my case it's not sufficient if you are trying to connect all the deployed apps to the same overlay, swarm network.
My use case is as follow:
HOWEVER, overlay swarm network in Docker that spans multiple servers has a condition in which a host is not yet connected to the network unless it has a running container connected to the network.
So, currently, what happened in my setup is as follow:
With that new behavior in Kamal 2 (always tries to create new "kamal" network), I have 2 somewhat hacky solutions:
My ideal solution would be an ability to skip auto creation of "kamal" network.