Start Train development

Changed:
- Temporarily disable voting during development
- Update git URI for bind cookbook to use upstream master
- Renamed .kitchen.yml -> kitchen.yml
- Genealogy updated

Fixed:
- Idempotency with use of apt_update resource
- InSpec tests to work with Train
- Cookstyle

Added:
- Data bag for placement service
- Set deprecations_as_errors to true in kitchen.yml

Removed:
- Unused statsd cookbook in Berksfile
- Unused .rubocop.yml

Deprecated:
- LBaaS recipes and tests. This has been deprecated upstream.

Change-Id: I53a28de6aad000a246ff8f610b64dd5201c03b27
This commit is contained in:
Lance Albertson 2020-05-28 13:37:10 -07:00
parent 81249f67cb
commit 89f4b5c1e7
18 changed files with 66 additions and 107 deletions

View File

@ -1,11 +0,0 @@
AllCops:
Include:
- '**/*.rb'
- '**/Gemfile'
- environments/**/*.rb
- roles/**/*.rb
- .chef/**/*.rb
Exclude:
- cookbooks/**/*
- vms/**/*
- nodes/**/*

View File

@ -17,6 +17,7 @@
run: playbooks/integration.yaml
post-run: playbooks/post.yaml
timeout: 5400
voting: false # TODO(ramereth): Remove after this gets merged
- job:
name: openstack-chef-minimal-integration-ubuntu
@ -28,6 +29,7 @@
run: playbooks/minimal.yaml
post-run: playbooks/post.yaml
timeout: 5400
voting: false # TODO(ramereth): Remove after this gets merged
- job:
name: openstack-chef-integration-centos
@ -39,6 +41,7 @@
run: playbooks/integration.yaml
post-run: playbooks/post.yaml
timeout: 5400
voting: false # TODO(ramereth): Remove after this gets merged
- job:
name: openstack-chef-minimal-integration-centos
@ -50,6 +53,7 @@
run: playbooks/minimal.yaml
post-run: playbooks/post.yaml
timeout: 5400
voting: false # TODO(ramereth): Remove after this gets merged
- project-template:
name: openstack-chef-repo-jobs

View File

@ -32,7 +32,6 @@ else
end
cookbook 'openstack_test', path: 'test/cookbooks/openstack_test'
cookbook 'statsd', github: 'librato/statsd-cookbook'
# TODO(ramereth): Remove after this PR is merged
# TODO(ramereth): Remove after this PR gets included in a release
# https://github.com/joyofhex/cookbook-bind/pull/60
cookbook 'bind', github: 'ramereth/cookbook-bind', branch: 'fix-notifies-with-delayed-actions'
cookbook 'bind', github: 'joyofhex/cookbook-bind'

View File

@ -17,7 +17,7 @@ Architectures and a sane example on how to start with OpenStack using
Chef.
With the ``master`` branch of the cookbooks, which is currently tied to
the base OpenStack Stein release, this supports deploying to Ubuntu
the base OpenStack Train release, this supports deploying to Ubuntu
18.04 and CentOS 7 in monolithic, or allinone, and non-HA multinode
configurations with Neutron. The cookbooks support a fully HA
configuration, but we do not test for that as there are far numerous

View File

@ -182,7 +182,7 @@ task integration: %i(create_key berks_vendor) do
# Three passes to ensure idempotency. prefer each to times, even if it
# reads weird
for i in 1..3 do
(1..3).each do |i|
begin
puts "####### Pass #{i}"
# Kick off chef client in local mode, will converge OpenStack right on the gate job "in place"

View File

@ -0,0 +1,10 @@
{
"id": "placement",
"placement": {
"encrypted_data": "Jsq+ipbfdaS9xz53Aq/iZeklVrMqGwhy1T3se7FBsSk=\n",
"hmac": "4wjFbHBVa4QBUGsJtMu9aSXUW+eczfO5FPb92G/o2c4=\n",
"iv": "3rIhywqadkq3curyUuKKYA==\n",
"version": 2,
"cipher": "aes-256-cbc"
}
}

View File

@ -36,12 +36,14 @@ Releases Summary
+----------------------------+------------------------------+------------------------+
| 18.y.z | Rocky | yes |
+----------------------------+------------------------------+------------------------+
| 19.y.z | Stein | yes (current master) |
| 19.y.z | Stein | yes |
+----------------------------+------------------------------+------------------------+
| 20.y.z | Train | Future |
| 20.y.z | Train | yes (current master) |
+----------------------------+------------------------------+------------------------+
| 21.y.z | Ussuri | Future |
+----------------------------+------------------------------+------------------------+
| 22.y.z | Victoria | Future |
+----------------------------+------------------------------+------------------------+
Supermarket releases
====================

View File

