Question

Is there a procedure for adding another host into an existing cluster? I'm using EC2.

I'm thinking it could be done by using CloudFormation again:

 aws cloudformation create-stack \
   --template-body "$(<deis.template)" \
   --stack-name deis-2 \
   --parameters "$(<cloudformation.json)"

Which would need a new stack name. That adds the new host.

Or just launch a new instance with the cli?

aws ec2 run-instances --image-id ami-cfe125b8 --count 1 --instance-type m3.medium --key-name deis --security-groups sg-b7edc3c0,sg-c9edc3be

I'm guessing the host should be in both the coreos and deis security groups? And how does fleet know about the new host?

Then, we need to alter the hosts field?

deis clusters:info <cluster>

deis clusters:update <cluster> hosts=x,y,z

Anything else necessary? Is there another, easier way of doing it?

Was it helpful?

Solution

Since all we're dealing with here is CoreOS, it's completely possible to add new nodes to the cluster. The only requirement that you must do is to apply the cloud-config template that you applied to every other node in the cluster to the new instance. See https://coreos.com/docs/running-coreos/cloud-providers/ec2/ for more info.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top