Cleaned up minimal role, deprecated provisioning cookbook
- The minimal role contains a subset of allinone for use in integration. This allows to execute Tempest at the end of the Chef run. - Being that chef-provisioning-vagrant is no longer working as of ChefDK 2.x, the provisioning cookbook serves no functional purpose. Change-Id: I99a6de49640356c98adadf3237dc68383be06bb4 Implements: blueprint modern-chef Depends-On: https://review.openstack.org/542612 Depends-On: https://review.openstack.org/542613
This commit is contained in:
parent
5c59b15c00
commit
3df1fba78e
53
minimal.json
53
minimal.json
|
@ -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": {
|
||||
}
|
||||
}
|
|
@ -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": {
|
||||
}
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
.vagrant
|
||||
Berksfile.lock
|
||||
*~
|
||||
*#
|
||||
.#*
|
||||
\#*#
|
||||
.*.sw[a-z]
|
||||
*.un~
|
||||
|
||||
# Bundler
|
||||
Gemfile.lock
|
||||
bin/*
|
||||
.bundle/*
|
||||
|
||||
.kitchen/
|
||||
.kitchen.local.yml
|
|
@ -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:
|
|
@ -1,3 +0,0 @@
|
|||
source 'https://supermarket.chef.io'
|
||||
|
||||
metadata
|
|
@ -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)
|
|
@ -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
|
|
@ -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'
|
|
@ -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
|
|
@ -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.
|
|
@ -1,6 +0,0 @@
|
|||
require 'chef/provisioning'
|
||||
|
||||
machine_batch do
|
||||
machines search(:node, '*:*').map(&:name)
|
||||
action :destroy
|
||||
end
|
|
@ -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
|
|
@ -1,2 +0,0 @@
|
|||
require 'chefspec'
|
||||
require 'chefspec/berkshelf'
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue