From f0a7a250b05dcd2e88b97b5eb180058f22931473 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Thu, 22 Sep 2016 23:46:09 -0400 Subject: [PATCH] vagrant: add label_prefix setting This enables running multiple clusters concurrently in the same Linode account. Linode does not allow machines to have the same label. Signed-off-by: Patrick Donnelly --- Vagrantfile | 2 +- vagrant_variables.yml.linode | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index cba6d4399..6ba143f1e 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -9,7 +9,7 @@ DEBUG = false config_file=File.expand_path(File.join(File.dirname(__FILE__), 'vagrant_variables.yml')) settings=YAML.load_file(config_file) -LABEL_PREFIX = "" +LABEL_PREFIX = settings['label_prefix'] ? settings['label_prefix'] : "" NMONS = settings['mon_vms'] NOSDS = settings['osd_vms'] NMDSS = settings['mds_vms'] diff --git a/vagrant_variables.yml.linode b/vagrant_variables.yml.linode index 60d55860d..80fb5931e 100644 --- a/vagrant_variables.yml.linode +++ b/vagrant_variables.yml.linode @@ -3,6 +3,9 @@ vagrant_box: 'linode' vagrant_box_url: 'https://github.com/displague/vagrant-linode/raw/master/box/linode.box' +# Set a label prefix for the machines in this cluster. (This is useful and necessary when running multiple clusters concurrently.) +#label_prefix: 'foo' + ssh_username: 'vagrant' ssh_private_key_path: '~/.ssh/id_rsa' -- 2.47.3