I would like to deploy a cluster of CouchDB servers behind a load balancer, and have the services do that magical etcd discovery. After finishing the CoreOS quickstart, I am at a loss for how to actually use what I have just learned in a project of my own, and I can't tell which of the more in-depth tutorials would get me going.
In the demo, I wrote a service file inside of a running instance, and then used fleetctl to start it. What I would like to do, is have that service file under version control in my project, like the Dockerfile. How do I get the CoreOS cluster to initialize using an external service file?
I am developing locally using Vagrant, but I will deploy to AWS as soon.
I did a quick search for coreos on aws and the first link was the amazon product. they have pretty good documentation on how to do that. from a high level, you need to use a cloud-config file. when you boot your coreos (that is, instantiate the ec2 image) you can pass a text file in the user_data. that text file lets you do a couple of things, mainly write files and then define units. Units are your services. Anything in the cloud-config file will be started automatically when you 'boot' your ec2 instance.
Or, you can use the 'write_files' directive in the cloud_config to create each individual service. For example, my cloud config has:
There is a bit of a learning curve to the systemd init stuff. I don't know how a cloud-config file would play with the vagrant environment either. many platforms use a cloud-config, so, that is a good think to start with.
-g