Commit Graph

58 Commits

Author SHA1 Message Date
Zuul 7425ad4313 Merge "Fix a typo in pxe_redfish definition" 2024-02-13 15:49:59 +00:00
Dmitriy Rabotyagov ca0a92ee2a Fix a typo in pxe_redfish definition
This typo leads for drivers misconfiguration and being unable to register
redfish as a proper driver.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_tempest/+/907180
Closes-Bug: #2050835
Change-Id: I0a2c3f3019f20c18dcfbc82847c432e656eda051
2024-01-30 08:47:42 +00:00
Dmitriy Rabotyagov 218724412b Allow to extend default ironic_driver_types
This patch implements extra variable that allows to define extra types
for ironic without need to fully override the existing ones.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_tempest/+/907180
Change-Id: Ic35dbeae949ba4425a0e352e51de64122b7c13d5
2024-01-30 08:47:29 +00:00
Dmitriy Rabotyagov fcde81e4a7 Add quorum queues support for service
This change implements and enables by default quorum support
for rabbitmq as well as providing default variables to globally tune
it's behaviour.

In order to ensure upgrade path and ability to switch back to HA queues
we change vhost names with removing leading `/`, as enabling quorum
requires to remove exchange which is tricky thing to do with running
services.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/896017
Change-Id: I0f6ae74be36c0cb7a2270cfa1085c44e6dd4dc77
2023-10-20 12:19:49 +00:00
Zuul 0f2e50ba41 Merge "Fix lack of constraints for ironic-inspector" 2023-08-17 13:04:51 +00:00
Andrew Bonney a665f45a69 Fix lack of constraints for ironic-inspector
OSA playbooks only call this role once for all Ironic containers
(API and inspector). As a result, the wheel builds only happen
once. If the first host (which is responsible for wheel builds)
is an API container, these vars would prevent Ironic inspector
requirements being accounted for, and as such no matching
constraints will be generated.

When the venv is deployed to the Ironic inspector container,
the lack of constraints can cause dependencies which are too new
to be installed, causing the service to fail.

Alternatively this role could be called twice by the playbook
for differing container/host roles, but as inspector is expected
to be merged into ironic at some point this feels equally valid.

Change-Id: I3952a4e5514824381410d87ed6d535f13ec40498
2023-08-02 14:44:56 +01:00
Dmitriy Rabotyagov 7226653ad9 Fix linters and metadata
With update of ansible-lint to version >=6.0.0 a lot of new
linters were added, that enabled by default. In order to comply
with linter rules we're applying changes to the role.

With that we also update metdata to reflect current state.

Depends-On: https://review.opendev.org/c/openstack/ansible-role-systemd_service/+/888223
Change-Id: I1ab9664505068c20924370790322caa67cc6e022
2023-07-14 18:07:30 +02:00
Jonathan Rosser b10a951953 Add driver type for redfish
Change-Id: I4a3d455cdddea3c0273c8350e0ddbbf0a0114cac
2023-04-25 08:19:16 +01:00
Dmitriy Rabotyagov e9fab281bd Ensure service is restarted on unit file changes
At the moment we don't restart services if systemd unit file is changed.

We knowingly prevent systemd_service role handlers to execute
by providing `state: started` as otherwise service will be restarted twice.
With that now  we ensure that role handlers will also listen for systemd
unit changes.

Change-Id: Ia9d1164e1e38201244a062be95f936b314c5c56b
2023-04-10 14:08:08 +00:00
Jonathan Rosser 0a5de94bf3 Add a no_driver ironic driver type
Enabling this driver type ensures that the no-console, no-raid
and no-inspect interfaces are enabled so that they can be later
configured on a per-node basis if required.

These interfaces are useful to have enabled at the same time as
driver specific interfaces such as idrac or ilo in order so that
managment of specific functions can be disabled if required.

