Commit Graph

14 Commits

Author SHA1 Message Date
Ghanshyam Mann 0a53c4a961 Retire openstack-chef: remove repo content
OpenStack-chef project is retiring
- https://review.opendev.org/c/openstack/governance/+/905279

this commit remove the content of this project repo

Depends-On: https://review.opendev.org/c/openstack/project-config/+/909134
Change-Id: Idb3769e91814eb7703a3a4787f485fab1caa97f8
2024-02-17 20:47:50 -08:00
Lance Albertson 763b9b5e18 Full coverage openstackclient integration testing
This provides full coverage of openstackclient cookbook integration testing.
Also enable multiple_converge when using kitchen to try and catch additional
idempotency issues.

Change-Id: Iaaf06bcbb8206f99c02bd6e89ecf8b8c2bf384e2
Signed-off-by: Lance Albertson <lance@osuosl.org>
2022-06-03 13:53:15 -07:00
Lance Albertson 7d2ecf253c CentOS 8 support
This adds support for testing CentOS 8.

- Update documentation
  - Add references to CentOS 8
  - Update genealogy to include latest releases
  - Update minimum Chef requirement
  - Add Bare Metal to list of cookbooks when creating a stable branch
- Include memcached in identity role
- Update InSpec tests for CentOS 8
- Ensure we install the yum package on rpm distros (required by Chef to
  run properly and is missing on the default image)
- Remove yum-epel attributes in integration since it breaks on EL8

Change-Id: Ie648432021325150fdd2fd7ab7f1af10bc69b655
Signed-off-by: Lance Albertson <lance@osuosl.org>
2021-10-22 16:29:33 -07:00
Lance Albertson baf017a2b6 Update to using Chef Workstation 20.9.158
This includes newer cookstyle rules that we should be checking for.

Change-Id: I6f1bedfe30dd3455570b41862e01b0c928f5e565
Signed-off-by: Lance Albertson <lance@osuosl.org>
2020-10-05 20:24:42 -07:00
Lance Albertson 0e1bbc88fc Chef 16 support
This adds support for testing both Chef/Cinc 15 and Chef/Cinc 16 which
are still supported upstream. For now this disables voting on 16 as we
have some known issues that need to be worked out first.

In addition, this updates to Chef Workstation 20.8.111 which includes
Chef 16 for spec testing. For now, let's only worry about doing unit
testing against Chef 16 and worry about integration testing to catch any
issues with Chef 15.

Also remove installation of the fog-openstack gem as it's now included
in Chef Workstation by default.

Change-Id: I191b14a295bf323ab37f5a97298f9f0594e8843c
Signed-off-by: Lance Albertson <lance@osuosl.org>
2020-08-25 10:24:05 -07:00
Lance Albertson 89f4b5c1e7 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
2020-06-08 10:59:07 -07:00
Dr. Jens Harbott 5111603bb5 Start Stein development
- Update references from Rocky to Stein.
- Switch to using chef-workstation
- Exclude integration group from Berksfile. This is to ensure ChefSpec tests
  should always work regardless if we're working on integration related
  cookbooks that don't interact with those tests.
- Temporarily disable voting for integration tests due to cookbook version
  conflicts
- Add tests for openstack-common::etcd and openstack-common::completions
- Update tests for Stein
- Update OVS port to check
- Add tests for lbaas but only for kitchen, not for CI pipeline
- Add suite and tests for integration-test

Change-Id: Id451b08e361acc709879a65d0d92b35640a5dba9
2020-03-23 14:22:28 -07:00
Lance Albertson 1fe9d31295 Update tests for using newer mariadb cookbook
This updates the integration tests for the ops-database cookbook so that
it works properly with the new mariadb cookbook. In addition:

- Enable auto_correct for forwarded_port so we can run more than one
  instance at a time with test-kitchen
- Remove mariadb attributes that are no longer needed
- Temporarily disable voting on centos/ubuntu gates since this will
  require a patch from ops-database and we cannot create a circular
  dependency

Depends-On: https://review.opendev.org/710348
Change-Id: I215a777d255b4b5f9a3481f782a2b7b89f9c3a07
2020-02-27 19:05:50 -08:00
Lance Albertson cbc1b9bcf4 Refactor integration tests
This changes the logic so that we use the Berksfile in the cookbook
we're doing changes in instead of what's included in openstack-chef.
This should allow us to properly deal with cookbook dependencies in a
saner fashion with Gerrit without getting into depends-on hell.

This also required refactoring the Rakefile and roles used in Gerrit and
test-kitchen. Each cookbook now has their own role and test role which
includes specific Tempest configuration settings. This will require
updates in most cookbooks' Berksfile to include missing cookbook
dependencies such as ops-database, ops-messaging and integration-test.

