Guys, i’m trying to register hosts dynamicaly with an AWS Auto Scaling Group. Each EC2 is configured with RancherOS (latest) using the cloud-init (using the user data) to register itself as rancher host at some environment but only the registration of the first host is done. Other hosts doesn’t register itself and my suspect is about the server-token generated from the “Add New Custom Host” functionality. New Custom Host button generates different tokens each action and i suspect it’s the issue… Bellow my config-file, hope anyone can help me.
#cloud-config rancher: services: rancher-agent1: image: rancher/agent:v0.8.2 command: http://<MY-SERVER-IP>:8080/v1/scripts/5F4045A7360FDCA412CA:1477353600000:f9LDmJI8UirXsvqss6M3Iw98ZKo privileged: true volumes: - /var/run/docker.sock:/var/run/docker.sock