Change-Id: I2904ba005e3fa18faf8ccf04661e206501fa4aa3
2023-03-21 19:00:45 +00:00
Jonathan Rosser b6550a4c3f Enable raid interface implementations for ironic hardware drivers
This patch enables the native raid driver implementation for each
of the hardware types defined in `ironic_driver_types`. If necessary
this can be overridden in ironic.conf using config overrides.

Change-Id: I28b39b391d307e0a4aa71e13337f646d872925ec
2023-03-21 19:00:41 +00:00
Jonathan Rosser 5e420cca3c Rename idrac interfaces to idrac-wsman
idrac is the legacy name of the WSMAN interface. It has
been deprecated in favor of idrac-wsman and may be removed
in a future release of the idrac hardware type driver.

Change-Id: I2bf70374ac761c6ddeb8fc0b838470c036b70541
2023-03-21 19:00:36 +00:00
Jonathan Rosser 11b162cfa3 Install socat and configure ipmtool-socat console interface
This patch adds the `console` field to the ironic_driver_types
variable and then enables a set of console drivers in the ironic
config through the `enabled_console_interfaces` option.

If `ipmitool-socat` is one of the enabled drivers, then the socat
distro package is installed to support that.

Defaults are added for socat bind address and port range to
use.

[1] https://opendev.org/openstack/ironic/src/branch/master/doc/source/admin/upgrade-to-hardware-types.rst

Change-Id: I36dd1a0ec69e5702143a1a26bd5901fc88706e84
2023-03-21 19:00:31 +00:00
Jonathan Rosser 50bb9dc8da Remove deprecated support for cisco ucs and cims ironic drivers.
These were deprecated some time ago [1] and so are removed from the
os_ironic role.

[1] https://lists.openstack.org/pipermail/openstack-discuss/2019-February/002460.html

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_swift/+/877534
Change-Id: Ie857528cad187f6c65c84fef40565d7f81c130df
2023-03-21 19:00:26 +00:00
Jonathan Rosser 71d201fcba Allow extra plugin installation ironic/inspector venvs
Ironic and inspector are extensible via the stevedore framework.
In order to add extra plugins to the ironic and inspector venvs
extra variables are needed to supply user defined lists of python
packages to install.

Change-Id: I656abb90827486bbb69bf0ccd7e990fd680f2c51
2022-12-08 18:00:08 +00:00
Dmitriy Rabotyagov b09526d494 Pass CA pass to Swift CLI
Swift requires CA path to be set either with OS_CACERT env var or with
simmilar flag passed to command.

Change-Id: I40e4a0ae0e702fdc9bfbb18dcc6ef1ea3f84926f
2022-11-25 10:56:59 +01:00
Dmitriy Rabotyagov f1f3efb974 Replace git-core with git for debian
With ansible-core 2.13 it tries to substitude package resolution in apt
module.
However git-core is used in Debian as transitional name, but ansible
tries to select it and provide version, which is not correct behaviour.
But since git-core is not really valid anyway, we just replace it
to workaround ansible's imperfectness.

Change-Id: I37db2654b6bb5339373befc708b4318a8edb1db5
2022-10-05 10:53:29 +02:00
Dmitriy Rabotyagov 20a533dd53 Support service tokens
Implement support for service_tokens. For that we convert
role_name to be a list along with renaming corresponding variable.

Additionally service_type is defined now for keystone_authtoken which
enables to validate tokens with restricted access rules

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/845690
Change-Id: I1d70c2c46fef6ffc0fcebe4b56a0ecdedc1d3298
2022-06-17 06:26:07 +00:00
Jonathan Rosser d88b2f50c0 Allow redhat vars file to cover different RHEL derivatives
Some paths are hardcoded to 'centos', when these are actually 'rocky'
on Rocky Linux installations. Use an ansible fact to obtain the correct
path.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/846224
Change-Id: Id6694d61d874a8542971075cb2377fb7f38bca96
2022-06-16 20:44:51 +00:00
James Denton 2a24dd59ba Add Support for Deploying UEFI Baremetal Nodes
This patchset adds support for deploying instances using UEFI baremetal
nodes. UEFI may replace Legacy BIOS mode in future Ironic releases. Tested
with Ubuntu Focal 20.04 LTS.

