Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Support running Flynn clusters on a single machine #1891

Merged
merged 4 commits into from Sep 19, 2015

Conversation

lmars
Copy link
Contributor

@lmars lmars commented Sep 19, 2015

This is made possible by creating virtual network interfaces for each node and binding all host network services (i.e. flynn-host, discoverd, flannel and router) to those interfaces.

My main motivator here is being able to test updating a discoverd cluster on my local machine, but this is also pretty useful in general.

Boot a 5 node cluster:

$ script/bootstrap-flynn --size 5

or run integration tests against a 5 node cluster:

$ script/run-integration-tests --size 5

It works fine for me on an EC2 instance, but I would appreciate other people testing this out in their own environments.

/cc @titanous @jvatic @jzila @benbjohnson

Signed-off-by: Lewis Marshall <lewis@lmars.net>
Signed-off-by: Lewis Marshall <lewis@lmars.net>
Signed-off-by: Lewis Marshall <lewis@lmars.net>
Signed-off-by: Lewis Marshall <lewis@lmars.net>
@lmars
Copy link
Contributor Author

lmars commented Sep 19, 2015

Oh I forgot to mention, the only downside here is that when you boot a multi-node cluster, flynn-host commands won't work by default (as they try to connect to discoverd at 127.0.0.1), so you need to:

export DISCOVERD="198.51.100.1:1111"

@titanous
Copy link
Contributor

🎈 🎉 😍

@jzila
Copy link
Contributor

jzila commented Sep 19, 2015

@lmars could you put the export into the Vagrantfile?

@jvatic
Copy link
Contributor

jvatic commented Sep 19, 2015

👍

@lmars
Copy link
Contributor Author

lmars commented Sep 19, 2015

@jzila the only issue with adding it to the Vagrantfile is that booting a single node cluster does not create the virtual interfaces, instead listening on all interfaces (so it is accessible from the host in case of Vagrant).

We could also start single node clusters using a virtual interface and always access at 198.51.100.1, but then you can't access it from the host (well, not without doing more work like using iptables).

lmars added a commit that referenced this pull request Sep 19, 2015
Support running Flynn clusters on a single machine
@lmars lmars merged commit 05044fb into master Sep 19, 2015
@lmars lmars deleted the multi-node-single-machine branch September 19, 2015 20:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants