Skip to content

Commit

Permalink
Adding the redhat service
Browse files Browse the repository at this point in the history
It manages RH subscription and Insights
https://linux-system-roles.github.io/rhc/

Depends-On: openstack-k8s-operators/edpm-ansible#837
Depends-On: openstack-k8s-operators/openstack-operator#1221

closes OSPRH-11938

Signed-off-by: Fabricio Aguiar <[email protected]>
  • Loading branch information
fao89 committed Dec 6, 2024
1 parent be47939 commit 4095fbd
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,17 +218,9 @@ The resources in the `ConfigMap` contain cell-specific configurations.
ifeval::["{build}" == "downstream"]
. Create a secret for the subscription manager:
+
[source,yaml]
----
$ oc apply -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
name: subscription-manager
data:
username: <base64_encoded_username>
password: <base64_encoded_password>
EOF
$ oc create secret generic subscription-manager \
--from-literal rhc_auth='{"login": {"username": "<subscription_manager_username>", "password": "<subscription_manager_password>"}}'
----
+
* Replace `<base64_encoded_username>` and `<base64_encoded_password>` with strings that are base64-encoded.
Expand Down Expand Up @@ -259,6 +251,9 @@ spec:
- ctlplane
preProvisioned: true
services:
ifeval::["{build}" == "downstream"]
- redhat
endif::[]
- bootstrap
- download-cache
- configure-network
Expand Down Expand Up @@ -301,13 +296,23 @@ spec:
ansibleUser: root
ifeval::["{build}" == "downstream"]
ansibleVarsFrom:
- prefix: subscription_manager_
secretRef:
- secretRef:
name: subscription-manager
- secretRef:
name: redhat-registry
endif::[]
ansibleVars:
ifeval::["{build}" == "downstream"]
rhc_release: 9.2
rhc_repositories:
- {name: "*", state: disabled}
- {name: "rhel-9-for-x86_64-baseos-eus-rpms", state: enabled}
- {name: "rhel-9-for-x86_64-appstream-eus-rpms", state: enabled}
- {name: "rhel-9-for-x86_64-highavailability-eus-rpms", state: enabled}
- {name: "openstack-17.1-for-rhel-9-x86_64-rpms", state: enabled}
- {name: "fast-datapath-for-rhel-9-x86_64-rpms", state: enabled}
- {name: "openstack-dev-preview-for-rhel-9-x86_64-rpms", state: enabled}
endif::[]
edpm_bootstrap_release_version_package: []
# edpm_network_config
# Default nic config template for a EDPM node
Expand Down Expand Up @@ -394,10 +399,6 @@ ifeval::["{build}" != "downstream"]
endif::[]
ifeval::["{build}" == "downstream"]
edpm_bootstrap_command: |
subscription-manager register --username {{ subscription_manager_username }} --password {{ subscription_manager_password }}
subscription-manager release --set=9.2
subscription-manager repos --disable=*
subscription-manager repos --enable=rhel-9-for-x86_64-baseos-eus-rpms --enable=rhel-9-for-x86_64-appstream-eus-rpms --enable=rhel-9-for-x86_64-highavailability-eus-rpms --enable=openstack-17.1-for-rhel-9-x86_64-rpms --enable=fast-datapath-for-rhel-9-x86_64-rpms --enable=openstack-dev-preview-for-rhel-9-x86_64-rpms
# FIXME: perform dnf upgrade for other packages in EDPM ansible
# here we only ensuring that decontainerized libvirt can start
dnf -y upgrade openstack-selinux
Expand Down Expand Up @@ -437,6 +438,9 @@ external_ids : {hostname=standalone.localdomain, ovn-bridge=br-int, ovn-b
$ oc patch osdpns/openstack --type=merge --patch "
spec:
services:
ifeval::["{build}" == "downstream"]
- redhat
endif::[]
- bootstrap
- download-cache
- configure-network
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ spec:
- ctlplane
preProvisioned: true
services:
ifeval::["{build}" == "downstream"]
- redhat
endif::[]
- bootstrap
- download-cache
- configure-network
Expand Down Expand Up @@ -83,13 +86,23 @@ spec:
ansibleUser: root
ifeval::["{build}" == "downstream"]
ansibleVarsFrom:
- prefix: subscription_manager_
secretRef:
- secretRef:
name: subscription-manager
- secretRef:
name: redhat-registry
endif::[]
ansibleVars:
ifeval::["{build}" == "downstream"]
rhc_release: 9.2
rhc_repositories:
- {name: "*", state: disabled}
- {name: "rhel-9-for-x86_64-baseos-eus-rpms", state: enabled}
- {name: "rhel-9-for-x86_64-appstream-eus-rpms", state: enabled}
- {name: "rhel-9-for-x86_64-highavailability-eus-rpms", state: enabled}
- {name: "openstack-17.1-for-rhel-9-x86_64-rpms", state: enabled}
- {name: "fast-datapath-for-rhel-9-x86_64-rpms", state: enabled}
- {name: "openstack-dev-preview-for-rhel-9-x86_64-rpms", state: enabled}
endif::[]
edpm_bootstrap_release_version_package: []
# edpm_network_config
# Default nic config template for a EDPM node
Expand Down Expand Up @@ -173,13 +186,6 @@ ifeval::["{build}" != "downstream"]
./venv/bin/repo-setup current-podified -b antelope -d centos9 --stream
rm -rf repo-setup-main
endif::[]
ifeval::["{build}" == "downstream"]
edpm_bootstrap_command: |
subscription-manager register --username {{ subscription_manager_username }} --password {{ subscription_manager_password }}
subscription-manager release --set=9.2
subscription-manager repos --disable=*
subscription-manager repos --enable=rhel-9-for-x86_64-baseos-eus-rpms --enable=rhel-9-for-x86_64-appstream-eus-rpms --enable=rhel-9-for-x86_64-highavailability-eus-rpms --enable=openstack-17.1-for-rhel-9-x86_64-rpms --enable=fast-datapath-for-rhel-9-x86_64-rpms --enable=openstack-dev-preview-for-rhel-9-x86_64-rpms
endif::[]
gather_facts: false
enable_debug: false
Expand Down

0 comments on commit 4095fbd

Please sign in to comment.