Over a million developers have joined DZone.

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

Get the Metrics Collection and Monitoring Essentials tutorial collection. A 4-part tutorial series from DigitalOcean.

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.

Getting Started with Kubernetes: A Webinar Series brought to you by DigitalOcean

docker ,raspberry pi ,cluster

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}