@ -10,8 +10,8 @@
# -- Chef OpenStack configuration --------------------------------------------
target_name = 'openstack-chef'
description = 'Chef OpenStack uses Chef to deploy OpenStack environments.'
previous_series_name = 'rocky'
current_series_name = 'stein'
previous_series_name = 'stein'
current_series_name = 'train'
# -- Project information -----------------------------------------------------

View File

@ -27,9 +27,6 @@
"override_attributes": {
"openstack": {
"is_release": true,
"apt": {
"update_apt_cache": true
},
"telemetry": {
"conf": {
"DEFAULT": {

View File

@ -20,6 +20,7 @@ provisioner:
always_update_cookbooks: true
product_name: chef
product_version: 15
deprecations_as_errors: true
# Copy secret to /tmp/kitchen on test VM. Kitchen tries to gather secrets
# before any recipes had a chance to run -> we cannot use a recipe to put the
# secrets file in place.
@ -92,20 +93,8 @@ suites:
run_list:
- recipe[openstack_test]
- role[identity]
- recipe[openstack-network::lbaas]
- role[network]
- role[network_test]
attributes:
openstack:
network:
conf:
DEFAULT:
service_plugins: 'router,neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2'
network_lbaas:
enabled: true
verifier:
inspec_tests:
- path: test/integration/network-optional/inspec
- name: compute
run_list:
- recipe[openstack_test]

View File

@ -5,3 +5,7 @@ execute 'Update /etc/apt/sources.list' do
not_if 'grep -q ubuntu.osuosl.org /etc/apt/sources.list'
action :nothing
end.run_action(:run)
apt_update 'update' do
frequency 3600
end

View File

@ -29,7 +29,7 @@ end
describe command "#{openrc} cinder-manage db version\"" do
its('exit_status') { should eq 0 }
its('stdout') { should match /^128$/ }
its('stdout') { should match /^132$/ }
end
describe command "#{openrc} openstack user list -f value -c Name\"" do

View File

@ -12,9 +12,9 @@ describe command 'openstack --version' do
its('exit_status') { should eq 0 }
# RHEL sends output to stderr while Ubuntu sends it to stdout
if os_family == 'redhat'
its('stderr') { should match /^openstack 3.18.[0-9]+$/ }
its('stderr') { should match /^openstack 4.0.[0-9]+$/ }
else
its('stdout') { should match /^openstack 3.18.[0-9]+$/ }
its('stdout') { should match /^openstack 4.0.[0-9]+$/ }
end
end
@ -34,12 +34,12 @@ if os.family == 'redhat'
end
end
describe yum.repo('RDO-stein') do
describe yum.repo('RDO-train') do
it { should exist }
it { should be_enabled }
end
describe yum.repo('RDO-stein-deps') do
describe yum.repo('RDO-train-deps') do
it { should_not exist }
it { should_not be_enabled }
end
@ -61,7 +61,7 @@ else
# apt InSpec resource is not working properly
describe file '/etc/apt/sources.list.d/openstack-ppa.list' do
its('content') { should include 'http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/stein main' }
its('content') { should include 'http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train main' }
end
describe file '/etc/apt/sources.list.d/openstack-ppa-proposed.list' do

View File

@ -15,7 +15,6 @@ nova_services =
%w(
openstack-nova-compute
openstack-nova-conductor
openstack-nova-consoleauth
openstack-nova-novncproxy
openstack-nova-scheduler
)
@ -23,7 +22,6 @@ nova_services =
%w(
nova-compute
nova-conductor
nova-consoleauth
nova-novncproxy
nova-scheduler
)
@ -40,12 +38,12 @@ openrc = 'bash -c "source /root/openrc && '
describe command "#{openrc} nova-manage version\"" do
its('exit_status') { should eq 0 }
its('stdout') { should match /^19.[0-9]+/ }
its('stdout') { should match /^20.[0-9]+/ }
end
describe command "#{openrc} nova-manage db version\"" do
its('exit_status') { should eq 0 }
its('stdout') { should match /^391$/ }
its('stdout') { should match /^402$/ }
end
describe command "#{openrc} openstack user list -f value -c Name\"" do

View File

@ -13,7 +13,7 @@ end
describe command "#{openrc} glance-manage db_version\"" do
its('exit_status') { should eq 0 }
its('stdout') { should include 'rocky' }
its('stdout') { should include 'train_contract01' }
end
describe command "#{openrc} openstack image list -f value -c Name\"" do

View File

@ -1,14 +1,24 @@
openrc = 'bash -c "source /root/openrc && '
platform = os.family
describe command "#{openrc} openstack network show local_net -f shell -c admin_state_up -c status\"" do
its('exit_status') { should eq 0 }
its('stdout') { should include 'admin_state_up="UP"' }
its('stdout') { should include 'admin_state_up="True"' }
its('stdout') { should include 'status="ACTIVE"' }
end
describe command "#{openrc} openstack subnet show local_subnet -f shell -c enable_dhcp -c cidr -c allocation_pools\"" do
its('exit_status') { should eq 0 }
its('stdout') { should include 'allocation_pools="192.168.180.2-192.168.180.254"' }
case platform
when 'debian'
its('stdout') do
should include 'allocation_pools="[{\'start\': \'192.168.180.2\', \'end\': \'192.168.180.254\'}]"'
end
when 'redhat'
its('stdout') do
should include 'allocation_pools="[{u\'start\': u\'192.168.180.2\', u\'end\': u\'192.168.180.254\'}]'
end
end
its('stdout') { should include 'cidr="192.168.180.0/24"' }
its('stdout') { should include 'enable_dhcp="True"' }
end

View File

@ -1,53 +0,0 @@
openrc = 'bash -c "source /root/openrc && '
uuid = /[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}/
describe command "#{openrc} neutron lbaas-loadbalancer-create --name test-lb -f shell local_subnet\"" do
its('exit_status') { should eq 0 }
[
/^admin_state_up="True"$/,
/^name="test-lb"$/,
/^provider="haproxy"$/,
/^vip_address="192.168.180.[0-9]+"$/,
].each do |line|
its('stdout') { should match line }
end
end
describe command "#{openrc} neutron lbaas-loadbalancer-show -f shell test-lb\"" do
its('exit_status') { should eq 0 }
[
/^operating_status="ONLINE"$/,
/^provisioning_status="ACTIVE"$/,
].each do |line|
its('stdout') { should match line }
end
end
lb_listener_opts = '--name test-lb-http --loadbalancer test-lb --protocol HTTP --protocol-port 80 -f shell'
describe command "#{openrc} neutron lbaas-listener-create #{lb_listener_opts}\"" do
its('exit_status') { should eq 0 }
[
/^admin_state_up="True"$/,
/^loadbalancers="\[{u?'id': u?'#{uuid}'}\]"$/,
/^name="test-lb-http"$/,
/^protocol="HTTP"$/,
/^protocol_port="80"$/,
].each do |line|
its('stdout') { should match line }
end
end
describe command "#{openrc} openstack extension list --network -f value -c Alias\"" do
its('exit_status') { should eq 0 }
%w(
hm_max_retries_down
l7
lbaas_agent_schedulerv2
lbaasv2
lb-graph
lb_network_vip
shared_pools
).each do |ext|
its('stdout') { should match /^#{ext}$/ }
end
end

View File

@ -1,4 +1,5 @@
openrc = 'bash -c "source /root/openrc && '
platform = os.family
%w(
9696
@ -25,13 +26,22 @@ end
describe command "#{openrc} openstack network show local_net -f shell -c admin_state_up -c status\"" do
its('exit_status') { should eq 0 }
its('stdout') { should include 'admin_state_up="UP"' }
its('stdout') { should include 'admin_state_up="True"' }
its('stdout') { should include 'status="ACTIVE"' }
end
describe command "#{openrc} openstack subnet show local_subnet -f shell -c enable_dhcp -c cidr -c allocation_pools\"" do
its('exit_status') { should eq 0 }
its('stdout') { should include 'allocation_pools="192.168.180.2-192.168.180.254"' }
case platform
when 'debian'
its('stdout') do
should include 'allocation_pools="[{\'start\': \'192.168.180.2\', \'end\': \'192.168.180.254\'}]"'
end
when 'redhat'
its('stdout') do
should include 'allocation_pools="[{u\'start\': u\'192.168.180.2\', u\'end\': u\'192.168.180.254\'}]'
end
end
its('stdout') { should include 'cidr="192.168.180.0/24"' }
its('stdout') { should include 'enable_dhcp="True"' }
end
@ -54,10 +64,10 @@ end
describe command "#{openrc} openstack network agent list -f value -c Binary -c State -c Alive\"" do
its('exit_status') { should eq 0 }
its('stdout') { should match /^:-\) UP neutron-dhcp-agent$/ }
its('stdout') { should match /^:-\) UP neutron-metadata-agent$/ }
its('stdout') { should match /^:-\) UP neutron-l3-agent$/ }
its('stdout') { should match /^:-\) UP neutron-openvswitch-agent$/ }
its('stdout') { should match /^True True neutron-dhcp-agent$/ }
its('stdout') { should match /^True True neutron-metadata-agent$/ }
its('stdout') { should match /^True True neutron-l3-agent$/ }
its('stdout') { should match /^True True neutron-openvswitch-agent$/ }
end
describe command "#{openrc} openstack extension list --network -f value -c Alias\"" do