hypriot / flash

Command line script to flash SD card images of any kind
MIT License
1k stars 176 forks source link

User-data "docker swarm join --token..." not taken into account at boot #156

Open sountrust opened 4 years ago

sountrust commented 4 years ago

Hello I'm a newbie on docker swarm and user-data file I tried to add a new node to a cluster directly at boot setup with "docker swarm join --token " command in user-data file with no avail Here is a sample of the file:

Screenshot 2019-10-17 at 19 49 31

I successfully ran the command with the same token directly into the node though The purpose is to create a whole raspberry cluster with all workers and managers by configuring data-user file into each Hypriotos thus directly set up with hostnames, services, workers, managers etc... at boot stage. Whether I'm totally wrong or missing something I would be glad hearing advices from any of you Thank you

sountrust commented 4 years ago

Any thoughts ?

StefanScherer commented 4 years ago

These runcmd may be running too eatly on boot. The fake clock/ntp might not have correct time at that point. I had a complex script to create a swarm after powering on the tiny cloud. It recreated the whole swarm due to the missing battery backed hardware clock.