Commit Graph

27 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 442dcab018 Chef 17 support
- Switch to testing Chef/Cinc 17 by default
- Remove testing Chef/Cinc 15 and require >= 16.0
- Update to testing with Chef Workstation 21.10.640
- Remove workaround with berkshelf

Change-Id: I3eb69389f73de86dc06d11ee935028297dbc0aea
Signed-off-by: Lance Albertson <lance@osuosl.org>
2021-10-14 08:25:30 -07:00
Lance Albertson e84e1be514 Disable SELinux for integration testing on RHEL only
We currently don't fully support SELinux so we need to disable it for now until
we get it fixed properly. Make this a variable so that we can change dynamically
later if we need to for testing purposes.

Temporarily disable voting until we get things working properly again.

Change-Id: Ib6dec3f6ea1cbc13d9c82d372b4f65f689adc0bc
Signed-off-by: Lance Albertson <lance@osuosl.org>
2021-07-14 10:59:55 -07:00
Lance Albertson e4144314cd Update to Chef Workstation 21.2.303
Change-Id: Ifd11f2c53cc9aac82c5c18037c11445d44791549
Signed-off-by: Lance Albertson <lance@osuosl.org>
2021-03-08 15:53:41 -08:00
Lance Albertson 2d4e29c2a4 Pin berkshelf to < 7.2.0 to work around issues with Chef/Cinc 15
This works around a problem that was introducted in berkshelf-7.2.0 for Ruby 3.0
support that now breaks berks with the following error:

  ArgumentError wrong number of arguments (given 3, expected 1..2)

This should be removed after we remove support for Chef/Cinc 15.

Signed-off-by: Lance Albertson <lance@osuosl.org>
Change-Id: Ica4a65a98f3b3b509d1aa8df5f36f62f3677acab
2021-03-04 15:28:35 -08: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 b70036a70e Re-enable latest Chef 16 builds
This requires a fix in cookbook-openstack-common that will depend on this patch
so jobs need to be disabled.

Change-Id: Ide2fefddcd79ad7ff9bbe748187b4fd4999a857a
Signed-off-by: Lance Albertson <lance@osuosl.org>
2020-09-21 10:50:36 -07:00
Jens Harbott 1a9fc6f4fc Cap chef-client version at 16.4
We are seeing errors with 16.5, cap at 16.4 until we can fix those.

Change-Id: I4bf09483ce7cc560dfe477e9c615e8007764e3ea
2020-09-21 13:00:19 +02: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
Zuul a9e48de68e Merge "Add testing with the community built client" 2020-06-11 20:54:10 +00:00
Jens Harbott 967ea2bd5e Add testing with the community built client
Create a role for installing a chef-client implementation instead of
having it hardcoded within the pre playbook.

Create additional jobs running with cinc-client.

Change-Id: Ib6c592f684072f60962c1be5fccff035fd4c3459
2020-06-10 09:52:46 +02:00
Lance Albertson 81249f67cb Update to Chef Workstation 0.18.3
Change-Id: I125521525d88ee404c0d9d8b6d43249e01291817
2020-05-21 15:19:53 -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 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 52970bdd45 Switch to using Chef 15
Change-Id: I3c981bfc19f39d869c5890e159431c50d5c97a5d
2020-01-03 13:49:05 +00:00
Lance Albertson 9a1672a072 Install and use Chef Client instead of ChefDK on integration tests
Using the chef-client baked into ChefDK is causing issues with the
fog-openstack gem since it is locked in ChefDK. To work around this and
better mimic how this is used in production, switch the integration
tests to installing chef-client instead of ChefDK.

- Split out pre-run playbooks between delivery and integration (keep
  ChefDK for delivery)
- Install Chef 14 by default
- Install Berkshelf in Chef
- Install cookstyle which is needed in the Rakefile
- Update command paths so that berkshelf is available with Chef and
  ChefDK
- Update ChefDK to 3.2.30 but not higher due to issues with chefspec and
  apache2 [1]
- Upgrade fog-openstack gem to work around extraneous warnings to match
  cookbook-openstackclient
- Remove unneeded pip downgrade

[1] https://github.com/sous-chefs/apache2/issues/588

Change-Id: I0b0c2eb80dc0d831685cc7f69a1186a6148e6258
Signed-off-by: Lance Albertson <lance@osuosl.org>
2019-07-04 11:12:41 +00:00
OpenDev Sysadmins cc45ff9f36 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:40:06 +00:00
Jens Harbott 9e62a39913 Updates for Rocky deployment
OpenStack Rocky is only supported on Ubuntu Bionic, so we no longer can
run any sensible tests on Xenial.

- Update default mariadb version to 10.1

Depends-On: https://review.openstack.org/645119
Depends-On: https://review.openstack.org/645162
Change-Id: Ifcf73e49a77e497b19700566a3a13ebfc9ca9741
2019-03-21 12:48:44 +00:00
Jens Harbott 973119bad3 Downgrade pip to work around poise-python issue
There is a bug in the poise-python cookbook because it depends on
internal features of pip and these internals have changed in pip 18.1,
see [0]. We have a workaround in the openstack-common cookbook proposed,
but that doesn't work if the server has pip 18.1 pre-installed, as seems
to be the case for the infra-provided CI image. So as a further
workaround we need to downgrade the pre-installed pip version for the
time being.

[0] https://github.com/poise/poise-python/issues/133

Depends-On: https://review.openstack.org/610427
Change-Id: I52514691d3f271579628b62539222f7307957ba0
2018-10-15 11:39:24 +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 af29db98a6 Increment ChefDK to 3.1
Change-Id: Ib23f7dfcaba585e7419ef9c6fdf5abd49dbffdac
2018-08-03 06:45:12 -07:00
Samuel Cassiba 6e6dcc4a6a Increment ChefDK to 2.5
Change-Id: I161af1074cd17f2e3d2d2cf0b37a0c5fa1015fd3
2018-07-16 15:16:39 -07:00
Samuel Cassiba d37238a2d1 Use Chef Delivery to run verification tests
Chef Delivery is the command-line interface for workflow capabilities in Chef
Automate and the standard interface that Chef community cookbooks use for
verification.

Change-Id: I72a1775369f955901260173b061f28640055c808
Implements: blueprint deprecate-rakefiles
2018-07-12 12:01:28 -07:00
Samuel Cassiba 929327b0fa Increment ChefDK to 2.4
DRY the pre playbook, use ChefDK 2.4

Change-Id: Ia1ce517d4ee6b4ba92fbca960852dbd1dcc298b6
2018-03-24 22:53:53 -07:00
Samuel Cassiba 07c5912773 Bumped ChefDK release to 2.3.4
- With Chef 13, comes new ChefDK. This commit replaces the older 1.6 release
  with 2.3

Implements: blueprint modern-chef

Change-Id: Iac1ba6f0c3fb5f350a0afc0a5d1db944fb5397f4
2018-01-30 14:49:53 +00:00
Samuel Cassiba a317a117c8 Updated integration attributes and methods
- Implemented changes consistent with cookstyle
- DRY the environment files
- Added tempest recipes in minimal role; drop build-essential
- Corrected url for chefdk with current scheme
- Removed nova smoke test since this is handled by tempest and tends to fire
  before nova is available in integration

Implements blueprint modern-chef

Change-Id: I5c5371eed12b282a527576822b270cce8b0e76a7
2017-12-23 21:54:20 -08:00
Jens Harbott 577adaea35 Implement native zuul v3 tests
Change-Id: I5160ce88aefa2c5b70e4a4cb085867198e60b45a
2017-10-27 13:34:05 +00:00