Enables Ubuntu Xenial release (16.04)
- replaces ubuntu14 with ubuntu16 - style fixes to make rubocop happy - converts smoke tests to python-openstackclient - tweaks memory limits for multi_node - corrects ethernet interface naming - prunes misleading pre-provisioning environment files - uses atlas for vagrant images - makes the destroy_all recipe work again Change-Id: I79aa5f793614f5430c613dc0b2fc241434fde1f9 Implements: blueprint newton-xenial
This commit is contained in:
parent
09f43b1c68
commit
f9ffdfa11f
33
Rakefile
33
Rakefile
@ -21,7 +21,7 @@ end
|
||||
|
||||
desc "Destroy machines"
|
||||
task :destroy_machines do
|
||||
run_command("chef-client #{client_opts} destroy_all.rb")
|
||||
run_command("chef-client #{client_opts} -o 'provisioning::destroy_all'")
|
||||
end
|
||||
|
||||
desc "Vendor your cookbooks/"
|
||||
@ -83,7 +83,7 @@ end
|
||||
|
||||
# use the correct environment depending on platform
|
||||
if File.exist?('/usr/bin/apt-get')
|
||||
@platform = 'ubuntu14'
|
||||
@platform = 'ubuntu16'
|
||||
elsif File.exist?('/usr/bin/yum')
|
||||
@platform = 'centos7'
|
||||
end
|
||||
@ -97,7 +97,7 @@ def _run_env_queries # rubocop:disable Metrics/MethodLength
|
||||
false
|
||||
)
|
||||
case @platform
|
||||
when 'ubuntu14'
|
||||
when 'ubuntu16'
|
||||
_run_commands('basic debian env queries', {
|
||||
'ifconfig' => [''],
|
||||
'cat' => ['/etc/apt/sources.list']},
|
||||
@ -118,11 +118,11 @@ def _run_basic_queries # rubocop:disable Metrics/MethodLength
|
||||
'curl' => ['-v http://localhost', '-kv https://localhost'],
|
||||
'sudo netstat' => ['-nlp'],
|
||||
'nova-manage' => ['version', 'db version'],
|
||||
'nova' => %w(--version service-list hypervisor-list image-list flavor-list),
|
||||
'nova' => %w(--version service-list hypervisor-list flavor-list),
|
||||
'glance-manage' => %w(db_version),
|
||||
'glance' => %w(--version image-list),
|
||||
'keystone-manage' => %w(db_version),
|
||||
'keystone' => %w(--version user-list endpoint-list role-list service-list tenant-list),
|
||||
'openstack' => ['--version', 'user list', 'endpoint list', 'role list', 'service list', 'project list'],
|
||||
'cinder-manage' => ['version list', 'db version'],
|
||||
'cinder' => %w(--version list),
|
||||
'heat-manage' => ['db_version', 'service list'],
|
||||
@ -131,7 +131,7 @@ def _run_basic_queries # rubocop:disable Metrics/MethodLength
|
||||
'ovs-vsctl' => %w(show) }
|
||||
)
|
||||
case @platform
|
||||
when 'ubuntu14'
|
||||
when 'ubuntu16'
|
||||
_run_commands('basic debian test queries', {
|
||||
'rabbitmqctl' => %w(cluster_status),
|
||||
'ifconfig' => ['']}
|
||||
@ -155,32 +155,30 @@ end
|
||||
# Helper for setting up basic nova tests
|
||||
def _run_nova_tests(pass) # rubocop:disable Metrics/MethodLength
|
||||
_run_commands('cinder storage volume create', {
|
||||
'cinder' => ['list', "create --display_name test_volume_#{pass} 1"],
|
||||
'openstack' => ['volume list', "volume create --description test_volume_#{pass} 1"],
|
||||
'sleep' => ['10'] }
|
||||
)
|
||||
_run_commands('cinder storate volume query', {
|
||||
'cinder' => ['list'] }
|
||||
'openstack' => ['volume list'] }
|
||||
)
|
||||
uuid = `sudo bash -c ". /root/openrc && cinder list | grep test_volume_#{pass} | cut -d ' ' -f 2"`
|
||||
uuid = `sudo bash -c ". /root/openrc && openstack volume list | grep test_volume_#{pass} | cut -d ' ' -f 2"`
|
||||
_run_commands('nova server create', {
|
||||
'nova' => ['list', "boot test --image cirros --flavor 1 --block-device-mapping vdb=#{uuid.chomp!}:::1"],
|
||||
'openstack' => ['server list', "server create --image cirros --flavor 1 --block-device-mapping vdb=#{uuid.chomp!}:::1 test"],
|
||||
'sleep' => ['40'] }
|
||||
)
|
||||
_run_commands('nova server cleanup', {
|
||||
'nova' => ['list', 'show test', 'delete test'],
|
||||
'sleep' => ['25'],
|
||||
'cinder' => ['list'] }
|
||||
'openstack' => ['server list', 'server show test', 'server delete test'],
|
||||
'sleep' => ['25']}
|
||||
)
|
||||
_run_commands('nova server query', {
|
||||
'nova' => ['list'] }
|
||||
'openstack' => ['volume list', 'server list'] }
|
||||
)
|
||||
end
|
||||
|
||||
# Helper for setting up neutron local network
|
||||
def _setup_local_network # rubocop:disable Metrics/MethodLength
|
||||
_run_commands('neutron local network setup', {
|
||||
'neutron' => ['net-create local_net --provider:network_type local --shared',
|
||||
'subnet-create local_net --name local_subnet 192.168.1.0/24'] }
|
||||
'openstack' => ['network create --share local_net'] }
|
||||
)
|
||||
end
|
||||
|
||||
@ -225,7 +223,8 @@ task :integration => [:create_key, :berks_vendor] do
|
||||
ensure
|
||||
# make sure logs are saved, pass or fail
|
||||
_save_logs("pass#{i}", log_dir)
|
||||
sh %(sudo chown -R $USER #{log_dir})
|
||||
sh %(sudo chown -R $USER #{log_dir}/pass#{i})
|
||||
sh %(sudo chmod -R go+rx #{log_dir}/pass#{i})
|
||||
end
|
||||
end
|
||||
# Run the tempest formal tests, setup with the openstack-integration-test cookbook
|
||||
|
@ -19,10 +19,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"yum": {
|
||||
"rdo_delorean_enabled": true,
|
||||
"gpgcheck": false
|
||||
},
|
||||
"mq": {
|
||||
"user": "admin"
|
||||
},
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "allinone-ubuntu14",
|
||||
"name": "allinone-ubuntu16",
|
||||
"description": "Environment used in testing the upstream cookbooks and reference Chef repository with vagrant. To be used with the vagrantfile-allinone vagrantfile. Defines the necessary attributes for a working all-in-one openstack deployment, using neutron for the networking component, and the openvswitch neutron plugin",
|
||||
"cookbook_versions": {
|
||||
},
|
||||
@ -16,9 +16,6 @@
|
||||
"override_attributes": {
|
||||
"openstack": {
|
||||
"telemetry": {
|
||||
"platform": {
|
||||
"client_packages": ["python-ceilometerclient"]
|
||||
},
|
||||
"conf": {
|
||||
"DEFAULT": {
|
||||
"meter_dispatchers": "database"
|
@ -45,13 +45,13 @@
|
||||
"tenant_network_type": "gre"
|
||||
},
|
||||
"api": {
|
||||
"bind_interface": "eth1"
|
||||
"bind_interface": "enp0s8"
|
||||
},
|
||||
"quota": {
|
||||
"floatingip": "50"
|
||||
},
|
||||
"l3": {
|
||||
"external_network_bridge_interface": "eth1"
|
||||
"external_network_bridge_interface": "enp0s8"
|
||||
}
|
||||
},
|
||||
"block-storage": {
|
||||
|
@ -80,10 +80,6 @@
|
||||
"dashboard": {
|
||||
"server_hostname": "localhost"
|
||||
},
|
||||
"yum": {
|
||||
"rdo_delorean_enabled": true,
|
||||
"gpgcheck": false
|
||||
},
|
||||
"mq": {
|
||||
"user": "admin"
|
||||
},
|
||||
@ -98,7 +94,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"tun_network_bridge_interface": "eth1",
|
||||
"tun_network_bridge_interface": "enp0s8",
|
||||
"conf": {
|
||||
"DEFAULT": {
|
||||
"service_plugins": "router"
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "multi-node-ubuntu14",
|
||||
"name": "multi-node-ubuntu16",
|
||||
"cookbook_versions": {
|
||||
},
|
||||
"json_class": "Chef::Environment",
|
||||
@ -97,7 +97,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"tun_network_bridge_interface": "eth1",
|
||||
"tun_network_bridge_interface": "enp0s8",
|
||||
"conf": {
|
||||
"DEFAULT": {
|
||||
"service_plugins": "router"
|
@ -1,70 +0,0 @@
|
||||
{
|
||||
"name": "vagrant-multi-neutron",
|
||||
"description": "Environment used in testing the upstream cookbooks and reference Chef repository with vagrant. To be used with the Vagrantfile-multi-neutron vagrantfile. Defines the necessary attributes for a working mutltinode (1 controller/n computes) openstack deployment, using neutron (with gre tunnels between hosts) for the networking component.",
|
||||
"cookbook_versions": {
|
||||
},
|
||||
"json_class": "Chef::Environment",
|
||||
"chef_type": "environment",
|
||||
"default_attributes": {
|
||||
},
|
||||
"override_attributes": {
|
||||
"mariadb": {
|
||||
"mysqld": {
|
||||
"lc_messages_dir": "/usr/share/mariadb"
|
||||
}
|
||||
},
|
||||
"openstack": {
|
||||
"yum": {
|
||||
"rdo_delorean_enabled": true
|
||||
},
|
||||
"endpoints": {
|
||||
"bind_interface": "enp0s8",
|
||||
"compute-vnc-bind": {
|
||||
"host": "0.0.0.0"
|
||||
},
|
||||
"compute-vnc": {
|
||||
"host": "0.0.0.0"
|
||||
}
|
||||
},
|
||||
"mq": {
|
||||
"user": "admin"
|
||||
},
|
||||
"network": {
|
||||
"service_plugins": [ "neutron.services.l3_router.l3_router_plugin.L3RouterPlugin" ],
|
||||
"dhcp": {
|
||||
"enable_isolated_metadata": "True"
|
||||
},
|
||||
"l3":{
|
||||
"external_network_bridge_interface": "enp0s8"
|
||||
}
|
||||
},
|
||||
"block-storage": {
|
||||
"volume": {
|
||||
"create_volume_group": true,
|
||||
"default_volume_type": "lvm"
|
||||
}
|
||||
},
|
||||
"image": {
|
||||
"image_upload": true
|
||||
},
|
||||
"compute": {
|
||||
"novnc_proxy": {
|
||||
"bind_interface": "enp0s8",
|
||||
"bind_address": "0.0.0.0"
|
||||
},
|
||||
"libvirt": {
|
||||
"virt_type": "qemu"
|
||||
},
|
||||
"network": {
|
||||
"public_interface": "enp0s8",
|
||||
"service_type": "neutron"
|
||||
}
|
||||
},
|
||||
"orchestration": {
|
||||
"heat_stack_user_role": "heat_stack_user",
|
||||
"stack_user_domain_name": "heat",
|
||||
"stack_domain_admin": "heat_stack_admin"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,106 +0,0 @@
|
||||
{
|
||||
"name": "vagrant-multi-neutron",
|
||||
"description": "Environment used in testing the upstream cookbooks and reference Chef repository with vagrant. To be used with the Vagrantfile-multi-neutron vagrantfile. Defines the necessary attributes for a working mutltinode (1 controller/n computes) openstack deployment, using neutron (with gre tunnels between hosts) for the networking component.",
|
||||
"cookbook_versions": {
|
||||
},
|
||||
"json_class": "Chef::Environment",
|
||||
"chef_type": "environment",
|
||||
"default_attributes": {
|
||||
},
|
||||
"override_attributes": {
|
||||
"mysql": {
|
||||
"allow_remote_root": true,
|
||||
"root_network_acl": ["%"]
|
||||
},
|
||||
"openstack": {
|
||||
"mq": {
|
||||
"user": "admin"
|
||||
},
|
||||
"identity": {
|
||||
"bind_interface": "eth1"
|
||||
},
|
||||
"endpoints": {
|
||||
"host": "192.168.100.60",
|
||||
"bind-host": "192.168.100.60",
|
||||
"mq": {
|
||||
"host": "192.168.100.60"
|
||||
},
|
||||
"db": {
|
||||
"host": "192.168.100.60"
|
||||
},
|
||||
"image-api-bind":{
|
||||
"host": "192.168.100.60"
|
||||
},
|
||||
"image-api":{
|
||||
"host": "192.168.100.60"
|
||||
},
|
||||
"compute-vnc-bind":{
|
||||
"host": "0.0.0.0",
|
||||
"bind_interface": "eth1"
|
||||
},
|
||||
"compute-vnc":{
|
||||
"host": "0.0.0.0",
|
||||
"bind_interface": "eth1"
|
||||
}
|
||||
},
|
||||
"network": {
|
||||
"service_plugins": [ "neutron.services.l3_router.l3_router_plugin.L3RouterPlugin" ],
|
||||
"dhcp": {
|
||||
"enable_isolated_metadata": "True"
|
||||
},
|
||||
"openvswitch": {
|
||||
"tunnel_id_ranges": "1:1000",
|
||||
"enable_tunneling": "True",
|
||||
"tunnel_type": "gre",
|
||||
"tenant_network_type": "gre"
|
||||
},
|
||||
"api": {
|
||||
"bind_interface": "eth1"
|
||||
},
|
||||
"quota": {
|
||||
"floatingip": "50"
|
||||
},
|
||||
"l3":{
|
||||
"external_network_bridge_interface": "eth1"
|
||||
}
|
||||
},
|
||||
"block-storage": {
|
||||
"volume": {
|
||||
"create_volume_group": true,
|
||||
"default_volume_type": "lvm"
|
||||
}
|
||||
},
|
||||
"image": {
|
||||
"api": {
|
||||
"bind_interface": "eth1"
|
||||
},
|
||||
"registry": {
|
||||
"bind_interface": "eth1"
|
||||
},
|
||||
"image_upload": true
|
||||
},
|
||||
"compute": {
|
||||
"enabled_apis": "ec2,osapi_compute",
|
||||
"novnc_proxy": {
|
||||
"bind_interface": "eth1",
|
||||
"bind_address": "0.0.0.0"
|
||||
},
|
||||
"libvirt": {
|
||||
"virt_type": "qemu"
|
||||
},
|
||||
"network": {
|
||||
"public_interface": "eth1",
|
||||
"service_type": "neutron"
|
||||
},
|
||||
"config": {
|
||||
"ram_allocation_ratio": 5.0
|
||||
}
|
||||
},
|
||||
"orchestration": {
|
||||
"heat_stack_user_role": "heat_stack_user",
|
||||
"stack_user_domain_name": "heat",
|
||||
"stack_domain_admin": "heat_stack_admin"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -10,9 +10,11 @@
|
||||
"run_list": [
|
||||
"recipe[apt]",
|
||||
"recipe[yum]",
|
||||
"recipe[build-essential]",
|
||||
"recipe[openstack-common]",
|
||||
"recipe[openstack-common::logging]",
|
||||
"recipe[openstack-common::sysctl]",
|
||||
"recipe[openstack-common::client]",
|
||||
"recipe[openstack-ops-database::server]",
|
||||
"recipe[openstack-ops-database::openstack-db]",
|
||||
"recipe[openstack-ops-messaging::rabbitmq-server]",
|
||||
@ -37,9 +39,9 @@
|
||||
"recipe[openstack-compute::nova-setup]",
|
||||
"recipe[openstack-compute::identity_registration]",
|
||||
"recipe[openstack-compute::conductor]",
|
||||
"recipe[openstack-compute::scheduler]",
|
||||
"recipe[openstack-compute::api-os-compute]",
|
||||
"recipe[openstack-compute::api-metadata]",
|
||||
"recipe[openstack-compute::scheduler]",
|
||||
"recipe[openstack-compute::nova-cert]",
|
||||
"recipe[openstack-compute::vncproxy]",
|
||||
"recipe[openstack-compute::compute]",
|
||||
@ -61,9 +63,7 @@
|
||||
"recipe[openstack-telemetry::agent-notification]",
|
||||
"recipe[openstack-telemetry::collector]",
|
||||
"recipe[openstack-telemetry::identity_registration]",
|
||||
"recipe[openstack-telemetry::client]",
|
||||
"recipe[openstack-image::image_upload]",
|
||||
"recipe[openstack-common::client]",
|
||||
"recipe[openstack-dashboard::server]"
|
||||
],
|
||||
"env_run_lists": {
|
||||
|
@ -10,6 +10,7 @@
|
||||
"run_list": [
|
||||
"recipe[apt]",
|
||||
"recipe[yum]",
|
||||
"recipe[build-essential]",
|
||||
"recipe[openstack-common]",
|
||||
"recipe[openstack-compute::compute]",
|
||||
"recipe[openstack-network::ml2_core_plugin]",
|
||||
|
@ -10,9 +10,11 @@
|
||||
"run_list": [
|
||||
"recipe[apt]",
|
||||
"recipe[yum]",
|
||||
"recipe[build-essential]",
|
||||
"recipe[openstack-common]",
|
||||
"recipe[openstack-common::logging]",
|
||||
"recipe[openstack-common::sysctl]",
|
||||
"recipe[openstack-common::client]",
|
||||
"recipe[openstack-ops-database::server]",
|
||||
"recipe[openstack-ops-database::openstack-db]",
|
||||
"recipe[openstack-ops-messaging::rabbitmq-server]",
|
||||
@ -37,9 +39,9 @@
|
||||
"recipe[openstack-compute::nova-setup]",
|
||||
"recipe[openstack-compute::identity_registration]",
|
||||
"recipe[openstack-compute::conductor]",
|
||||
"recipe[openstack-compute::scheduler]",
|
||||
"recipe[openstack-compute::api-os-compute]",
|
||||
"recipe[openstack-compute::api-metadata]",
|
||||
"recipe[openstack-compute::scheduler]",
|
||||
"recipe[openstack-compute::nova-cert]",
|
||||
"recipe[openstack-compute::vncproxy]",
|
||||
"recipe[openstack-compute::identity_registration]",
|
||||
@ -55,7 +57,6 @@
|
||||
"recipe[openstack-orchestration::api-cloudwatch]",
|
||||
"recipe[openstack-orchestration::identity_registration]",
|
||||
"recipe[openstack-image::image_upload]",
|
||||
"recipe[openstack-common::client]",
|
||||
"recipe[openstack-dashboard::server]"
|
||||
],
|
||||
"env_run_lists": {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
This cookbook is used for serving chef-provisioning recipes for provisioning
|
||||
OpenStack with Chef. It is intended to be referenced by chef-client in
|
||||
local-mode a la ChefDK.
|
||||
local-mode a la chef-provisioning.
|
||||
|
||||
# recipes
|
||||
|
||||
@ -14,3 +14,6 @@ local-mode a la ChefDK.
|
||||
|
||||
## provisioning::multi-node
|
||||
* provisions an OpenStack Controller with Compute nodes
|
||||
|
||||
## provisioning::destroy_all
|
||||
* destroys all the things! (really, all the running nodes)
|
||||
|
@ -27,11 +27,12 @@ controller_config = <<-ENDCONFIG
|
||||
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-ubuntu14'
|
||||
env = 'allinone-ubuntu16'
|
||||
env = 'allinone-centos7' if ENV['REPO_OS'].to_s.include?('centos')
|
||||
|
||||
machine 'controller' do
|
||||
|
@ -8,7 +8,7 @@ controller_config = <<-ENDCONFIG
|
||||
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 = 4096
|
||||
v.memory = 6144
|
||||
v.cpus = 2
|
||||
v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"]
|
||||
v.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"]
|
||||
@ -18,7 +18,7 @@ controller_config = <<-ENDCONFIG
|
||||
config.vm.network "private_network", ip: "192.168.101.60"
|
||||
ENDCONFIG
|
||||
|
||||
env = 'multi-node-ubuntu14'
|
||||
env = 'multi-node-ubuntu16'
|
||||
env = 'multi-node-centos7' if ENV['REPO_OS'].to_s.include?('centos')
|
||||
|
||||
# create controller-node with config defined above
|
||||
@ -35,7 +35,7 @@ end
|
||||
# config for compute-node vagrant box
|
||||
compute_config = <<-ENDCONFIG
|
||||
config.vm.provider "virtualbox" do |v|
|
||||
v.memory = 4048
|
||||
v.memory = 2048
|
||||
v.cpus = 2
|
||||
v.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"]
|
||||
v.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"]
|
||||
|
@ -1,17 +1,9 @@
|
||||
require 'chef/provisioning/vagrant_driver'
|
||||
|
||||
vagrant_box 'centos7.2' do
|
||||
url 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-7.2_chef-provisionerless.box'
|
||||
end
|
||||
os = 'ubuntu/xenial64'
|
||||
os = 'centos/7' if ENV['REPO_OS'].to_s.include?('centos')
|
||||
|
||||
vagrant_box 'ubuntu14' do
|
||||
url 'http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-14.04_chef-provisionerless.box'
|
||||
end
|
||||
|
||||
os = 'ubuntu14'
|
||||
os = 'centos7.2' if ENV['REPO_OS'].to_s.include?('centos')
|
||||
|
||||
with_driver "vagrant:#{File.dirname(__FILE__)}/vms"
|
||||
with_driver 'vagrant'
|
||||
with_machine_options vagrant_options: {
|
||||
'vm.box' => os
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user