diff --git a/.rubocop.yml b/.rubocop.yml index 14c9478..c6e37bf 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,3 +1,5 @@ +inherit_from: .rubocop_todo.yml + AllCops: Include: - '**/*.rb' diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 0000000..3e52f48 --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,12 @@ +# This configuration was generated by +# `rubocop --auto-gen-config` +# on 2017-08-02 14:33:46 -0400 using RuboCop version 0.47.1. +# The point is for the user to remove these configuration records +# one by one as the offenses are removed from the code base. +# Note that changes in the inspected code, or installation of new +# versions of RuboCop, may require this file to be generated again. + +# Offense count: 2 +# Configuration parameters: CountComments, ExcludedMethods. +Metrics/BlockLength: + Max: 33 diff --git a/Berksfile b/Berksfile index 1188a5a..bfb09c1 100644 --- a/Berksfile +++ b/Berksfile @@ -23,4 +23,4 @@ source 'https://supermarket.chef.io' end cookbook 'openstackclient', github: 'cloudbau/cookbook-openstackclient' -cookbook 'statsd', github: 'att-cloud/cookbook-statsd' +cookbook 'statsd', github: 'librato/statsd-cookbook' diff --git a/Rakefile b/Rakefile index a4a5ab6..27a3f9e 100644 --- a/Rakefile +++ b/Rakefile @@ -39,12 +39,12 @@ end desc "All-in-One build" task :allinone => :create_key do - run_command("chef-client #{client_opts} -o 'provisioning::vagrant_linux,provisioning::allinone'") + run_command("chef-client #{client_opts} -o 'provisioning::allinone'") end -desc "Multi-Node build" -task :multi_node => :create_key do - run_command("chef-client #{client_opts} -o 'provisioning::vagrant_linux,provisioning::multi-node'") +desc "Multinode build" +task :multinode => :create_key do + run_command("chef-client #{client_opts} -o 'provisioning::multinode'") end desc "Blow everything away" @@ -164,19 +164,6 @@ def _setup_local_network # rubocop:disable Metrics/MethodLength ) end -# Helper for setting up nova cells -def _setup_nova_cells # rubocop:disable Metrics/MethodLength - _run_commands('nova cells setup', { - 'nova-manage cell_v2' => ['list_cells', - 'map_cell0 --database_connection mysql+pymysql://nova_cell0:mypass@127.0.0.1/nova_cell0?charset=utf8', - 'create_cell --verbose --name cell1', - 'discover_hosts', - 'list_cells' - ], - 'nova-manage' => ['db sync'] } - ) -end - # Helper for setting up tempest and upload the default cirros image. def _setup_tempest(client_opts) sh %(sudo chef-client #{client_opts} -E integration-#{@platform} -r 'recipe[openstack-integration-test::setup]') @@ -199,9 +186,9 @@ task :integration => [:create_key, :berks_vendor] do _run_env_queries # Install mysql2 gem to avoid hitting mirror issues - sh %(wget https://rubygems.org/downloads/mysql2-0.4.4.gem) + sh %(wget https://rubygems.org/downloads/mysql2-0.4.5.gem) sh %(sudo apt-get install -y libmysqlclient-dev) - sh %(chef exec gem install -N ./mysql2-0.4.4.gem) + sh %(chef exec gem install -N ./mysql2-0.4.5.gem) # Three passes to make sure of cookbooks idempotency for i in 1..3 @@ -210,7 +197,6 @@ task :integration => [:create_key, :berks_vendor] do # Kick off chef client in local mode, will converge OpenStack right on the gate job "in place" sh %(sudo chef-client #{client_opts} -E integration-#{@platform} -r 'role[minimal]') if i == 1 - _setup_nova_cells _setup_tempest(client_opts) _setup_local_network end diff --git a/environments/multi-node-centos7.json b/environments/multinode-centos7.json similarity index 91% rename from environments/multi-node-centos7.json rename to environments/multinode-centos7.json index 14181e3..cf7da0a 100644 --- a/environments/multi-node-centos7.json +++ b/environments/multinode-centos7.json @@ -1,5 +1,5 @@ { - "name": "multi-node-centos7", + "name": "multinode-centos7", "cookbook_versions": { }, "json_class": "Chef::Environment", @@ -30,7 +30,8 @@ "compute-novnc": { "host": "192.168.101.60" }, "orchestration-api": { "host": "192.168.101.60" }, "orchestration-api-cfn": { "host": "192.168.101.60" }, - "orchestration-api-cloudwatch": { "host": "192.168.101.60" } + "orchestration-api-cloudwatch": { "host": "192.168.101.60" }, + "placement-api": { "host": "192.168.101.60" } }, "internal": { "identity": { "host": "192.168.101.60" }, @@ -43,7 +44,8 @@ "compute-novnc": { "host": "192.168.101.60" }, "orchestration-api": { "host": "192.168.101.60" }, "orchestration-api-cfn": { "host": "192.168.101.60" }, - "orchestration-api-cloudwatch": { "host": "192.168.101.60" } + "orchestration-api-cloudwatch": { "host": "192.168.101.60" }, + "placement-api": { "host": "192.168.101.60" } }, "public": { "identity": { "host": "192.168.101.60" }, @@ -56,9 +58,11 @@ "compute-novnc": { "host": "192.168.101.60" }, "orchestration-api": { "host": "192.168.101.60" }, "orchestration-api-cfn": { "host": "192.168.101.60" }, - "orchestration-api-cloudwatch": { "host": "192.168.101.60" } + "orchestration-api-cloudwatch": { "host": "192.168.101.60" }, + "placement-api": { "host": "192.168.101.60" } } }, + "bind_interface": "enp0s8", "bind_service": { "mq": { "host": "192.168.101.60" }, "main": { @@ -77,7 +81,8 @@ "compute-novnc": { "host": "0.0.0.0" }, "orchestration-api": { "host": "0.0.0.0" }, "orchestration-api-cfn": { "host": "0.0.0.0" }, - "orchestration-api-cloudwatch": { "host": "0.0.0.0" } + "orchestration-api-cloudwatch": { "host": "0.0.0.0" }, + "placement-api": { "host": "0.0.0.0" } } }, "dashboard": { diff --git a/environments/multi-node-ubuntu16.json b/environments/multinode-ubuntu16.json similarity index 84% rename from environments/multi-node-ubuntu16.json rename to environments/multinode-ubuntu16.json index d560b74..98f378c 100644 --- a/environments/multi-node-ubuntu16.json +++ b/environments/multinode-ubuntu16.json @@ -1,5 +1,5 @@ { - "name": "multi-node-ubuntu16", + "name": "multinode-ubuntu16", "cookbook_versions": { }, "json_class": "Chef::Environment", @@ -15,12 +15,16 @@ "override_attributes": { "openstack": { "apt": { + "unattended_upgrades": { + "enable": false + }, "update_apt_cache": true }, "sysctl": { "net.ipv4.ip_forward": 1 }, "endpoints": { + "db": { "host": "192.168.101.60" }, "mq": { "host": "192.168.101.60" }, "admin": { "identity": { "host": "192.168.101.60" }, @@ -33,7 +37,8 @@ "compute-novnc": { "host": "192.168.101.60" }, "orchestration-api": { "host": "192.168.101.60" }, "orchestration-api-cfn": { "host": "192.168.101.60" }, - "orchestration-api-cloudwatch": { "host": "192.168.101.60" } + "orchestration-api-cloudwatch": { "host": "192.168.101.60" }, + "placement-api": { "host": "192.168.101.60" } }, "internal": { "identity": { "host": "192.168.101.60" }, @@ -46,7 +51,8 @@ "compute-novnc": { "host": "192.168.101.60" }, "orchestration-api": { "host": "192.168.101.60" }, "orchestration-api-cfn": { "host": "192.168.101.60" }, - "orchestration-api-cloudwatch": { "host": "192.168.101.60" } + "orchestration-api-cloudwatch": { "host": "192.168.101.60" }, + "placement-api": { "host": "192.168.101.60" } }, "public": { "identity": { "host": "192.168.101.60" }, @@ -59,11 +65,13 @@ "compute-novnc": { "host": "192.168.101.60" }, "orchestration-api": { "host": "192.168.101.60" }, "orchestration-api-cfn": { "host": "192.168.101.60" }, - "orchestration-api-cloudwatch": { "host": "192.168.101.60" } + "orchestration-api-cloudwatch": { "host": "192.168.101.60" }, + "placement-api": { "host": "192.168.101.60" } } }, "bind_service": { - "mq": { "host": "0.0.0.0" }, + "db": { "host": "192.168.101.60" }, + "mq": { "host": "192.168.101.60" }, "main": { "identity": { "host": "0.0.0.0" } }, @@ -80,7 +88,8 @@ "compute-novnc": { "host": "0.0.0.0" }, "orchestration-api": { "host": "0.0.0.0" }, "orchestration-api-cfn": { "host": "0.0.0.0" }, - "orchestration-api-cloudwatch": { "host": "0.0.0.0" } + "orchestration-api-cloudwatch": { "host": "0.0.0.0" }, + "placement-api": { "host": "0.0.0.0" } } }, "dashboard": { @@ -89,9 +98,9 @@ "mq": { "user": "admin" }, - "network":{ + "network": { "plugins": { - "ml2": { + "ml2_openvswitch": { "conf": { "ml2_type_vxlan": { "vni_ranges": "65537:69999", @@ -105,7 +114,7 @@ "DEFAULT": { "service_plugins": "router" }, - "oslo_messaging_rabbit": { "rabbit_host": "192.168.101.60" }, + "transport_url": { "rabbit_host": "192.168.101.60" }, "ml2": { "tenant_network_types": "vxlan" } } }, @@ -117,7 +126,7 @@ "libvirt": { "virt_type": "qemu" }, - "oslo_messaging_rabbit": { "rabbit_host": "192.168.101.60" } + "transport_url": { "rabbit_host": "192.168.101.60" } } } } diff --git a/roles/multi-node-compute.json b/roles/multinode-compute.json similarity index 95% rename from roles/multi-node-compute.json rename to roles/multinode-compute.json index 96096cd..f739b92 100644 --- a/roles/multi-node-compute.json +++ b/roles/multinode-compute.json @@ -1,5 +1,5 @@ { - "name": "multi-node-compute", + "name": "multinode-compute", "description": "This will deploy a compute node for a scenarios with just compute and controller nodes", "json_class": "Chef::Role", "default_attributes": { diff --git a/roles/multi-node-controller.json b/roles/multinode-controller.json similarity index 83% rename from roles/multi-node-controller.json rename to roles/multinode-controller.json index b1fd4e4..698b0e0 100644 --- a/roles/multi-node-controller.json +++ b/roles/multinode-controller.json @@ -1,5 +1,5 @@ { - "name": "multi-node-controller", + "name": "multinode-controller", "description": "This will deploy a controller node for a scenarios with just compute and controller nodes", "json_class": "Chef::Role", "default_attributes": { @@ -22,23 +22,16 @@ "recipe[openstack-image::api]", "recipe[openstack-image::registry]", "recipe[openstack-image::identity_registration]", - "recipe[openstack-network::identity_registration]", - "recipe[openstack-network::ml2_core_plugin]", - "recipe[openstack-network::ml2_openvswitch]", "recipe[openstack-network]", - "recipe[openstack-network::openvswitch]", - "recipe[openstack-network::_bridge_config_example]", - "recipe[openstack-network::plugin_config]", "recipe[openstack-network::server]", - "recipe[openstack-network::l3_agent]", - "recipe[openstack-network::dhcp_agent]", - "recipe[openstack-network::metadata_agent]", - "recipe[openstack-network::openvswitch_agent]", + "recipe[openstack-network::ml2_core_plugin]", + "recipe[openstack-network::openvswitch]", "recipe[openstack-compute::nova-setup]", "recipe[openstack-compute::identity_registration]", "recipe[openstack-compute::conductor]", "recipe[openstack-compute::api-os-compute]", "recipe[openstack-compute::api-metadata]", + "recipe[openstack-compute::placement_api]", "recipe[openstack-compute::scheduler]", "recipe[openstack-compute::vncproxy]", "recipe[openstack-compute::identity_registration]", diff --git a/roles/multinode-network.json b/roles/multinode-network.json new file mode 100644 index 0000000..9190984 --- /dev/null +++ b/roles/multinode-network.json @@ -0,0 +1,24 @@ +{ + "name": "multinode-network", + "description": "This will deploy a controller node for a scenarios with just compute and controller nodes", + "json_class": "Chef::Role", + "default_attributes": { + }, + "override_attributes": { + }, + "chef_type": "role", + "run_list": [ + "recipe[build-essential]", + "recipe[openstack-common]", + "recipe[openstack-common::logging]", + "recipe[openstack-common::sysctl]", + "recipe[openstack-network::ml2_openvswitch]", + "recipe[openstack-network::l3_agent]", + "recipe[openstack-network::dhcp_agent]", + "recipe[openstack-network::metadata_agent]", + "recipe[openstack-network::openvswitch_agent]" + ], + "env_run_lists": { + } +} + diff --git a/site-cookbooks/provisioning/recipes/allinone.rb b/site-cookbooks/provisioning/recipes/allinone.rb index 15882fc..527158c 100644 --- a/site-cookbooks/provisioning/recipes/allinone.rb +++ b/site-cookbooks/provisioning/recipes/allinone.rb @@ -1,11 +1,24 @@ require 'chef/provisioning' +require 'chef/provisioning/vagrant_driver' -default_bridge = '["en0: USB Ethernet","en1: USB Ethernet",' -default_bridge += '"en2: USB Ethernet","en3: USB Ethernet",' -default_bridge += '"en4: USB Ethernet","eth0","wlan0",' -default_bridge += '"en0: Wi-Fi (AirPort)","en1: Wi-Fi (AirPort)",' -default_bridge += '"en2: Wi-Fi (AirPort)",' -default_bridge += '"Intel(R) Centrino(R) Advanced-N 6205"]' +with_driver 'vagrant' + +os = 'ubuntu/xenial64' +os = 'centos/7' if ENV['REPO_OS'].to_s.include?('centos') + +env = 'allinone-ubuntu16' +env = 'allinone-centos7' if ENV['REPO_OS'].to_s.include?('centos') + +# make sure your ethernet interface matches preferred_interfaces, or override +# with OS_BRIDGE + +# rubocop:disable LineLength +preferred_interfaces = ['Ethernet', 'eth0', 'enp3s0', 'Wi-Fi', + 'Thunderbolt 1', 'Thunderbolt 2', 'Centrino'] +host_interfaces = `VBoxManage list bridgedifs | grep ^Name` + .gsub(/Name:\s+/, '').split("\n") +default_bridge = preferred_interfaces.map { |pi| host_interfaces.find { |vm| vm =~ /#{Regexp.quote(pi)}/ } }.compact[0] +# rubocop:enable LineLength bridge = if ENV['OS_BRIDGE'] "\"#{ENV['OS_BRIDGE']}\"" @@ -13,30 +26,42 @@ bridge = if ENV['OS_BRIDGE'] default_bridge end -controller_config = <<-ENDCONFIG - config.vm.network "forwarded_port", guest: 443, host: 9443 - config.vm.network "forwarded_port", guest: 4002, host: 4002 - config.vm.network "forwarded_port", guest: 5000, host: 5000 - config.vm.network "forwarded_port", guest: 6080, host: 6080 - config.vm.network "forwarded_port", guest: 8773, host: 8773 - config.vm.network "forwarded_port", guest: 8774, host: 8774 - config.vm.network "forwarded_port", guest: 35357, host: 35357 - config.vm.provider "virtualbox" do |v| - v.memory = 8192 - v.cpus = 4 - v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"] - v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] - end - config.vm.network "private_network", :type => 'dhcp', :adapter => 2 - config.vm.network "public_network", - bridge: #{bridge} -ENDCONFIG - -env = 'allinone-ubuntu16' -env = 'allinone-centos7' if ENV['REPO_OS'].to_s.include?('centos') +### +# allinone compute controller +### +options = { + vagrant_options: { + 'vm.box' => os, + 'vm.network' => [ + ':forwarded_port, guest: 443, host: 9443', + ':forwarded_port, guest: 4002, host: 4002', + ':forwarded_port, guest: 5000, host: 5000', + ':forwarded_port, guest: 6080, host: 6080', + ':forwarded_port, guest: 8773, host: 8773', + ':forwarded_port, guest: 8774, host: 8774', + ':forwarded_port, guest: 35357, host: 35357' + ] + }, + vagrant_config: <<-EOF + config.vm.provision "chef_solo" do |chef| + chef.version = "12.21.3" + chef.channel = "stable" + end + config.vm.provider "virtualbox" do |v| + v.memory = 8192 + v.cpus = 4 + v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"] + v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] + end + config.vm.define "controller" do |cont| + cont.vm.network "private_network", :type => "dhcp", :adapter => 2 + cont.vm.network "public_network", :dev => "#{bridge}", :mode => "bridge", :type => "bridge" + end + EOF +} machine 'controller' do - add_machine_options vagrant_config: controller_config + machine_options options role 'allinone' chef_environment env file('/etc/chef/openstack_data_bag_secret', diff --git a/site-cookbooks/provisioning/recipes/multi-node.rb b/site-cookbooks/provisioning/recipes/multi-node.rb deleted file mode 100644 index 2a0fb7f..0000000 --- a/site-cookbooks/provisioning/recipes/multi-node.rb +++ /dev/null @@ -1,57 +0,0 @@ -require 'chef/provisioning' - -# config for controller-node vagrant box -controller_config = <<-ENDCONFIG - config.vm.network "forwarded_port", guest: 443, host: 9443 # dashboard-ssl - config.vm.network "forwarded_port", guest: 4002, host: 4002 - config.vm.network "forwarded_port", guest: 5000, host: 5000 - config.vm.network "forwarded_port", guest: 8774, host: 8774 # compute-api - config.vm.network "forwarded_port", guest: 35357, host: 35357 - config.vm.provider "virtualbox" do |v| - v.memory = 6144 - v.cpus = 2 - v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"] - v.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"] - v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] - end - config.vm.network "private_network", ip: "192.168.100.60" - config.vm.network "private_network", ip: "192.168.101.60" -ENDCONFIG - -env = 'multi-node-ubuntu16' -env = 'multi-node-centos7' if ENV['REPO_OS'].to_s.include?('centos') - -# create controller-node with config defined above -machine 'controller' do - add_machine_options vagrant_config: controller_config - role 'multi-node-controller' - chef_environment env - file('/etc/chef/openstack_data_bag_secret', - "#{File.dirname(__FILE__)}/../../../../../encrypted_data_bag_secret") - converge true -end - -[%w(compute1 61), %w(compute2 62)].each do |name, ip_suff| - # config for compute-node vagrant box - compute_config = <<-ENDCONFIG - config.vm.provider "virtualbox" do |v| - v.memory = 2048 - v.cpus = 2 - v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"] - v.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"] - v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] - end - config.vm.network "private_network", ip: "192.168.100.#{ip_suff}" - config.vm.network "private_network", ip: "192.168.101.#{ip_suff}" - ENDCONFIG - - # create compute-node with config defined above - machine name do - add_machine_options vagrant_config: compute_config - role 'multi-node-compute' - chef_environment env - file('/etc/chef/openstack_data_bag_secret', - "#{File.dirname(__FILE__)}/../../../../../encrypted_data_bag_secret") - converge true - end -end diff --git a/site-cookbooks/provisioning/recipes/multinode.rb b/site-cookbooks/provisioning/recipes/multinode.rb new file mode 100644 index 0000000..400faff --- /dev/null +++ b/site-cookbooks/provisioning/recipes/multinode.rb @@ -0,0 +1,149 @@ +require 'chef/provisioning' +require 'chef/provisioning/vagrant_driver' + +with_driver 'vagrant' + +os = 'ubuntu/xenial64' +os = 'centos/7' if ENV['REPO_OS'].to_s.include?('centos') + +env = 'multinode-ubuntu16' +env = 'multinode-centos7' if ENV['REPO_OS'].to_s.include?('centos') + +# make sure your ethernet interface matches preferred_interfaces, or override +# with OS_BRIDGE + +# rubocop:disable LineLength +preferred_interfaces = ['Ethernet', 'eth0', 'enp3s0', 'Wi-Fi', + 'Thunderbolt 1', 'Thunderbolt 2', 'Centrino'] +host_interfaces = `VBoxManage list bridgedifs | grep ^Name` + .gsub(/Name:\s+/, '').split("\n") +default_bridge = preferred_interfaces.map { |pi| host_interfaces.find { |vm| vm =~ /#{Regexp.quote(pi)}/ } }.compact[0] +# rubocop:enable LineLength + +bridge = if ENV['OS_BRIDGE'] + "\"#{ENV['OS_BRIDGE']}\"" + else + default_bridge + end + +### +# compute controller +### + +controller_options = { + vagrant_options: { + 'vm.box' => os, + 'vm.network' => [ + ':private_network, {ip: "192.168.100.60"}', + ':private_network, {ip: "192.168.101.60"}', + ':forwarded_port, guest: 443, host: 9443', + ':forwarded_port, guest: 4002, host: 4002', + ':forwarded_port, guest: 5000, host: 5000', + ':forwarded_port, guest: 6080, host: 6080', + ':forwarded_port, guest: 8773, host: 8773', + ':forwarded_port, guest: 8774, host: 8774', + ':forwarded_port, guest: 35357, host: 35357' + ] + }, + vagrant_config: <<-EOH + config.vm.provision "chef_solo" do |chef| + chef.version = "12.21.3" + chef.channel = "stable" + end + config.vm.provider "virtualbox" do |v| + v.memory = 6144 + v.cpus = 2 + v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"] + v.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"] + v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] + end + EOH +} + +# create controller node with the config defined above +machine 'controller' do + machine_options controller_options + role 'multinode-controller' + chef_environment env + file('/etc/chef/openstack_data_bag_secret', + "#{File.dirname(__FILE__)}/../../../../../encrypted_data_bag_secret") + converge true +end + +### +# network controller config +### + +network_options = { + vagrant_options: { + 'vm.box' => os, + 'vm.network' => [ + ':private_network, {ip: "192.168.100.70"}', + ':private_network, {ip: "192.168.101.70"}' + ] + }, + vagrant_config: <<-EOH + config.vm.provision "chef_solo" do |chef| + chef.version = "12.21.3" + chef.channel = "stable" + end + config.vm.provider "virtualbox" do |v| + v.memory = 1024 + v.cpus = 1 + v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"] + v.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"] + v.customize ["modifyvm", :id, "--nicpromisc4", "allow-all"] + v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] + end + config.vm.define "network" do |net| + net.vm.network "public_network", :dev => "#{bridge}", :mode => "bridge", :type => "bridge" + end + EOH +} + +# create network node with the config defined above +machine 'network' do + machine_options network_options + role 'multinode-network' + chef_environment env + file('/etc/chef/openstack_data_bag_secret', + "#{File.dirname(__FILE__)}/../../../../../encrypted_data_bag_secret") + converge true +end + +machine_batch do + compute_nodes = 2 + compute_nodes.times do |number| + compute_options = { + vagrant_options: { + 'vm.box' => os, + 'vm.network' => [ + ":private_network, {ip: '192.168.100.#{61 + number}'}", + ":private_network, {ip: '192.168.101.#{62 + number}'}" + ] + }, + vagrant_config: <<-EOH + config.vm.provision "chef_solo" do |chef| + chef.version = "12.21.3" + chef.channel = "stable" + end + config.vm.provider "virtualbox" do |v| + v.memory = 1024 + v.cpus = 2 + v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"] + v.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"] + v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] + end + EOH + } + # create compute nodes with the config defined above + machine "compute#{number + 1}" do + machine_options compute_options + role 'multinode-compute' + chef_environment env + file('/etc/chef/openstack_data_bag_secret', + "#{File.dirname(__FILE__)}/../../../../../encrypted_data_bag_secret") + converge true + end + end +end diff --git a/site-cookbooks/provisioning/recipes/vagrant_linux.rb b/site-cookbooks/provisioning/recipes/vagrant_linux.rb deleted file mode 100644 index 1a410c7..0000000 --- a/site-cookbooks/provisioning/recipes/vagrant_linux.rb +++ /dev/null @@ -1,9 +0,0 @@ -require 'chef/provisioning/vagrant_driver' - -os = 'ubuntu/xenial64' -os = 'centos/7' if ENV['REPO_OS'].to_s.include?('centos') - -with_driver 'vagrant' -with_machine_options vagrant_options: { - 'vm.box' => os -}