From 9a93e43801765739ce03bcc65eb1aa6f97b59316 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Thu, 7 Aug 2014 10:55:28 +0200 Subject: [PATCH] Rename several variable/machine names Change-Id: I12732a5360024d1cfa744c96f58e9c4ebfa212c6 --- Vagrantfile | 16 ++++++++-------- config.yaml.sample | 9 +++++---- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index d97a7c6..31a27f4 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -10,9 +10,9 @@ require 'yaml' conf = YAML.load(File.open('config.yaml')) def configure_vm(name, vm, conf) - vm.hostname = conf["#{name}_hostname"] or name + vm.hostname = conf["hostname_#{name}"] || name # we do an L2 bridge directly onto the physical network, which means - # that your OpenStack hosts (manager, compute1) are directly in the + # that your OpenStack hosts (manager, compute) are directly in the # same network as your physical host. Your OpenStack guests (2nd # level guests that you create in nova) will be also on the same L2, # however they will be in a different address space (10.0.0.0/24 by @@ -25,9 +25,9 @@ def configure_vm(name, vm, conf) vm.provider :virtualbox do |vb| # you need this for openstack guests to talk to each other vb.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"] - # allows for stable mac addresses - if conf["#{name}_mac"] - vb.customize ["modifyvm", :id, "--macaddress2", conf["#{name}_mac"]] + # if specified assign a static MAC address + if conf["mac_address_#{name}"] + vb.customize ["modifyvm", :id, "--macaddress2", conf["mac_address_#{name}"]] end end @@ -93,9 +93,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| configure_vm("manager", manager.vm, conf) end - if conf['compute1_hostname'] - config.vm.define "compute1" do |compute1| - configure_vm("compute1", compute1.vm, conf) + if conf['hostname_compute'] + config.vm.define "compute" do |compute| + configure_vm("compute", compute.vm, conf) end end diff --git a/config.yaml.sample b/config.yaml.sample index 5a8a5e9..069c24e 100644 --- a/config.yaml.sample +++ b/config.yaml.sample @@ -1,5 +1,6 @@ -manager_hostname: api.dague.pvt -compute1_hostname: compute1.dague.pvt +hostname_manager: manager.openstack.site +hostname_compute: compute.openstack.site + stack_pass: somebiglongLinuxpasswordhash stack_sshkey: > the_ssh_public_key_you_want_for_your_stack_user @@ -27,5 +28,5 @@ bridge_int: eth1 # You can specify stable mac addresses to keep this from resetting # on every create -# manager_mac: 0800274a508c -# compute1_mac: 0800274a508d +# mac_address_manager: 0800274a508c +# mac_address_compute: 0800274a508d