Change-Id: I0fa6234ec7321e1d69901175baeab4ddb08afc50
2021-12-12 14:24:30 +00:00
Dmitriy Rabotyagov 302acd77a0 Remove iscsi deploy
Since iSCSI deploy has been removed [1] we should also replace iscsi deploy with direct
since it's suggested deploy option.

[1] https://review.opendev.org/c/openstack/ironic/+/789382

Change-Id: I72f166b2fdd808b623e698f44c4d77747cc987bb
2021-10-06 11:56:57 +03:00
Jonathan Rosser a0a07a43ac Remove references to unsupported operating systems
All references to Gentoo, SUSE, Debian stretch and Centos-7  are removed.
Conditional tasks, ternary operators and variables are simplified where possible
OS specific variables files are generalised where possible

Change-Id: Ia73e88947f52a74d9c03a17a7b1201a6346b5ac3
2021-03-10 12:16:38 +00:00
Dmitriy Rabotyagov 67733c8f0c Define condition for the first play host one time
We use the same condition, which defines against what host some "service"
tasks should run against, several times. It's hard to keep it the same
across the role and ansible spending additional resources to evaluate
it each time, so it's simpler and better for the maintenance to set
a boolean variable which will say for all tasks, that we want to run
only against signle host, if they should run or not now.

Depends-On: https://review.opendev.org/758953
Change-Id: Iab3194322e133282fcb71830f2b94e1279106ebd
2020-12-02 08:41:27 +00:00
James Denton 8f3a9e207c Add iPXE support to Ironic Conductor
This patchset adds support for iPXE, which can speed up baremetal
provisioning considerably due to the use of HTTP versus TFTP.

Change-Id: I8b49ae37a0380cd7a2191f050a52c85cc373026b
2020-10-22 15:24:19 +00:00
Dmitriy Rabotyagov 39b938c099 Add Ubuntu focal and CentOS 8 support
Depends-On: https://review.opendev.org/736507
Depends-On: https://review.opendev.org/745676
Change-Id: I8333d707026056903b973f38908eea6b419e7b44
2020-08-11 21:22:48 +03:00
Zuul a8dac8d1ed Merge "inspector: fix service catalog creation" 2020-06-18 00:38:06 +00:00
Mohammed Naser eeffeeef04 inspector: fix service catalog creation
The service catalog is not properly created at the moment, this patch
fixes it.

Change-Id: I7439b21247302f2cf1dbe6732c124c3b1d25bb70
2020-06-11 11:18:53 -04:00
Bjoern Teipel 774ed47856 Adding missing sgdisk utility
Certain deployment interfaces, like iscsi, in Ironic need the sgdisk
utility installed onto the conductor to manipulate partition
information. The responsible package is now installed

Change-Id: Iabbcb65b3253813ba3d01cd9a38d5984e867c4ae
Closes-Bug: #1871927
2020-04-13 15:12:49 -05:00
Cameron Loader 1f434661b1 Ironic fixes from inspector addition
1. There was an issue with pip packages not being installed when
inspector_hosts is not defined.

2. The db_setup task failed when inspector_hosts not defined because of
the condition.

Change-Id: I0ccd782ffd54322896559e5a6218ff532f3cae03
2020-02-19 11:31:55 -06:00
Zuul 840f268bcc Merge "Adds configuration for the Ironic Inspector" 2019-12-06 19:24:02 +00:00
Cam Loader 7da7127071 Adds configuration for the Ironic Inspector
This commit enables and configures the Ironic Inspector. This feature
allows for baremetal nodes to be introspected. This provides useful
information about an Ironic host. Such information includes harware
and mac addresses.

