Bug 1430545
Summary: | [RFE] Define how to use advanced subscription/pool assignments per role (pre-/post-deployment hooks) | ||
---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Jaromir Coufal <jcoufal> |
Component: | openstack-tripleo-heat-templates | Assignee: | Emilien Macchi <emacchi> |
Status: | CLOSED ERRATA | QA Contact: | Gurenko Alex <agurenko> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 12.0 (Pike) | CC: | achernet, adhingra, agurenko, aschultz, asimonel, cylopez, dbecker, emacchi, jcoufal, jelle.hoylaerts, jliberma, jmelvin, kamil.rogon, mburns, mfuruta, morazi, ohochman, rhel-osp-director-maint, sclewis, srevivo, vcojot, ykawada |
Target Milestone: | Upstream M2 | Keywords: | FutureFeature, Triaged |
Target Release: | 14.0 (Rocky) | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Fixed In Version: | openstack-tripleo-heat-templates-9.0.0-0.20180710202746.d2994ca.el7ost | Doc Type: | Enhancement |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-01-11 11:47:00 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1373538, 1400606, 1435500, 1442136, 1462958, 1469582, 1615694 |
Description
Jaromir Coufal
2017-03-08 21:58:57 UTC
*** Bug 1396351 has been marked as a duplicate of this bug. *** *** Bug 1368037 has been marked as a duplicate of this bug. *** *** Bug 1408571 has been marked as a duplicate of this bug. *** Keeping in OSP12 since this is best practices / documentation only (of course supported by QE) but no code is involved - no risk on disrupting product delivery. *** Bug 1462084 has been marked as a duplicate of this bug. *** See https://blueprints.launchpad.net/tripleo/+spec/rhsm-integ-ansible where I think this blueprint would help to achieve this RFE. There is an ansible module already existing for these needs: http://docs.ansible.com/ansible/latest/redhat_subscription_module.html we can just document the proceedure and publish some examples for now and build something around it in future releases I think I just got this working on OSP10 and without needing to hack into rhel-registration. rhel-registration is just a pre-config hook. It means it is usually called from your env file in this manner: resource_registry: [...] OS::TripleO::NodeExtraConfig: all-pre-config.yaml ..which, in turn, points to something like this: resources: RhelRegistrationPreConfig: type: all-pre-config/rhel-registration.yaml properties: server: {get_param: server} So, in order to override -some- parameters for some node Roles, I split the pre-config hooks this way: resource_registry: [...] OS::TripleO::ControllerExtraConfigPre: controller-pre-config.yaml OS::TripleO::ComputeExtraConfigPre: compute-pre-config.yaml OS::TripleO::CephStorageExtraConfigPre: ceph-pre-config.yaml OS::TripleO::NodeExtraConfig: all-pre-config.yaml Each of these sub-files looks like this (here, the ceph pre-config file, ceph-pre-config.yaml ): $ cat ceph-pre-config.yaml heat_template_version: 2014-10-16 description: 'Extra Pre-Deployment Config, Ceph' parameters: server: type: string rhel_reg_repos: type: string resources: RhelRegistrationPreConfig: type: all-pre-config/rhel-registration.yaml properties: server: {get_param: server} rhel_reg_repos: "rhel-7-server-rpms,rhel-7-server-supplementary-rpms,rhel-7-server-optional-rpms,rhel-7-server-extras-rpms,rhel-7-server-openstack-10-rpms,rhel-7-server-openstack-10-tools-rpms,rhel-7-server-openstack-10-optools-rpms,rhel-7-server-openstack-10-devtools-rpms,rhel-7-server-rhceph-2-osd-rpms,rhel-7-server-rhceph-2-mon-rpms,rhel-7-server-rhceph-2-tools-rpms,rhel-7-server-satellite-tools-6.2-rpms" outputs: deploy_stdout: value: list_join: - '' - - {get_attr: [RhelRegistrationPreConfig, deploy_stdout]} Here, the 'rhel_reg_repos' parameter is role-dependent and the deployment will re-use the rest of the global parameters found in all-pre-config/rhel-registration.yaml before calling the actual script (rhel-registration). Note, that I used 'rhel_reg_repos' in this example but really any parameter found in rhel-registration.yaml [1] can be overridden in this fashion. Works for me (tm), tested on OSP10z6: *** Bug 1456957 has been marked as a duplicate of this bug. *** Feature test consistently passing downstream CI since puddle 2018-10-17.2 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2019:0045 |