Configuration for deploying a highly avaliable and clustered Developer News API enviroment onto a CoreOS platform
- 3 node minimum CoreOS cluster
Grab the repo:
git clone https://github.com/imjacobclark/devnews-coreos.git && devnews-coreos
Launch the static loadbalancer:
fleetctl start fleet/statics/devnews-core-loadbalancer.service
Submit templates to Fleet:
fleetctl submit fleet/templates/devnews-core@.service fleet/templates/devnews-core-discovery@.service
Load and start the units:
fleetctl start fleet/instances*
To add more units to your cluster, replacing {port} with a port number not currently in use by devnews-core:
ln -s fleet/templates/devnews-core@.service fleet/instances/devnews-core@{port}.service && ln -s fleet/templates/devnews-core-discovery@.service fleet/instances/devnews-core-discovery@{port}.service
View the IPs of each running service:
etcdctl ls --recursive /services/devnews-core
View the IPs and Ports of each running service, replacing {ip} with a returned IP from the previous command:
etcdctl get /services/devnews-core/{ip}
Enjoy.