Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated support for rhsm builds of rhosp17 on rhel9 #209

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions example-overrides/local-overrides-osp17-0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Override default variables by putting them in this file
standalone_host: 192.168.124.131
public_api: 192.168.124.131
rhos_release: 17.0
hostname: rhos-17
clouddomain: home.lan
local_cloudname: rhos-17
openshift_password: openshift
ceph_devices:
- /dev/sda
rhsm_release: 9.0
rhsm_repos:
- rhel-9-for-x86_64-baseos-eus-rpms
- rhel-9-for-x86_64-appstream-eus-rpms
- rhel-9-for-x86_64-highavailability-eus-rpms
- openstack-17-for-rhel-9-x86_64-rpms
- fast-datapath-for-rhel-9-x86_64-rpms
- rhceph-5-tools-for-rhel-9-x86_64-rpms
rhsm_enabled: true
# Get your organization ID and create your activation key at:
# https://console.redhat.com/settings/connector/activation-keys
rhsm_org_id: replace-with-numeric-org-id
rhsm_activation_key: replace-with-org-activation-key

# rhcs5 installation doesnt seem to play well with redhat registry service accounts
# due to the mandatory pipe character in the username it issues.
#
# the workaround is to configure root podman directly at the url below
#
# https://access.redhat.com/terms-based-registry/#/accounts
#
# You can also create service accounts for redhat_registry_credentials here as well
registry_auth_file: "/home/greg/dev-install/config.json"

redhat_registry_credentials:
'numeric-org-id|service-account-name': 'long-password-data-string'

cip_config:
- set:
ceph_alertmanager_image: ose-prometheus-alertmanager
ceph_alertmanager_namespace: registry.redhat.io/openshift4
ceph_alertmanager_tag: 4.6
ceph_grafana_image: rhceph-5-dashboard-rhel8
ceph_grafana_namespace: registry.redhat.io/rhceph
ceph_grafana_tag: latest
ceph_image: rhceph-5-rhel8
ceph_namespace: registry.redhat.io/rhceph
ceph_node_exporter_image: ose-prometheus-node-exporter
ceph_node_exporter_namespace: registry.redhat.io/openshift4
ceph_node_exporter_tag: v4.6
ceph_prometheus_image: ose-prometheus
ceph_prometheus_namespace: registry.redhat.io/openshift4
ceph_prometheus_tag: 4.6
ceph_tag: latest
name_prefix: openstack-
name_suffix: ''
namespace: registry.redhat.io/rhosp-rhel9
neutron_driver: ovn
rhel_containers: false
tag: '17.0'
tag_from_label: '{version}-{release}'


# fix for the following bug:
# https://bugzilla.redhat.com/show_bug.cgi?id=1498621
extra_heat_params:
NovaComputeStartupDelay: 0
27 changes: 27 additions & 0 deletions playbooks/install_stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,33 @@
cip_content:
parameter_defaults:
ContainerImagePrepare: "{{ cip_config }}"
ContainerImageRegistryLogin: true

# Red Hat Service Accounts have fixed usernames that incorporate a pipe character
gprocunier marked this conversation as resolved.
Show resolved Hide resolved
# there is a lot of work required to handle this vs. a straight username because of to_nice_yaml
# when the rhcs5 portion of the build is started.
#
# Therefore it is easier to use the config.json method for podman.
- name: Setup Docker registry authentication
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm currently investigating this too. Not saying I reject your solution here but I'm looking if we can do easier.

when: cip_config is defined
block:
- name: Ensure the .docker directory exists
file:
path: "/root/.docker"
state: directory
mode: '0755'
owner: "root"
group: "root"

- name: Copy config.json to remote host
copy:
src: "{{ registry_auth_file }}"
gprocunier marked this conversation as resolved.
Show resolved Hide resolved
dest: "/root/.docker/config.json"
owner: "root"
group: "root"
mode: '0644'
become: true
become_user: root

- name: Download containers-prepare-parameters.yaml from upstream master if cip_config is not defined on CentOS
when:
Expand Down
6 changes: 3 additions & 3 deletions playbooks/network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
stdin: "{{ network_state | to_nice_json }}"
vars:
network_state:
interfaces: "{{ nmstate_ifs }}"
interfaces: "{{ nmstate_ifs | from_yaml }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested RHEL 9.2 and OSP 17.1 and this wasn't needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without that, this fails when deploying on kvm/libvirt.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rhel 9.0 on OSP17.0

# add saved static routes
routes:
config: "{{ nmstate_routes }}"
Expand All @@ -125,11 +125,11 @@
ansible.builtin.set_fact:
checkpoint: "{{ (nmstateset.stdout_lines | last).split()[1] }}"

- name: Set fact for nmstate checkpoing on RHEL9
- name: Set fact for nmstate checkpoint on RHEL9
when:
- ansible_facts.distribution_major_version == "9"
ansible.builtin.set_fact:
checkpoint: "{{ (nmstateset.stderr_lines | last).split()[-1] }}"
checkpoint: "{{ (nmstateset.stdout_lines | select('search', 'Checkpoint: NetworkManager\\|') | last).split()[1] }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested RHEL 9.2 and OSP 17.1 and this wasn't needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regarding the change to Set fact for nmstate checkpoint on RHEL9, this was required when i did a clean install of OSP 17.0 on RHEL9.0

it was not required on centos stream

it seems particular to 17.0 on RHEL9

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack, will have to test it on RHEL 8.4 and RHEL 9.2 too to make sure it's compatible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added handlers for rhel 9.0 + osp 17.0 and rhel 9.2 (and onwards) and osp 17.1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's only a RHEL 9.0 issue, I suggest that we don't add this code, to reduce complexity.

I think dev-install is going to support 16.2 and OSP 17.1 in the longterm, we can't add support for every version of OSP, especially the unsupported ones (17.0).


- name: Fail if the checkpoint has not been found or is incorrect
when:
Expand Down
5 changes: 5 additions & 0 deletions playbooks/prepare_host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,19 @@
- name: Configure Red Hat Subscription Manager
ansible.builtin.import_role:
name: redhat-subscription
# this needs to be done early
- name: set rhsm_release
shell: subscription-manager release --set={{rhsm_release}}
gprocunier marked this conversation as resolved.
Show resolved Hide resolved
- name: Install container-tools module # noqa no-changed-when
ansible.builtin.shell: |
dnf module disable -y container-tools:rhel8
dnf module enable -y container-tools:"{{ rhsm_container_tools_version }}"
when: rhsm_release | float < 9.0
gprocunier marked this conversation as resolved.
Show resolved Hide resolved
- name: Install virt module # noqa no-changed-when
ansible.builtin.shell: |
dnf module disable -y virt:rhel
dnf module enable -y virt:"{{ virt_release }}"
when: rhsm_release | float < 9.0
gprocunier marked this conversation as resolved.
Show resolved Hide resolved

- name: Prepare host on RHEL system with rhos-release
when:
Expand Down