Commit Graph

17 Commits

Author SHA1 Message Date
Grzegorz Koper a46b78e594 ipa-images: use changed openstack.cloud output
Updating requirements.yml with latest os-networks role

Following up:
Ia3550644e5fc3e83f792e46d42b4c35d5eec4705

Change-Id: I9cb1b4c5329dc9db8562cf317616101d35f13edb
2023-11-14 12:27:58 +00:00
Grzegorz Koper 80f6db34cd Bump up Ansible supported versions to 7.x/8.x
This change bumps up the maximum supported version of Ansible to 8.x
(ansible-core 2.15.x) and minimum to 7.x (ansible-core 2.14.x).

Depends on:
https://github.com/stackhpc/ansible-role-systemd-networkd/pull/10

https://github.com/stackhpc/ansible-role-dell-powerconnect-switch/pull/13

https://github.com/stackhpc/ansible-role-mellanox-switch/pull/8

gateway_ip was being set to empty string. This was triggering neutron
""Invalid input for gateway_ip. Reason: '' is not a valid IP address."
Omitting by default.

Installing openstack.cloud collection.
Upgrade failed as Ansible in kayobe-venv was not upgraded.

Change-Id: Ia3550644e5fc3e83f792e46d42b4c35d5eec4705
2023-11-07 18:33:06 +01:00
Bartosz Bezak 717f4d9fe1 set previous_release to zed
Upgrade CI job needs clouds.yaml to be used from Zed

Newer version of ansible-collections-openstack uses different return
value. [1]

[1] https://review.opendev.org/c/openstack/ansible-collections-openstack/+/841224

Change-Id: Ic0608bc6033025cb47655d601ffaf3744637832f
2023-01-13 21:22:43 +01:00
Mark Goddard f639ad0b35 Use ansible_facts to reference facts
By default, Ansible injects a variable for every fact, prefixed with
ansible_. This can result in a large number of variables for each host,
which at scale can incur a performance penalty. Ansible provides a
configuration option [0] that can be set to False to prevent this
injection of facts. In this case, facts should be referenced via
ansible_facts.<fact>.

This change updates all references to Ansible facts within Kayobe
from using individual fact variables to using the items in the
ansible_facts dictionary. This allows users to disable fact variable
injection in their Ansible configuration, which may provide some
performance improvement.

This change disables fact variable injection in the ansible
configuration used in CI, to catch any attempts to use the injected
variables.

[0] https://docs.ansible.com/ansible/latest/reference_appendices/config.html#inject-facts-as-vars

Story: 2007993
Task: 42464
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/791276

Change-Id: I14db53ed6e57d37bbd28dd5819e432e3fe6628b2
2021-08-21 09:57:29 +02:00
Michal Nasiadka 16cce92a74 Bump max Ansible version to 2.10
Molecule also needs to be bumped to support Ansible 2.10
lint: section changed in Molecule 3.x - adapted.
molecule-docker added do test-reqs because it code has moved to it from
molecule core
pytest-testinfra and pytest-molecule needed for testinfra tests to work

[1]: https://github.com/ansible-community/molecule/issues/2872

Change-Id: I0299f5126ebd080f3912a76294b0013abe7747a0
2021-03-24 07:25:28 +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
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 ef84890798 Fix IPA image download
The IPA ramdisk and kernel images may be built or downloaded via a URL.
If the latter option is used, any images previously downloaded to
$KOLLA_CONFIG_PATH/config/ironic/ironic-agent.* would previously not be
updated if the image contents change.

This change introduces variables for setting a URL to a file containing
checksums for the images. The algorithm used to compute the checksum is
also configurable (default sha256). This allows us to ensure we are
using the correct version of the image, while avoiding an expensive few
hundred megabyte image download just to check.

If a checksum is not specified, the image will be downloaded every time
to ensure that it is up to date.

Change-Id: I8120518ed98d61f3652f5205ce7ec9f798ab2aa1
Story: 2001660
Task: 6693
2018-10-02 13:30:11 +01:00
Mark Goddard 1b5d05dc2e Update ironic IPA deployment images
This will update the the deploy_ramdisk and
deploy kernel properties of  'Driver info'
field on Ironic nodes if the locally built
or externally referenced images are updated.

Change-Id: Id3997db452dde6e6e242a9b1091cb219c53ebda1
2018-09-03 15:29:58 +01:00
Nick Jones 5265993134
Don't assume user's primary group name is the same as username
In certain environments, a user's primary group doesn't necessarily
match that of their username.  This change updates various playbooks to
make use of the `ansible_user_gid` fact instead.

This change also makes ownership explicit by using `ansible_user_uid`
instead of `ansible_user` or `ansible_user_id`, where appropriate.

Change-Id: Ifc2ea7d95ec90e91791ccb10772b15d991379479
Story: 2002770
Task: 22636
2018-07-04 19:56:05 +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 ca284aea06 Fix ansible warnings for when clauses with curly braces 2017-10-20 12:14:35 +01:00
Mark Goddard 7727bb8858 Fix IPA image registration
Upstream image use broken during recent refactoring
2017-04-27 12:31:29 +01:00
Mark Goddard cb403208be Allow IPA images to be built locally
This will be performed by kayobe overcloud post configure if ipa_build_images
is True.
2017-04-21 16:39:28 +01:00
Mark Goddard 70e3ab4ab2 Add support for registering IPA images in overcloud 2017-03-15 16:42:32 +00:00