Build fast, scale big with MongoDB Atlas, a hosted service for the leading NoSQL database on AWS. Try it now! Brought to you in partnership with MongoDB.
I've been following the steps in this article to set up a Docker swarm cluster on a pair of Raspberry Pis. Most of the steps work as-is from Mac OS, but for a few steps, there are a couple of variations.
This is most likely going to be part 1 of a few posts as I work through and get this working.
For example, to copy your SSH key to the Pis, instead of:
… you can do (from tip here):
cat ~/.ssh/id_rsa.pub | ssh user@machine "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"
To switch between remote hosts, type...
eval $(docker-machine env pi1)
where pi1 is the name of the remote host.
To switch back to the localhost (not entirely obvious but found the answer here):
eval "$(docker-machine env -u)"
After 'swarm init' and adding the other nodes to the cluster, 'docker swarm ls' lists the nodes in the cluster:
More to come in part 2.
Now it's easier than ever to get started with MongoDB, the database that allows startups and enterprises alike to rapidly build planet-scale apps. Introducing MongoDB Atlas, the official hosted service for the database on AWS. Try it now! Brought to you in partnership with MongoDB.