Commit Graph

81 Commits

Author SHA1 Message Date
Sharpz7 4529d48afe [codespell] Fixing Spelling Mistakes
This is the first in a series of commits to add support for codespell. This is continuning the process completed in ironic-python-agent.

Future Commits will add a Tox Target, CI support and potentially a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame.

Change-Id: I41b2db35cdf21917ac20ed0866af3b9c94789f0b
2024-01-25 21:31:33 +00:00
Erik Berg db24a0c721
Fix key-order[task] linter warnings
It looks a little jarring at first so see keys ordered this way,
but once you get used to it, it reads so much better!

Also make indentation consistent, clean up epel install
and remove traces of Suse.

Change-Id: Id6279d681faf0c9a1893c00953b0b59d9319e08b
2023-05-30 20:00:34 +02:00
Erik Berg d65a6fe455
Fix yaml[octal-values] linter warnings
Change-Id: I3b85788cb7603cc921ecfe00864201761e785c95
2023-03-12 23:20:14 +01:00
Erik Berg 6b2fb255a8
Fix no-free-form linter warnings
Change-Id: I8027f9d4e5b47a3c448a87cffe3433c26655fd7f
2023-03-12 21:59:30 +01:00
Riccardo Pittau fb6d6d6fe9 Fix enabling epel repo for rpm distributions
The epel packages are installed but their content is purged in the
centos nodes. Removing and reinstalling them when we run tests in
CI to reenable their content.

Change-Id: Ibf1d810a37811151449f79a24bb837db6663cce5
2023-03-08 16:43:58 +01:00
Zuul d30dfccf04 Merge "Install passlib to venv (htpasswd)" 2022-11-07 13:23:44 +00:00
Erik Berg 10caba874b Install passlib to venv (htpasswd)
The ansible htpasswd module requires [1] passlib, remove unnecessary
system package dependencies.

[1] https://docs.ansible.com/ansible/latest/collections/community/general/htpasswd_module.html#requirements

Change-Id: I23f78e6e70f810ec2d8db5200ba918e3c9dfb224
2022-11-04 09:02:40 +01:00
Erik Berg 62171d00f3 Enable epel repository for more than CentOS
The epel repository contains among other things 'debootstrap',
which is needed by dib_host_required_packages, whenever
dib_os_element contains the word 'debian' (or 'ubuntu'), which
is the default[1] and install_dib is true which it also is by
default[2]

This improves upon I57513883c0fa8d6ffb2c70debb81d5e7e6d8b221
where the documentation[3] and procedure has probably been updated
since it was last followed. We can also remove the conditional
installation of dib_host_required_packages with enablerepo: epel
for centos

[1] bifrost-ironic-install/defaults/main.yml:dib_os_element: "debian"
[2] bifrost-ironic-install/defaults/main.yml:install_dib: "{{ create_image_via_dib | bool or create_ipa_image | bool }}"
    bifrost-ironic-install/defaults/main.yml:create_image_via_dib: "{{ not use_cirros | default(false) | bool }}"
    bifrost-ironic-install/defaults/main.yml:use_cirros: false
[3] https://docs.fedoraproject.org/en-US/epel/#_el9

Change-Id: Ia16b544df261b999b1503ee110ec88f39becd7dd
2022-11-02 23:59:27 +01:00
Zuul 83e9c4b21d Merge "Do not install EPEL from the internet if it's already installed" 2022-09-19 22:19:25 +00:00
Dmitry Tantsur b3818dc77c Do not install grub2 and shim on the host system
At least on the CI nodes it causes issues with grub-pc on Debian since
the CI nodes don't have bootloader configured. Download and extract
packages instead.

To account for Kolla (which has a split between the install and the
bootstrap phases), the downloaded files are cached in /use/lib/ironic.

Change-Id: I9307366db9579b194dcb88818ed0ce2fedb4baaf
2022-09-16 17:58:01 +02:00
Dmitry Tantsur 18ce47b6d2 Do not install EPEL from the internet if it's already installed
Doing so may cause version conflicts.