Depends-On: https://review.opendev.org/680553
Change-Id: I2ee09d9cc20f9b8e4430c55129cd8bac9435299d
2019-12-06 06:21:05 +00:00
ShangXiao 18e1b6c651 Fix typos in yml files
Change-Id: I9e0c48a6d6a6e6b128add994e4df075b334b8984
2019-11-07 11:13:38 +08:00
Bjoern Teipel ee783e4bd5 Adding missing gdisk dependency
The iscsi deployment interface requires the sgdisk binary to
zero/partition the shared block device.
This commits adds the package as dependency.

Change-Id: I948b9712bbc6921d0c43d54e23c30735905a0dc3
2019-10-03 15:48:03 -05:00
Dmitriy Rabotyagov 39dcdeedc8 Start using uWSGI role
Move service to use uWSGI role instead of iternal task for uwsgi
deployment. This aims to ease the maintenance of uWSGI and speedup
metal deployments as the same uwsgi environment will be used
across all services.

Change-Id: Ie79a7ba7d62504e9e81edbb386f8e52ce0a03074
2019-09-04 20:13:20 +03:00
Mohammed Naser 0a2092a087 tftp: start on boot & fix tftp paths
This fixes the tftp service name on CentOS and makes sure that
the service is running on boot.  It also makes sure that the
tftp_root is setup correctly for the default configuration
on CentOS.

Change-Id: I56944ea905b5ea908cf1e93d5ae1325e68788562
2019-08-16 11:11:04 +00:00
Mohammed Naser 5d74ab936a redhat: add qemu-img-ev to dependencies
Ironic needs qemu-img in order to be able to convert images so this
commit adds it to the list of dependencies.

Change-Id: I429cffc8782c19fb2522520238ac356ab3c0a038
2019-07-31 16:06:04 -04:00
Zuul ff9b4ecc39 Merge "Use systemd-journald instead of log files" 2019-07-17 11:01:24 +00:00
Dmitriy Rabotyagov 64fdc9d685 Use systemd-journald instead of log files
This patch aims to migrate service from usage of regular syslog files
to journald. We also disable uwsgi logging, since it dublicates
requests that are logged by service itself.

Change-Id: Iaddb2c158a52d90025899d9bfa5576358bef92dd
2019-07-17 00:57:58 +03:00
Dmitriy Rabotyagov 2f73f21e65 Convert systemd services to common role(s)
This removes the systemd service templates and tasks from this role and
leverages a common systemd service role instead. This change removes a
lot of code duplication across all roles all without sacrificing
features or functionality. The intention of this change is to ensure
uniformity and reduce the maintenance burden on the community when
sweeping changes are needed. The exterior role is built to be OSA
compatible and may be pulled into tree should we deem it necessary.

Change-Id: I404639ae7ebd349d4a11fc5ce1ef3d2805833217
2019-07-16 18:14:38 +03:00
Jean-Philippe Evrard 15cfbaeebf Fix CentOS installtion
The patch fixing packages names missed the syslinux-common
package, which also doesn't exist [1]. This should fix it.

Next to that, the location of files to copy are incorrect.
This should fix it.

[1]: https://review.opendev.org/#/c/670040/

Change-Id: I812436bb156eeee15b5e494e86b23069be82f814
2019-07-11 15:37:42 +00:00
Jean-Philippe Evrard c9b91a2585 Fix ironic package list
Without this patch, ironic would fail to install on CentOS, as
libffi-dev doesn't exist (and other packages have the same problem).

This should fix it.

Change-Id: I2a10ce390815962b55897ddc45da995e4e45f9c0
2019-07-10 13:35:17 +02:00
Nicolas Bock d7377d877e Add missing variable file for Redhat
Change-Id: I89be92c55be9d892afc133d3a95a8227174d0b80
Signed-off-by: Nicolas Bock <nicolas.bock@suse.com>
2019-06-18 11:57:34 +02:00
Nicolas Bock ee59b1b35d
Add variables for openSUSE
Change-Id: I926586acdbc03816dccd6bfdd318aea95ffb881b
Signed-off-by: Nicolas Bock <nicolas.bock@suse.com>
2019-06-14 17:48:15 +02:00
Guilherme Steinmüller da2dc1abd5 debian: add support
This patch adds the Debian jobs for this role to make sure
it's always passing as well as updates the meta to reflect
it's support of Debian accordingly.

