diff --git a/minimal.json b/minimal.json deleted file mode 100644 index 1e4200b..0000000 --- a/minimal.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "minimal", - "description": "This will deploy a minimal set of services for Openstack Compute to function for integration testing.", - "json_class": "Chef::Role", - "default_attributes": { - }, - "override_attributes": { - }, - "chef_type": "role", - "run_list": [ - "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]", - "recipe[openstack-identity::server-apache]", - "recipe[openstack-identity::registration]", - "recipe[openstack-identity::openrc]", - "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-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::compute]", - "recipe[openstack-compute::identity_registration]", - "recipe[openstack-image::image_upload]", - "recipe[openstack-integration-test::create_network]", - "recipe[openstack-integration-test::setup]", - "recipe[openstack-integration-test::run_tempest]" - ], - "env_run_lists": { - } -} diff --git a/roles/minimal.json b/roles/minimal.json index e582726..1e4200b 100644 --- a/roles/minimal.json +++ b/roles/minimal.json @@ -1,6 +1,6 @@ { "name": "minimal", - "description": "This will deploy a minimal set of services for Openstack Compute to function on a single box for integration testing.", + "description": "This will deploy a minimal set of services for Openstack Compute to function for integration testing.", "json_class": "Chef::Role", "default_attributes": { }, @@ -8,7 +8,6 @@ }, "chef_type": "role", "run_list": [ - "recipe[build-essential]", "recipe[openstack-common]", "recipe[openstack-common::logging]", "recipe[openstack-common::sysctl]", @@ -44,7 +43,10 @@ "recipe[openstack-compute::vncproxy]", "recipe[openstack-compute::compute]", "recipe[openstack-compute::identity_registration]", - "recipe[openstack-image::image_upload]" + "recipe[openstack-image::image_upload]", + "recipe[openstack-integration-test::create_network]", + "recipe[openstack-integration-test::setup]", + "recipe[openstack-integration-test::run_tempest]" ], "env_run_lists": { } diff --git a/site-cookbooks/provisioning/.gitignore b/site-cookbooks/provisioning/.gitignore deleted file mode 100644 index ec2a890..0000000 --- a/site-cookbooks/provisioning/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -.vagrant -Berksfile.lock -*~ -*# -.#* -\#*# -.*.sw[a-z] -*.un~ - -# Bundler -Gemfile.lock -bin/* -.bundle/* - -.kitchen/ -.kitchen.local.yml diff --git a/site-cookbooks/provisioning/.kitchen.yml b/site-cookbooks/provisioning/.kitchen.yml deleted file mode 100644 index 5ef99ce..0000000 --- a/site-cookbooks/provisioning/.kitchen.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -driver: - name: vagrant - -provisioner: - name: chef_zero - -# Uncomment the following verifier to leverage Inspec instead of Busser (the -# default verifier) -# verifier: -# name: inspec - -platforms: - - name: ubuntu-14.04 - - name: centos-7.1 - -suites: - - name: default - run_list: - - recipe[provisioning::default] - attributes: diff --git a/site-cookbooks/provisioning/Berksfile b/site-cookbooks/provisioning/Berksfile deleted file mode 100644 index 34fea21..0000000 --- a/site-cookbooks/provisioning/Berksfile +++ /dev/null @@ -1,3 +0,0 @@ -source 'https://supermarket.chef.io' - -metadata diff --git a/site-cookbooks/provisioning/README.md b/site-cookbooks/provisioning/README.md deleted file mode 100644 index 7d5bf51..0000000 --- a/site-cookbooks/provisioning/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# provisioning - -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 chef-provisioning. - -# recipes - -## provisioning::vagrant_linux -* installs/uses a Vagrant box based on Linux distribution - -## provisioning::allinone -* provisions an all-in-one OpenStack Compute Controller - -## provisioning::multi-node -* provisions an OpenStack Controller with Compute nodes - -## provisioning::destroy_all -* destroys all the things! (really, all the running nodes) diff --git a/site-cookbooks/provisioning/chefignore b/site-cookbooks/provisioning/chefignore deleted file mode 100644 index a976917..0000000 --- a/site-cookbooks/provisioning/chefignore +++ /dev/null @@ -1,102 +0,0 @@ -# Put files/directories that should be ignored in this file when uploading -# to a chef-server or supermarket. -# Lines that start with '# ' are comments. - -# OS generated files # -###################### -.DS_Store -Icon? -nohup.out -ehthumbs.db -Thumbs.db - -# SASS # -######## -.sass-cache - -# EDITORS # -########### -\#* -.#* -*~ -*.sw[a-z] -*.bak -REVISION -TAGS* -tmtags -*_flymake.* -*_flymake -*.tmproj -.project -.settings -mkmf.log - -## COMPILED ## -############## -a.out -*.o -*.pyc -*.so -*.com -*.class -*.dll -*.exe -*/rdoc/ - -# Testing # -########### -.watchr -.rspec -spec/* -spec/fixtures/* -test/* -features/* -examples/* -Guardfile -Procfile -.kitchen* -.rubocop.yml -spec/* -Rakefile -.travis.yml -.foodcritic -.codeclimate.yml - -# SCM # -####### -.git -*/.git -.gitignore -.gitmodules -.gitconfig -.gitattributes -.svn -*/.bzr/* -*/.hg/* -*/.svn/* - -# Berkshelf # -############# -Berksfile -Berksfile.lock -cookbooks/* -tmp - -# Cookbooks # -############# -CONTRIBUTING* -CHANGELOG* -TESTING* -MAINTAINERS.toml - -# Strainer # -############ -Colanderfile -Strainerfile -.colander -.strainer - -# Vagrant # -########### -.vagrant -Vagrantfile diff --git a/site-cookbooks/provisioning/metadata.rb b/site-cookbooks/provisioning/metadata.rb deleted file mode 100644 index ba5786a..0000000 --- a/site-cookbooks/provisioning/metadata.rb +++ /dev/null @@ -1,7 +0,0 @@ -name 'provisioning' -maintainer 'openstack-chef' -maintainer_email 'openstack-dev@lists.openstack.org' -license 'Apache 2.0' -description 'Helper cookbook for chef-provisioning' -long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '0.1.0' diff --git a/site-cookbooks/provisioning/recipes/allinone.rb b/site-cookbooks/provisioning/recipes/allinone.rb deleted file mode 100644 index c6762fc..0000000 --- a/site-cookbooks/provisioning/recipes/allinone.rb +++ /dev/null @@ -1,69 +0,0 @@ -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 = '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 -preferred_interfaces = ['Ethernet', 'eth0', 'enp3s0', 'enp30s0', '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 - -### -# 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.4" - 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, "--nicpromisc3", "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 - machine_options options - role 'allinone' - chef_environment env - file('/etc/chef/openstack_data_bag_secret', - "#{File.dirname(__FILE__)}/../../../../../encrypted_data_bag_secret") - converge true -end diff --git a/site-cookbooks/provisioning/recipes/default.rb b/site-cookbooks/provisioning/recipes/default.rb deleted file mode 100644 index 2fedf7f..0000000 --- a/site-cookbooks/provisioning/recipes/default.rb +++ /dev/null @@ -1,17 +0,0 @@ -# -# Cookbook Name:: provisioning -# Recipe:: default -# -# Copyright 2016 openstack-chef -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/site-cookbooks/provisioning/recipes/destroy_all.rb b/site-cookbooks/provisioning/recipes/destroy_all.rb deleted file mode 100644 index fd5cb10..0000000 --- a/site-cookbooks/provisioning/recipes/destroy_all.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'chef/provisioning' - -machine_batch do - machines search(:node, '*:*').map(&:name) - action :destroy -end diff --git a/site-cookbooks/provisioning/recipes/multinode.rb b/site-cookbooks/provisioning/recipes/multinode.rb deleted file mode 100644 index 98f1cd4..0000000 --- a/site-cookbooks/provisioning/recipes/multinode.rb +++ /dev/null @@ -1,147 +0,0 @@ -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 -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.4" - 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.4" - 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.4" - 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/spec/spec_helper.rb b/site-cookbooks/provisioning/spec/spec_helper.rb deleted file mode 100644 index 1dd5126..0000000 --- a/site-cookbooks/provisioning/spec/spec_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -require 'chefspec' -require 'chefspec/berkshelf' diff --git a/site-cookbooks/provisioning/spec/unit/recipes/default_spec.rb b/site-cookbooks/provisioning/spec/unit/recipes/default_spec.rb deleted file mode 100644 index a5ee450..0000000 --- a/site-cookbooks/provisioning/spec/unit/recipes/default_spec.rb +++ /dev/null @@ -1,32 +0,0 @@ -# -# Cookbook Name:: provisioning -# Spec:: default -# -# Copyright 2016 openstack-chef -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -require 'spec_helper' - -describe 'provisioning::default' do - context 'When all attributes are default, on an unspecified platform' do - let(:chef_run) do - runner = ChefSpec::ServerRunner.new - runner.converge(described_recipe) - end - - it 'converges successfully' do - expect { chef_run }.to_not raise_error - end - end -end diff --git a/site-cookbooks/provisioning/test/integration/default/serverspec/default_spec.rb b/site-cookbooks/provisioning/test/integration/default/serverspec/default_spec.rb deleted file mode 100644 index 0f2e85a..0000000 --- a/site-cookbooks/provisioning/test/integration/default/serverspec/default_spec.rb +++ /dev/null @@ -1,9 +0,0 @@ -require 'spec_helper' - -describe 'provisioning::default' do - # Serverspec examples can be found at - # http://serverspec.org/resource_types.html - it 'does something' do - skip 'Replace this with meaningful tests' - end -end diff --git a/site-cookbooks/provisioning/test/integration/helpers/serverspec/spec_helper.rb b/site-cookbooks/provisioning/test/integration/helpers/serverspec/spec_helper.rb deleted file mode 100644 index c1fddf0..0000000 --- a/site-cookbooks/provisioning/test/integration/helpers/serverspec/spec_helper.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'serverspec' - -if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM).nil? - set :backend, :exec -else - set :backend, :cmd - set :os, family: 'windows' -end