Change-Id: I9fc5a0ca92ce867099fc81a378a6e94909e0f145
2022-09-16 14:03:18 +02:00
Riccardo Pittau f2825ad1d9 Enable epel repository only when needed
The epel repository is used only when we need to build a debian-based
IPA image, so we enable it only in that case for CentOS Stream 8/9.

The configuration procedure is explained in the official guide [1].

[1] https://docs.fedoraproject.org/en-US/epel/#_el9

Change-Id: I57513883c0fa8d6ffb2c70debb81d5e7e6d8b221
2022-02-01 11:04:15 +01:00
Dmitry Tantsur a28b13eb7c Move Nginx code to a new role bifrost-nginx-install
There is currently a lot of duplication between nginx setup for keystone
(identity API) and ironic (httpboot directory). This change moves the
common code to a new role and makes the httpboot configuration a
separate nginx configuration file.

Change-Id: Ic5239aba764f632c48a422812fde7010ffb1a339
2021-08-02 13:37:37 +02:00
Dmitry Tantsur 1ac7dfe9e7 Install sushy-oem-idrac for idrac-redfish-virtual-media
Change-Id: I69d073e4fdcd52dbf9e6c8da6cd4626aaa98c16f
2021-07-20 14:37:39 +02:00
Dmitry Tantsur 3176c93932 Move the network-interface checks to bootstrap
They should not happen during installations, it breaks kolla.

Change-Id: I0f4c306c96a5aa3ecfbbd8d9eb4b17db303abda9
2021-06-09 11:45:01 +02:00
Dmitry Tantsur 7f2d0eb91d Reasonable error message if network_interface is not found
Change-Id: I96b7af2472addb879df545818a67f58ace8b2572
2021-06-07 15:20:41 +02:00
Mark Goddard c72dd2fd7b Install DIB dependencies in bifrost-ironic-install role
This provides a cleaner separation between installation and image
creation.

This allows Kolla to install all package dependencies at container image
build time rather than when using the container image to build disk
images.

Story: 2008839
Task: 42346

Change-Id: I5be8b355b92f0d9d907c743b522982f6de0398c1
2021-05-27 13:40:12 +00:00
Dmitry Tantsur 9ee635193e Remove support for the iscsi deploy
Change-Id: I0834babfc2cb80f354da0de88f33831116b50e34
2021-04-30 17:25:21 +02:00
Dmitry Tantsur d842e9fe83 Consistent pip_opts handling + drop --no-cache-dir
Change-Id: I0727cd273447a3ef19a8c1cd9d3e9a68116974bb
2021-02-03 15:35:02 +01:00
Iury Gregory Melo Ferreira 4f175fd5be Add ipe installation to bifrost
This commit adds support to install the Ironic Prometheus Exporter,
it's necessary to set `enable_prometheus_exporter=True` or pass
`--enable-prometheus-exporter` when using the `bifrost-cli`

Also the ipe is now enabled in the
bifrost-integration-tinyipa-keystone-ubuntu-bionic/centos8

Change-Id: I3972e88162fba31ad6e262f47b67a37cd37a2076
2020-10-01 16:50:35 +02:00
Radosław Piliszek 5e7f72a49a Fix install on systems without systemd
This broke Kolla already.
One cannot assume systemd is being used during installation.

Package installations normally reload systemd themselves
if they need to.

Backport to Ussuri.

Change-Id: Iafc3e14eaf3e8341eb7d2af30c460bbee1c9c104
Story: 2008112
Task: 40828
2020-09-07 13:01:31 +02:00
Zuul 079dbd8994 Merge "Create our own firewalld zone and use it on real bare metal" 2020-09-03 14:50:54 +00:00
Riccardo Pittau e4d0325b2f Fix error 601
Don't compare to literal True/False

Change-Id: I671978ac95de03d80b059d42f188e9fc9aecb4b4
2020-09-02 11:41:11 +02:00
Dmitry Tantsur 710e0db068 Create our own firewalld zone and use it on real bare metal
Modifying the public zone is questionable, let's use our own zone.
Also let's make sure network_interface actually belongs to it.