Depends-On: I9a92b73c419a0dc1cca40dacfef75de61a61db94
Change-Id: Ie9e9857ce1bd8fe93e63f3be3a02793c648f688b
2019-04-09 17:05:08 +00:00
Mohammed Naser fe8e6c052a Update role for new source build process
The variables ironic_developer_mode and ironic_venv_download
no longer carry any meaning. This review changes ironic to
do the equivalent of what developer_mode was all the time,
meaning that it always builds the venv and never requires
the repo server, but it will use a repo server when available.

As part of this, we move the source build out of its own file
because it's now a single task to include the venv build role.
This is just to make it easier to follow the code.

Change-Id: Id58a2bcc215abe4595b594c08be60ca2a1490205
2019-03-29 15:07:15 +00:00
Matthew Thode 8f32b24cdd
remove oneview support from ironic
Oneview support was dropped in stein.

Change-Id: Ic3c55673bab5ca8ec43583e84bf82a6bf45618d3
2018-09-27 13:24:31 -05:00
Jesse Pretorius 7266fe2197 Use a common python build/install role
In order to radically simplify how we prepare the service
venvs, we use a common role to do the wheel builds and the
venv preparation. This makes the process far simpler to
understand, because the role does its own building and
installing. It also reduces the code maintenance burden,
because instead of duplicating the build processes in the
repo_build role and the service role - we only have it all
done in a single place.

We also change the role venv tag var to use the integrated
build's common venv tag so that we can remove the role's
venv tag in group_vars in the integrated build. This reduces
memory consumption and also reduces the duplication.

This is by no means the final stop in the simplification
process, but it is a step forward. The will be work to follow
which:

1. Replaces 'developer mode' with an equivalent mechanism
   that uses the common role and is simpler to understand.
   We will also simplify the provisioning of pip install
   arguments when doing this.
2. Simplifies the installation of optional pip packages.
   Right now it's more complicated than it needs to be due
   to us needing to keep the py_pkgs plugin working in the
   integrated build.
3. Deduplicates the distro package installs. Right now the
   role installs the distro packages twice - just before
   building the venv, and during the python_venv_build role
   execution.

Depends-On: https://review.openstack.org/598957
Change-Id: I9c25b430bd7590131b50f36c697fcc24e1abaf64
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-09-03 12:01:56 +00:00
Matthew Thode 0f362e5e7b
fix ironic driver data structure usage
The template would previously split strings so you'd get things like

enabled_hardware_types = p,x,e

Now we use jmespath to do the search of the lists/dicts for us.

Change-Id: I3f2f4550ed47b78c20d603d77124609c1ec2a63d
2018-08-07 15:26:16 -05:00
Jonathan Rosser da9de911ec Use generic vars file for ubuntu
These vars work for both Xenial and Bionic

Change-Id: Ic1dfcd5413c3baafea82903122a7fa5a4b63d1c4
2018-07-31 09:51:33 +01:00
Matthew Thode fc1e4f78dc
Overhaul ironic role
Removed unused variables when able and updated to the new ironic driver
definitions found here.

https://docs.openstack.org/ironic/latest/admin/upgrade-to-hardware-types.html

The intention is to support the drivers via profiles, so the table from
the above link was converted to a dictionary.  This dictionary was used
as a source when combining / concatenating the various drivers for each
profile into a usable list.  The standalone logic was simplified.

Change-Id: I19553af41b5e669386b855209c61235bf37371f2
Closes-Bug: 1758351
2018-07-01 19:36:18 -05:00