Docker Community Forums

Share and learn in the Docker community.

Hard-coded names breaking custom Docker-for-Azure implemenation for Docker swarm

(Georgecookeiw) #1


We are developing a highly customised version of the Docker for Azure and we are changing many parts of the ARM templates to accommodate the specific configuration we are trying to implement.

Expected behavior

  • VMSS swarm agents custom name (defined in cusotm ARM template) should be compatible with meta-azure so that agents can join the swarm.
  • Usernames for the manager and workers should be customisable in the ARM template so that using the docker user is not mandatory.

Actual behavior

  • Custom VMSS worker name breaks Docker-swarm join functionality.
  • Custom username breaks Docker-swarm join functionality.

Additional Information

It would be very good to be able to use the inherent parameterisation of the ARM template to implement custom builds of Docker for Azure, but meta-azure has these values hard-coded.

The build process pipes a lot of information from the ARM template to the Azure containers (such as meta-azure) - it seems to me a similar process can be used for that meta-azure container to be passed the relevant customised paramters (username, vm worker name). Unfortunately we can’t even get into the details of the docker4x images to identify/fix the issue ourselves.

Related article: WORKER_TOKEN=Access Denied

Steps to reproduce the behavior

  1. modify ARM template to create swarm workers with customised names
  2. modify ARM template to have a custom username for the VM images
  3. Build the environment
  4. docker node ls to display nodes
  5. notice that no workers have joined the swarm

(Mudgea) #2

I am keen to know how to resolve this as well. Currently all my environments have the same scale set name which is painful.