Change-Id: I63f5fa4845aa8f1c90a0c73dd78deb45aaaa4fd1
2020-09-02 10:38:33 +02:00
Dmitry Tantsur fc2b247f64 Make skip_install a normal boolean variable
Currently we skip installation if it's set to any value, even false.

Change-Id: I980d91302e58c086210cbcdb1e51dfcd05ec1722
2020-07-17 14:26:27 +02:00
Dmitry Tantsur 9b1d1d591e Do not clone repos with source_install==false
Switch ironic-staging-drivers to source installation since
it's released very infrequently.

Do not clone keystone if it's not enabled

Change-Id: If01ae7c54d5d421a5c6b97a4d8b29bdaa722ddd9
2020-07-09 12:06:37 +02:00
Dmitry Tantsur dbb3f244df Get rid of venv_python_path
Hopefully, this is just an old artefact that can be replaced with
using bifrost_venv_env.

Change-Id: I43d98f44a16b3c03d8bfea04bc91b6aec352fdfb
2020-06-22 15:41:22 +02:00
Dmitry Tantsur ed26a1963b Only install proliantutils if ilo is enabled; support idrac
Change-Id: Idd850a58349bb7677d1fa2c72afed1578b26e938
2020-06-15 13:40:08 +02:00
Dmitry Tantsur 2c9ede32c9 Migrate pip_install.yml to a new role bifrost-pip-install
Allows de-duplicating pip_install.yml between ironic and keystone,
fixes numerous inconsistencies and centralizes venv and skip_install
handling.

Change-Id: Id6a1a4f3ebe2010ab14f43a306b084f4525d5862
2020-06-15 12:34:21 +02:00
Zuul 2dab2f5ad9 Merge "Convert with_items to loop" 2020-06-15 09:40:18 +00:00
Zuul aad77f701e Merge "Get rid of the shade dependency" 2020-06-15 09:25:55 +00:00
Dmitry Tantsur 99b93f4c49 Remove the ansible_pkg_mgr hack
Apparently, it was needed for yum->dnf transition, which has happened
for all supported distributions already.

Change-Id: I603ae0b274d8a24b08af634012104f00e59e75f9
2020-06-14 22:41:20 +02:00
Riccardo Pittau 7283e3dc54 Convert with_items to loop
Recommended way to work with loops is now using loop.

Change-Id: I4ce186e16e6ae5b3a6f29542887431f5499286b0
2020-06-11 17:31:28 +02:00
Dmitry Tantsur 59a0185133 Install packages all at once instead of looping over them
Change-Id: I6f8507473abbfc601bf5d3655c2fb9b460a37af4
2020-06-10 14:52:49 +02:00
Dmitry Tantsur 8b43bf00f3 Get rid of the shade dependency
Shade is being phased out in favour of openstacksdk, which also allows
to simplify the authentication code.

Change-Id: I14210a720792c3f7f0669330ccb6d2f67d624246
2020-06-03 15:57:15 +02:00
Dmitry Tantsur 95e78f1e6a Install metalsmith by default
It's a tiny library that provides convenient CLI for ironic.

Change-Id: I806d7fd181db8cd4be206796c8930466c6732d44
2020-06-03 12:58:52 +02:00
Dmitry Tantsur 0b7fd20e9e Stop installing openstackclient if keystone is not enabled
We have a standalone command now, let's use it.

Change-Id: I446d7b490d4a14ede01384fd72926f85660ea6e7
2020-05-25 12:38:33 +02:00
Mark Goddard d878f65eea Ensure DIB is installed from source
Bifrost clones the DIB repo and installs it. However, after running
install.yaml pip freeze shows diskimage-builder 2.33 is installed.

This is caused by the recent addition of IPA builder, which has its own
dependency on diskimage-builder.

This change fixes the issue by swapping the order of installation of IPA
builder and DIB, to ensure DIB is installed last.

Change-Id: Ifd67adaa98e920f42c80d239349ae61d7d610f66
Story: 2007401
Task: 38999
2020-03-10 16:19:35 +00:00
Dmitry Tantsur 70786915db Use upper-constraints everywhere in ironic installation
Currently a few packages are installed without it, pulling in undesired
updates (e.g. cryptography 2.8 on stable/steain). This change fixes it.

