0
votes

so I created three coreos(container linux) instances on aws without user-data/cloud-config.

I did this because my understanding was that cloud-config was just for setting up services and ssh-keys etc and I wanted to do that through other means.

Now I want to know how these three separate instance can be converted to act as a cluster so that updates happen one at a time

basically my question in essence would be what is the required thing that makes separate instances into a cluster in coreos?

1
erm, launch into an auto-scale group, or put them behind an ELB.user6438501
umm, i auto-scale group adds more instances in case instance fails or is at capacity, and elb load balances between services, but what i am asking is how to make separate instances to act like a cluster in this case specifically for automatic updation provided by coreos, @sudosoulfewtile42

1 Answers

0
votes

The easiest way is to just destroy and recreate the machines. Using cloud-init makes this easy, once you get it working just right.

The next best way is going to be writing out a systemd "drop in" per machine, with the etcd clustering config. You will need to translate the flags from this example into env vars (they follow the same format) and include those env vars in a drop in.

An example looks like:

/etcd/systemd/system/etcd2.service.d/10-clustering.conf

[Service]
Environment=ETCD_LISTEN_PEER_URLS=http://10.0.0.1:2380
Environment=ETCD_<insert others>
...

After applying these, run sudo systemctl daemon-reload to pick up the changes, and then sudo systemctl restart etcd2. You can check if your changes were picked up correctly in the etcd log (it logs all detected env vars) and with systemctl cat etcd2, which should list out your drop in.