Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Docker Swarm Node Set Up with Docker 1.12 RC on Raspberry Pi (Part 1)

DZone's Guide to

Docker Swarm Node Set Up with Docker 1.12 RC on Raspberry Pi (Part 1)

Kevin Hooke's part 1 gives quick tips to get Docker up and running.

· Cloud Zone
Free Resource

MongoDB Atlas is a database as a service that makes it easy to deploy, manage, and scale MongoDB. So you can focus on innovation, not operations. 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:

ssh-copy-id pirate@pi3.local


… 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.

MongoDB Atlas is the best way to run MongoDB on AWS — highly secure by default, highly available, and fully elastic. Get started free. Brought to you in partnership with MongoDB.

Topics:
docker ,raspberry pi ,cluster

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}