The --upgrade and --force-reinstall flags are removed from all pip calls
since they're not compatible with using upper-constraints.

The explicit installation of pyOpenSSL is removed, >= 18.0 is anyway
used by Rocky and newer. A few explicit usages of -c argument are
also removed in favour of the implicit handling in pip_install.yml.

Change-Id: Ic776cb2ec0779c9b324e94bf387ee4f3f857cd72
2020-01-23 18:15:26 +01:00
Riccardo Pittau ef9cf1abb9 Fix changes leftovers
CI is looking good so we can now fix some errors that were left
for better times.

Change-Id: Icad8d64c09b3ceccb8ca140c1cfbceef3b528f32
2020-01-23 09:52:50 +01:00
Julia Kreger 6677bb39f6 Hopefully final venv fixes
Also uncapped the proliantutils maximum as upper
constraints is in place.

Set the ansible python interpreter as well for the
main process launch, which magically resolved
venv dependency issues.

Change-Id: Iae06a87e7dbcf76e4be7453e57ec5fd75389caa7
2020-01-20 13:16:53 -08:00
Julia Kreger 355e998f1f Python3/Ansible conditional quarks
Attempts to clean up conditionals such that they are properly interpreted
and executed as intended.

Change-Id: I213f0db2e8d56590ba4b58908e538156edee0b1f
2020-01-20 13:16:13 -08:00
Dmitry Tantsur 564de9d264 Use upper-constraints for ironicclient, sushy and DIB
The goal of upper-constraints is to avoid breakages with versions
known not to work. Lack of upper-constraints for ironicclient is
currently breaking stable branches by pulling packages that are
not Python 2 compatible.

If we need recent versions of ironicclient, we should use source
installation instead.

To make it work with packages that are constrained themselves,
this patch splits the source-based installation into two steps:
installing requirements (constrained) and installing the project
itself (unconstrained).

Change-Id: Ie5f62655248c40885fdcd6fa87180a6952f145fc
2020-01-17 17:25:13 +01:00
Julia Kreger 31b552c511 Python3 changes for Ubuntu
* Remove definitions for ubuntu 15.04 and 15.10
* Changed binary packages to the python3 package names.
* Removed python-configparser as it is no longer required

Change-Id: I8f102bb6ea6238a7f5a638b89f01dc16852fc741
2020-01-08 19:30:45 +00:00
Dmitry Tantsur dc3f7c3f39 Switch to IPA-builder for building ironic-python-agent
Also update the documentation to purge any mentions of CoreOS images
and the deprecated ironic-agent element.

Change-Id: I09018e451e698a7c6b99106b64c87a526cc959d5
2019-10-30 15:04:11 +01:00
Jan Horstmann b33bbd3853 Install dependencies for iscsi deploy interface
The iscsi deploy interface depends on sgdisk for partioning.
Additionally mkfs.fat is needed for uefi partitions.

This commit installs said dependencies if the iscsi interface
is enabled.

Change-Id: Id400e5c7364eb8825234c49034d084c835c29776
2019-10-01 14:48:20 +00:00
Dmitry Tantsur d8751563e7 Enable redfish by default
Change-Id: Idee73d80437d02894b3273e06ee3ad02827cdc03
2019-06-07 09:29:03 +02:00
Mark Goddard 348b45aca8 Pin proliantutils version
This avoids an issue where the version installed could be incompatible
with ironic, or other installed libraries.

In particular, this was seen with proliantutils 2.8.2, which is
incompatible with the version of sushy-lib on the stable/rocky branch.

Change-Id: I02f1e247ca2333b2e90586e7311395e7bd94938c
Story: 2005310
Task: 30214
2019-04-08 15:14:08 +00:00
Zuul 2969aba192 Merge "Do not install distro packages with a VENV activated" 2019-03-19 14:13:25 +00:00
Marcin Juszkiewicz 8c7faf8922 bifrost-ironic-install: drop UcsSdk as it is Python 2 only
Change-Id: I4e1205b66d1f51afb8ba63ff6163f497dbae3c4a
2019-03-19 13:55:17 +01:00