Stein fixes
- Cookstyle fixes - Refactor Berksfile to use groups so we can exclude integration testing cookbooks - Update documentation - Update delivery configuration to exclude integration cookbooks - Fix ChefSpec output - Update Berksfile for cookbook-bind to point to upstream since the PR wsa merged, but not released (yet). Depends-On: https://review.opendev.org/701027 Depends-On: https://review.opendev.org/706158 Depends-On: https://review.opendev.org/706101 Depends-On: https://review.opendev.org/713762 Depends-On: https://review.opendev.org/706157 Change-Id: I38d8707be687fee53e6f066e6e9bc80587e1e878
This commit is contained in:
parent
3b3e8721fe
commit
bbf97bb888
@ -1 +1,9 @@
|
||||
remote_file = "https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml"
|
||||
[local_phases]
|
||||
unit = 'rspec spec/'
|
||||
lint = 'cookstyle --display-cop-names --extra-details'
|
||||
syntax = "berks install -e integration"
|
||||
provision = "echo skipping"
|
||||
deploy = "echo skipping"
|
||||
smoke = "echo skipping"
|
||||
functional = "echo skipping"
|
||||
cleanup = "echo skipping"
|
||||
|
14
.rubocop.yml
14
.rubocop.yml
@ -14,17 +14,3 @@ AllCops:
|
||||
- .cookbooks/**/*
|
||||
- berks-cookbooks/**/*
|
||||
- .bundle/**/*
|
||||
|
||||
Encoding:
|
||||
Exclude:
|
||||
- metadata.rb
|
||||
- Gemfile
|
||||
|
||||
NumericLiterals:
|
||||
Enabled: false
|
||||
|
||||
LineLength:
|
||||
Enabled: false
|
||||
|
||||
WordArray:
|
||||
MinSize: 3
|
||||
|
28
Berksfile
28
Berksfile
@ -2,25 +2,25 @@ source 'https://supermarket.chef.io'
|
||||
|
||||
solver :ruby, :required
|
||||
|
||||
%w(
|
||||
client
|
||||
-common
|
||||
-dns
|
||||
-identity
|
||||
-image
|
||||
-network
|
||||
-ops-database
|
||||
-ops-messaging
|
||||
).each do |cookbook|
|
||||
[
|
||||
%w(client dep),
|
||||
%w(-common dep),
|
||||
%w(-dns dep),
|
||||
%w(-identity dep),
|
||||
%w(-image dep),
|
||||
%w(-network dep),
|
||||
%w(-ops-database integration),
|
||||
%w(-ops-messaging integration),
|
||||
].each do |cookbook, group|
|
||||
if Dir.exist?("../cookbook-openstack#{cookbook}")
|
||||
cookbook "openstack#{cookbook}", path: "../cookbook-openstack#{cookbook}"
|
||||
cookbook "openstack#{cookbook}", path: "../cookbook-openstack#{cookbook}", group: group
|
||||
else
|
||||
cookbook "openstack#{cookbook}", git: "https://opendev.org/openstack/cookbook-openstack#{cookbook}"
|
||||
cookbook "openstack#{cookbook}", git: "https://opendev.org/openstack/cookbook-openstack#{cookbook}", group: group
|
||||
end
|
||||
end
|
||||
|
||||
# TODO(ramereth): Remove after this PR is merged
|
||||
# TODO(ramereth): Remove after this PR is released
|
||||
# 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'
|
||||
|
||||
metadata
|
||||
|
12
README.rst
12
README.rst
@ -20,9 +20,9 @@ https://docs.openstack.org/tempest/latest/
|
||||
Requirements
|
||||
============
|
||||
|
||||
- Chef 14 or higher
|
||||
- ChefDK 3.2.30 for testing (also includes Berkshelf for cookbook
|
||||
dependency resolution)
|
||||
- Chef 15 or higher
|
||||
- Chef Workstation 0.15.18 for testing (also includes Berkshelf for
|
||||
cookbook dependency resolution)
|
||||
|
||||
Cookbooks
|
||||
---------
|
||||
@ -31,8 +31,8 @@ The following cookbooks are dependencies:
|
||||
|
||||
- 'bind', '~> 2.3.1'
|
||||
- 'openstackclient'
|
||||
- 'openstack-common', '>= 18.0.0'
|
||||
- 'openstack-image', '>= 18.0.0'
|
||||
- 'openstack-common', '>= 19.0.0'
|
||||
- 'openstack-image', '>= 19.0.0'
|
||||
- 'resolver'
|
||||
|
||||
Recipes
|
||||
@ -88,7 +88,7 @@ License and Author
|
||||
+-----------------+--------------------------------------------------+
|
||||
| **Copyright** | Copyright (c) 2014, Rackspace US, Inc. |
|
||||
+-----------------+--------------------------------------------------+
|
||||
| **Copyright** | Copyright (c) 2017-2019, Oregon State University |
|
||||
| **Copyright** | Copyright (c) 2017-2020, Oregon State University |
|
||||
+-----------------+--------------------------------------------------+
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
|
@ -1,9 +1,10 @@
|
||||
# encoding: UTF-8
|
||||
#
|
||||
# Cookbook Name:: openstack-integration-test
|
||||
# Cookbook:: openstack-integration-test
|
||||
# Attributes:: default
|
||||
#
|
||||
# Copyright 2014, Rackspace US, Inc.
|
||||
# Copyright:: 2014, Rackspace US, Inc.
|
||||
# Copyright:: 2017-2020, Oregon State University
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -65,20 +66,42 @@ default['openstack']['integration-test'] = {
|
||||
case node['platform_family']
|
||||
when 'fedora', 'rhel' # :pragma-foodcritic: ~FC024 - won't fix this
|
||||
default['openstack']['integration-test']['platform'] = {
|
||||
tempest_packages: %w(git curl libxslt-devel
|
||||
libxml2-devel python-testrepository
|
||||
libffi-devel python-devel
|
||||
python-gabbi python-testscenarios
|
||||
python-ddt),
|
||||
tempest_packages:
|
||||
%w(
|
||||
git
|
||||
curl
|
||||
libxslt-devel
|
||||
libxml2-devel
|
||||
python-testrepository
|
||||
libffi-devel
|
||||
python-devel
|
||||
python-gabbi
|
||||
python-testscenarios
|
||||
python-ddt
|
||||
),
|
||||
package_overrides: '',
|
||||
}
|
||||
when 'debian'
|
||||
default['openstack']['integration-test']['platform'] = {
|
||||
'tempest_packages' => %w(git curl libssl-dev libffi-dev python-dev libxml2-dev
|
||||
libxslt1-dev libpq-dev libxml2-dev libxslt-dev
|
||||
testrepository python-dev libffi-dev
|
||||
python-gabbi python-testscenarios
|
||||
python-ddt),
|
||||
'tempest_packages' =>
|
||||
%w(
|
||||
git
|
||||
curl
|
||||
libssl-dev
|
||||
libffi-dev
|
||||
python-dev
|
||||
libxml2-dev
|
||||
libxslt1-dev
|
||||
libpq-dev
|
||||
libxml2-dev
|
||||
libxslt-dev
|
||||
testrepository
|
||||
python-dev
|
||||
libffi-dev
|
||||
python-gabbi
|
||||
python-testscenarios
|
||||
python-ddt
|
||||
),
|
||||
'package_overrides' => '',
|
||||
}
|
||||
end
|
||||
|
@ -6,7 +6,8 @@ default['openstack']['integration-test']['conf'].tap do |conf|
|
||||
conf['auth']['default_credentials_domain_name'] = 'Default'
|
||||
conf['auth']['admin_domain_name'] = 'Default'
|
||||
conf['identity']['catalog_type'] = 'identity'
|
||||
conf['identity']['disable_ssl_certificate_validation'] = node['openstack']['integration-test']['disable_ssl_validation']
|
||||
conf['identity']['disable_ssl_certificate_validation'] =
|
||||
node['openstack']['integration-test']['disable_ssl_validation']
|
||||
conf['identity']['v3_endpoint_type'] = 'publicURL'
|
||||
conf['identity']['strategy'] = 'keystone'
|
||||
conf['identity']['region'] = 'RegionOne'
|
||||
|
16
metadata.rb
16
metadata.rb
@ -3,13 +3,7 @@ maintainer 'openstack-chef'
|
||||
maintainer_email 'openstack-discuss@lists.openstack.org'
|
||||
license 'Apache-2.0'
|
||||
description 'Installs and configures the Tempest Integration Test Suite'
|
||||
version '18.0.0'
|
||||
|
||||
recipe 'openstack-integration-test::create_network', 'Create a test network and subnet for use in kitchen tests'
|
||||
recipe 'openstack-integration-test::dns', 'Setup environment for testing designate'
|
||||
recipe 'openstack-integration-test::orchestration', 'Setup environment for testing heat'
|
||||
recipe 'openstack-integration-test::run_tempest', 'Run tempest for use in kitchen tests'
|
||||
recipe 'openstack-integration-test::setup', 'Installs and configures Tempest'
|
||||
version '19.0.0'
|
||||
|
||||
%w(ubuntu redhat centos).each do |os|
|
||||
supports os
|
||||
@ -17,11 +11,11 @@ end
|
||||
|
||||
depends 'bind', '~> 2.3.1'
|
||||
depends 'openstackclient'
|
||||
depends 'openstack-common', '>= 18.0.0'
|
||||
depends 'openstack-dns', '>= 18.0.0'
|
||||
depends 'openstack-image', '>= 18.0.0'
|
||||
depends 'openstack-common', '>= 19.0.0'
|
||||
depends 'openstack-dns', '>= 19.0.0'
|
||||
depends 'openstack-image', '>= 19.0.0'
|
||||
depends 'resolver'
|
||||
|
||||
issues_url 'https://launchpad.net/openstack-chef'
|
||||
source_url 'https://opendev.org/openstack/cookbook-openstack-integration-test'
|
||||
chef_version '>= 14.0'
|
||||
chef_version '>= 15.0'
|
||||
|
@ -1,8 +1,10 @@
|
||||
# encoding: UTF-8
|
||||
#
|
||||
# Cookbook Name:: openstack-integration-test
|
||||
# Cookbook:: openstack-integration-test
|
||||
# Recipe:: create_network
|
||||
#
|
||||
# Copyright:: 2020, Oregon State University
|
||||
#
|
||||
# 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
|
||||
|
@ -1,3 +1,23 @@
|
||||
# encoding: UTF-8
|
||||
#
|
||||
# Cookbook:: openstack-integration-test
|
||||
# Recipe:: dns
|
||||
#
|
||||
# Copyright:: 2020, Oregon State University
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
class ::Chef::Recipe
|
||||
include ::Openstack
|
||||
include BindCookbook::Helpers
|
||||
@ -30,7 +50,7 @@ template "#{default_property_for(:sysconfdir, false)}/rndc.key" do
|
||||
cookbook 'openstack-dns'
|
||||
owner default_property_for(:run_user, false)
|
||||
group default_property_for(:run_group, false)
|
||||
mode 00440
|
||||
mode '440'
|
||||
sensitive true
|
||||
variables(
|
||||
secret: rndc_secret
|
||||
|
@ -1,3 +1,21 @@
|
||||
# encoding: UTF-8
|
||||
#
|
||||
# Cookbook:: openstack-integration-test
|
||||
# Recipe:: orchestration
|
||||
#
|
||||
# Copyright:: 2020, Oregon State University
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
execute 'bash -c "source /root/openrc && openstack keypair create heat_key > /tmp/heat_key.priv"' do
|
||||
creates '/tmp/heat_key.priv'
|
||||
end
|
||||
|
@ -1,8 +1,10 @@
|
||||
# encoding: UTF-8
|
||||
#
|
||||
# Cookbook Name:: openstack-integration-test
|
||||
# Cookbook:: openstack-integration-test
|
||||
# Recipe:: run_tempest
|
||||
#
|
||||
# Copyright:: 2020, Oregon State University
|
||||
#
|
||||
# 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
|
||||
|
@ -1,9 +1,10 @@
|
||||
# encoding: UTF-8
|
||||
#
|
||||
# Cookbook Name:: openstack-integration-test
|
||||
# Cookbook:: openstack-integration-test
|
||||
# Recipe:: setup
|
||||
#
|
||||
# Copyright 2014, Rackspace US, Inc.
|
||||
# Copyright:: 2014, Rackspace US, Inc.
|
||||
# Copyright:: 2017-2020, Oregon State university
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -30,13 +31,10 @@ end
|
||||
platform_options = node['openstack']['integration-test']['platform']
|
||||
service_available = node['openstack']['integration-test']['conf']['service_available']
|
||||
|
||||
platform_options['tempest_packages'].each do |pkg|
|
||||
package pkg do
|
||||
package platform_options['tempest_packages'] do
|
||||
options platform_options['package_overrides']
|
||||
|
||||
action :upgrade
|
||||
end
|
||||
end
|
||||
|
||||
identity_endpoint = internal_endpoint 'identity'
|
||||
auth_url = ::URI.decode identity_endpoint.to_s
|
||||
@ -84,6 +82,7 @@ openstack_role node['openstack']['integration-test']['heat_stack_user_role'] do
|
||||
end
|
||||
|
||||
include_recipe 'openstack-common'
|
||||
build_essential 'tempest'
|
||||
|
||||
tempest_path = '/opt/tempest'
|
||||
venv_path = '/opt/tempest-venv'
|
||||
@ -103,8 +102,7 @@ end
|
||||
# Note(jh): Make sure to keep the constraint definition in sync with
|
||||
# the tempest version
|
||||
tempest_ver = '22.1.0'
|
||||
constraint = '-c https://opendev.org/openstack/requirements/raw/'\
|
||||
'branch/stable/train/upper-constraints.txt'
|
||||
constraint = '-c https://opendev.org/openstack/requirements/raw/branch/stable/train/upper-constraints.txt'
|
||||
|
||||
execute 'install tempest' do
|
||||
action :nothing
|
||||
@ -124,7 +122,7 @@ template "#{venv_path}/tempest.sh" do
|
||||
source 'tempest.sh.erb'
|
||||
user 'root'
|
||||
group 'root'
|
||||
mode 0o755
|
||||
mode '755'
|
||||
variables(
|
||||
venv_path: venv_path
|
||||
)
|
||||
@ -188,7 +186,7 @@ template '/opt/tempest/etc/tempest.conf' do
|
||||
cookbook 'openstack-common'
|
||||
owner 'root'
|
||||
group 'root'
|
||||
mode 0o0600
|
||||
mode '600'
|
||||
variables(
|
||||
service_config: integration_test_conf_options
|
||||
)
|
||||
@ -197,7 +195,7 @@ end
|
||||
directory '/opt/tempest/logs' do
|
||||
owner 'root'
|
||||
group 'root'
|
||||
mode 0755
|
||||
mode '755'
|
||||
action :create
|
||||
end
|
||||
|
||||
|
@ -38,7 +38,7 @@ describe 'openstack-integration-test::dns' do
|
||||
source: 'rndc.key.erb',
|
||||
owner: 'named',
|
||||
group: 'named',
|
||||
mode: 00440,
|
||||
mode: '440',
|
||||
sensitive: true,
|
||||
variables: {
|
||||
secret: 'rndc-key',
|
||||
|
@ -38,7 +38,7 @@ describe 'openstack-integration-test::dns' do
|
||||
source: 'rndc.key.erb',
|
||||
owner: 'bind',
|
||||
group: 'bind',
|
||||
mode: 00440,
|
||||
mode: '440',
|
||||
sensitive: true,
|
||||
variables: {
|
||||
secret: 'rndc-key',
|
||||
|
@ -12,20 +12,7 @@ describe 'openstack-integration-test::setup' do
|
||||
include_context 'tempest-stubs'
|
||||
|
||||
it 'installs tempest dependencies' do
|
||||
%w(
|
||||
curl
|
||||
git
|
||||
libffi-devel
|
||||
libxml2-devel
|
||||
libxslt-devel
|
||||
python-ddt
|
||||
python-devel
|
||||
python-gabbi
|
||||
python-testrepository
|
||||
python-testscenarios
|
||||
).each do |pkg|
|
||||
expect(chef_run).to upgrade_package(pkg)
|
||||
end
|
||||
expect(chef_run).to upgrade_package %w(git curl libxslt-devel libxml2-devel python-testrepository libffi-devel python-devel python-gabbi python-testscenarios python-ddt)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -21,12 +21,7 @@ describe 'openstack-integration-test::setup' do
|
||||
}
|
||||
|
||||
it 'installs tempest dependencies' do
|
||||
packages = %w(git libxml2-dev libxslt-dev testrepository python-dev
|
||||
libffi-dev)
|
||||
|
||||
packages.each do |pkg|
|
||||
expect(chef_run).to upgrade_package(pkg)
|
||||
end
|
||||
expect(chef_run).to upgrade_package %w(git curl libssl-dev libffi-dev python-dev libxml2-dev libxslt1-dev libpq-dev libxml2-dev libxslt-dev testrepository python-dev libffi-dev python-gabbi python-testscenarios python-ddt)
|
||||
end
|
||||
|
||||
it 'registers tempest_project1 Project' do
|
||||
@ -164,7 +159,7 @@ describe 'openstack-integration-test::setup' do
|
||||
expect(chef_run).to create_template(file.name).with(
|
||||
user: 'root',
|
||||
group: 'root',
|
||||
mode: 0o0600
|
||||
mode: '600'
|
||||
)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user