18 Commits

Author SHA1 Message Date
Mark Goddard
2a00b4cc67 Fix ironic inspector rule creation idempotency
Ironic inspector rules are registered both with the seed and (if using)
overcloud ironic inspector services. These tasks often show up as
changed even when no configuration changes have been made that would
affect the rules.

This is caused by inspector returning default values for fields that may
be omitted in the requested rule. This change fixes the issue by
including those defaults in the comparison.

Change-Id: Ia24e328d4531201d76a65b6385e4463bb1f3c5c6
Story: 2007399
Task: 38997
2020-04-28 13:51:35 +00:00
Pierre Riteau
15109ccb54 Make Kayobe code compatible with Python 3
Co-Authored-By: Mark Goddard <mark@stackhpc.com>

Change-Id: I2a7a82d7f576739c5516a0072f953712ffa5c233
Story: 2004959
Task: 29392
2020-02-27 11:10:29 +00:00
Mark Goddard
2e842ab3f5 Remove activate-virtualenv and deactivate-virtualenv roles
These roles are no longer necessary now that Ansible supports setting
ansible_python_interpreter via a task- or role-scoped variable.

Change-Id: I4121d01dc83ac028350d4d98d3e1158e15fdfd63
Story: 2006574
Task: 38824
2020-02-20 15:28:56 +00:00
Mark Goddard
2de3a2c578 Switch from shade to openstacksdk
Upstream Ansible OpenStack modules now use openstacksdk rather than shade.
Switch local Ansible modules to follow suit. Also switch to use the
stackhpc.os_openstacksdk role from stackhpc.os-shade.

The stackhpc.os-shade role is removed during 'kayobe control host upgrade'.

Change-Id: Id3894c3c36ef99f00ed463de6a3457e11733d6b7
Story: 2007294
Task: 38759
2020-02-20 15:28:56 +00:00
Kayobe deployment user
84d17b055e Use internal API endpoints in overcloud API interaction
Connections default to 'public' interface when attempting to run
openstack commands.  This breaks setups where the network hosts are
separate from the controllers.

This change adds an ``openstack_interface`` variable to select the
correct endpoint to use, which defaults to ``internal``.

Co-Authored-By: Michael Senizaiz <michael@r-hpc.com>

Change-Id: Ifa766d2cc3ed7077f03c571398072ad5117701c6
Story: 2006814
Task: 37374
2019-11-28 16:56:38 +00:00
Mark Goddard
ddfd6b6202 Update packages in virtualenvs
Kayobe uses a number of virtual environments on the remote hosts for
python dependencies such as shade, python-openstackclient, docker, etc.
By default these are stored in /opt/kayobe/venvs/. Typically we do not
provide version restrictions when installing these packages, so over the
course of time they may become stale and incompatible.

This change installs the latest version of packages allowed by OpenStack
upper constraints.

It also adds a new variable, 'pip_upper_constraints_file', to set the
upper constraints file. The existing variable
'kolla_upper_constraints_file' now defaults to the value of
'pip_upper_constraints_file'.

Change-Id: I8d2956f95bbc44b5a9e88e7569372048a62f12f5
Story: 2005923
Task: 34193
2019-08-15 11:01:49 +00:00
Mark Goddard
e83c57f233 Add support for CA certificate parameter
When using Ansible OpenStack modules, if OS_CACERT is defined, then this
will be passed as the cacert module argument.

This ensures that non-standard CA certificate paths can be used.

Change-Id: I2a2575b1fb0f149cc13c44526fc0167e68e07aab
Story: 2004911
Task: 29261
2019-01-31 15:38:52 +00:00
Mark Goddard
935d3cef6a Update dependencies to Rocky
Use stable/rocky branch of:

* Kolla
* Kolla ansible
* Bifrost
* IPA
* OpenStack services
* Requirements

Also updates Kolla Ansible inventory template.

The seed deploy job has been made non-voting and non-gating, because we
are waiting for bifrost change https://review.openstack.org/#/c/618740
to merge, be released, and for the kolla bifrost image to use the new
package.

Change-Id: Id5e7fdbd196f96e1e75ffc68bc93aab18fa38aa7
Story: 2001864
Task: 27798
Depends-On: I58e4f951d4a3dd89e0784fd82d8a62dbba374f79
2018-11-19 14:37:33 +00:00
Mark Goddard
f0b84702ee Fix ironic inspector rule registration
Use a specific inspector API version (1.12, the latest in Queens) to
ensure that new releases of ironic inspector don't break rule
registration.

This was happening because the client object created in the
os_ironic_inspector_rule module uses the maximum API version known to
the client.

Change-Id: I8c15cd874e147545b0604427771d412b482e5380
Story: 2003129
Task: 23250
2018-08-01 14:36:28 +01:00
Mark Goddard
ecf0527f97 Use (de)activate-virtualenv role to activate virtualenvs
These roles ensure that the previous value of ansible_python_interpreter is
restored when the virtualenv is deactivated.
2017-12-19 16:32:48 +00:00
Mark Goddard
2a43254f7c Move shade, openstackclient and projects roles to Ansible Galaxy 2017-04-06 21:37:20 +01:00
Mark Goddard
7807016862 License kayobe project under Apache2
All python files now have a license header and copyright notice
2017-04-06 10:15:29 +01:00
Mark Goddard
08b83abc22 Correct module name in ironic-inspector-rules role README 2017-03-28 17:56:57 +01:00
Mark Goddard
d4df9cc7b8 Create README for ironic-inspector-rules role 2017-03-28 17:47:32 +01:00
Mark Goddard
0ea9003c6a Refactor a shade role out of ironic-inspector-roles 2017-03-15 11:12:05 +00:00
Mark Goddard
d072c069ce A couple of small dependency fixes 2017-03-15 09:44:21 +00:00
Mark Goddard
4010b3d6b9 Bifrost & inspector: add rules, configure IPA ramdisk & kernel 2017-03-06 14:57:45 +00:00
Mark Goddard
b235bcf65a Support Ironic inspector in Bifrost container
Adds support for setting which ports to add during inspection and a
role for creating introspection rules in inspector.
2017-03-03 14:19:53 +00:00