Other major changes includes migrating to using InSpec for integration
testing instead of relying on simple commands included in the Rakefile.
I have replaced most of what was included in _run_basic_queries as
InSpec tests which also improves our coverage overall. Currently the
InSpec coverage is fairly basic and should probably include additional
tests, but in general it covers the following:

I've also added minimal non-voting jobs for both platforms so we can
catch any issue we might have missed downstream.

- Services are enabled and running
- Basic commands return sane output
- Openstack users, services and endpoints are correct

The all suites exclude running Tempest due to the fact that InSpec
doesn't have the ability to change the command timeout beyond 600
seconds [1] which is an issue I've run into. It's recommended to run
tempest manually when using test-kitchen.

NOTE: I haven't made any updates to the multi-node test-kitchen
environment in this patch and will plan on doing that later. I don't
believe this will break anything there.

Other various minor changes include:

- Replaced bare-metal cookbook with block-storage in minimal role
- Print out the command that run_command is going to run to help with
  debugging.
- Use different public_ip so that it doesn't interfere with people using
  10.0.0.0/24 locally (like me!).
- Add forwarded port to access Horizon
- Switch to using Chef 15 with test-kitchen
- Include log files from additional services that we were missing
- Add missing databag for aodh and telemetry_metric
- Include a real rndc key in the databag to assist with testing
- Use OSUOSL for EPEL mirror to work around public mirror issues

[1] https://github.com/inspec/inspec/issues/1675

Depends-On: https://review.opendev.org/703882

Change-Id: Idebc87ebb6acad7d0af222fb9025fefcb9bf5a1e
2020-01-30 10:10:45 -08:00
Lance Albertson 5280706daa Refactor and update test-kitchen suites
This provides a large collection of updates and refactoring to improve
the development environment for the cookbooks using test-kitchen.

The primary change this provides is the addition of the 'minimal' suite
which replicates what the integration test jobs run in Zuul. This is
useful for testing and debugging issues that might be found during CI
jobs.

- Switch run_list to using roles to better match how the zuul jobs work
- Update to using Ubuntu 18.04 instead of 16.04
- Move all attributes from .kitchen.yml files to environments
- Update multi-node and dokken test-kitchen
- Use MariaDB 10.1 by default as 10.0 has been deprecated upstream for
  ubuntu 18.04. Also use OSUOSL mirror as it's more stable than
  upstream
- Don't disable EPEL on RHEL systems
- Synchronize attributes (within reason) between test-kitchen files
- Update roles run_list
- Create openstack_test cookbook and update /etc/apt/sources.list to
  OSUOSL mirrors to improve stability on Ubuntu

Change-Id: Ie6d7b56a78f7fadbd28e6d27a46446a46c3c5ebd
Signed-off-by: Lance Albertson <lance@osuosl.org>
2019-08-06 10:52:40 +00:00
Samuel Cassiba 5cf51b76f0 Finalize the move from openstack-chef-repo to openstack-chef
Change-Id: Ie97fe2af2a068f5c4a970fb45f24c162b705860c
2018-08-06 09:30:52 -07:00
Samuel Cassiba 642b6e7175 Revert inspec test to use Tempest from git
Change-Id: Ief99c2de7bbef8a61d57e7fde59507f791a4519f
Implements: blueprint modern-chef
2018-02-08 22:19:54 -08:00
Samuel Cassiba 9a0b2b6622 Implemented Chef 13 support for Test Kitchen and CI
- implemented foodcritic and cookstyle corrections
- simplified environments files to a single environment for each scenario,
  as opposed to one environment file per OS flavor
- updated inspec test for tempest from package

Implements blueprint modern-chef

Depends-On: If971a472c1fd9149a891200548a267655620fce2
Depends-On: Ib268737d2f5c3196061d89202d806c3af1c54e72
Change-Id: I5f1cb87573098623aa9f8c224a89527ce813e055
2018-01-17 03:32:14 +00:00
Roger Luethi 962633f25a Add support for kitchen testing
This changeset adds support for testing openstack-chef-repo with kitchen
and tempest.

Out of 63 tests, 33 pass and 30 are skipped, same as with current CI
tests.

The recipe, run_tempest in openstack-integration-test, is called at the
end of the installation phase.

In addition, a tempest run can be executed manually with
"kitchen verify".

Depends-On: I98706b1fc2c65a2359ca9b117a9491c0569514bd
Change-Id: I90c4ab627e3834ba9fd5791c425320e9536f7826
2017-09-23 14:34:32 +00:00