Introduce OS::TripleO::Services::Rhsm
Background: extraconfig/pre_deploy/rhel-registration interface has been maintained for some time now but it's missing some features and the code overlaps with ongoing efforts to convert everything to Ansible. Plan: Consume ansible-role-redhat-subscription from TripleO, so all the logics goes into the Ansible role, and not in TripleO anymore. The single parameter exposed to TripleO is RhsmVars and any Ansible parameter can be given to make the role working. The parameter can be overriden per roles, so we can think at specific cases were some Director roles would have specific RHSM configs. Once we have feature parity between what is done and what was here before, we'll deprecate the old interface. Testing: Because RHSM can't be tested on CentOS, this code was manually tested on RHEL against the public subscription portal. Also, we verified that generated Ansible playbooks were correct and called the role with the right parameters. Documentation: We'll work on documentation during the following weeks and explain how to switch from the previous interface to the new one, and also document new uses requested by our users. Change-Id: I8610e4f1f8478f2dcbe3afc319981df914ce1780
This commit is contained in:
parent
bacacf79e2
commit
6a6872f390
@ -54,4 +54,5 @@ parameter_defaults:
|
||||
- OS::TripleO::Services::OVNController
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::LoginDefs
|
||||
- OS::TripleO::Services::Rhsm
|
||||
|
||||
|
35
environments/rhsm.yaml
Normal file
35
environments/rhsm.yaml
Normal file
@ -0,0 +1,35 @@
|
||||
# A Heat environment file that enables RHSM.
|
||||
|
||||
resource_registry:
|
||||
OS::TripleO::Services::Rhsm: ../extraconfig/services/rhsm.yaml
|
||||
|
||||
parameter_defaults:
|
||||
# RhsmVars:
|
||||
# rhsub_repos:
|
||||
# - rhel-7-server-rpms
|
||||
# - rhel-7-server-extras-rpms
|
||||
# - rhel-7-server-rh-common-rpms
|
||||
# - rhel-ha-for-rhel-7-server-rpms
|
||||
# - rhel-7-server-openstack-13-rpms
|
||||
# rhn_activation_key: 'secrete-key'
|
||||
|
||||
|
||||
# In some cases, you want to configure specific repos on some roles.
|
||||
# Each role can have its own RHSM configuration.
|
||||
# Example:
|
||||
# ComputeHCIParameters:
|
||||
# RhsmVars:
|
||||
# rhsub_repos:
|
||||
# - rhel-7-server-rpms
|
||||
# - rhel-7-server-extras-rpms
|
||||
# - rhel-7-server-rh-common-rpms
|
||||
# - rhel-ha-for-rhel-7-server-rpms
|
||||
# - rhel-7-server-openstack-13-rpms
|
||||
# - rhel-7-server-rhceph-1.3-osd-rpms
|
||||
# rhn_activation_key: 'anothersecrete-key'
|
||||
#
|
||||
# More about composable roles:
|
||||
# https://docs.openstack.org/tripleo-docs/latest/install/advanced_deployment/role_specific_parameters.html
|
||||
#
|
||||
# More about ansible-role-redhat-subscription variables:
|
||||
# https://github.com/openstack/ansible-role-redhat-subscription
|
74
extraconfig/services/rhsm.yaml
Normal file
74
extraconfig/services/rhsm.yaml
Normal file
@ -0,0 +1,74 @@
|
||||
heat_template_version: queens
|
||||
|
||||
description: Configure Red Hat Subscription Management.
|
||||
|
||||
parameters:
|
||||
RoleNetIpMap:
|
||||
default: {}
|
||||
type: json
|
||||
ServiceData:
|
||||
default: {}
|
||||
description: Dictionary packing service data
|
||||
type: json
|
||||
ServiceNetMap:
|
||||
default: {}
|
||||
description: Mapping of service_name -> network name. Typically set
|
||||
via parameter_defaults in the resource registry. This
|
||||
mapping overrides those in ServiceNetMapDefaults.
|
||||
type: json
|
||||
DefaultPasswords:
|
||||
default: {}
|
||||
type: json
|
||||
RoleName:
|
||||
default: ''
|
||||
description: Role name on which the service is applied
|
||||
type: string
|
||||
RoleParameters:
|
||||
default: {}
|
||||
description: Parameters specific to the role
|
||||
type: json
|
||||
EndpointMap:
|
||||
default: {}
|
||||
description: Mapping of service endpoint -> protocol. Typically set
|
||||
via parameter_defaults in the resource registry.
|
||||
type: json
|
||||
RhsmVars:
|
||||
default: {}
|
||||
description: Hash of ansible-role-redhat-subscription variables
|
||||
used to configure RHSM.
|
||||
# The parameters contains sensible data like activation key or password.
|
||||
hidden: true
|
||||
tags:
|
||||
- role_specific
|
||||
type: json
|
||||
|
||||
resources:
|
||||
# Merging role-specific parameters (RoleParameters) with the default parameters.
|
||||
# RoleParameters will have the precedence over the default parameters.
|
||||
RoleParametersValue:
|
||||
type: OS::Heat::Value
|
||||
properties:
|
||||
type: json
|
||||
value:
|
||||
map_replace:
|
||||
- map_replace:
|
||||
- vars: RhsmVars
|
||||
- values: {get_param: [RoleParameters]}
|
||||
- values:
|
||||
vars: {get_param: RhsmVars}
|
||||
|
||||
outputs:
|
||||
role_data:
|
||||
description: Role data for the RHSM service.
|
||||
value:
|
||||
service_name: rhsm
|
||||
config_settings:
|
||||
tripleo::rhsm::firewall_rules: {}
|
||||
upgrade_tasks: []
|
||||
step_config: ''
|
||||
host_prep_tasks:
|
||||
- name: Red Hat Subscription Management configuration
|
||||
vars: {get_attr: [RoleParametersValue, value, vars]}
|
||||
block:
|
||||
- include_role:
|
||||
name: redhat-subscription
|
@ -238,6 +238,7 @@ resource_registry:
|
||||
# Services that are disabled by default (use relevant environment files):
|
||||
OS::TripleO::Services::Fluentd: OS::Heat::None
|
||||
OS::TripleO::Services::Ipsec: OS::Heat::None
|
||||
OS::TripleO::Services::Rhsm: OS::Heat::None
|
||||
OS::TripleO::Services::Collectd: OS::Heat::None
|
||||
OS::TripleO::LoggingConfiguration: puppet/services/logging/fluentd-config.yaml
|
||||
OS::TripleO::Services::ManilaApi: OS::Heat::None
|
||||
|
5
releasenotes/notes/rhsm-service-fbec46930264b355.yaml
Normal file
5
releasenotes/notes/rhsm-service-fbec46930264b355.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Introduce a new service to configure RHSM with Ansible,
|
||||
by calling ansible-role-redhat-subscription in host_prep_tasks.
|
@ -24,6 +24,7 @@
|
||||
- OS::TripleO::Services::MySQLClient
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
|
@ -28,6 +28,7 @@
|
||||
- OS::TripleO::Services::MySQLClient
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
|
@ -24,6 +24,7 @@
|
||||
- OS::TripleO::Services::MySQLClient
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
|
@ -24,6 +24,7 @@
|
||||
- OS::TripleO::Services::MySQLClient
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
|
@ -21,6 +21,7 @@
|
||||
- OS::TripleO::Services::MySQLClient
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
|
@ -48,6 +48,7 @@
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::OpenDaylightOvs
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
|
@ -36,6 +36,7 @@
|
||||
- OS::TripleO::Services::NovaMigrationTargetAlt
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::OpenDaylightOvs
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClientAlt
|
||||
- OS::TripleO::Services::SkydiveAgent
|
||||
|
@ -39,6 +39,7 @@
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::OpenDaylightOvs
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
|
@ -33,6 +33,7 @@
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::LiquidioCompute
|
||||
- OS::TripleO::Services::OpenDaylightOvs
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::Snmp
|
||||
- OS::TripleO::Services::Sshd
|
||||
|
@ -37,6 +37,7 @@
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::OpenDaylightOvs
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
|
@ -40,6 +40,7 @@
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::OpenDaylightOvs
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
|
@ -131,6 +131,7 @@
|
||||
- OS::TripleO::Services::PankoApi
|
||||
- OS::TripleO::Services::RabbitMQ
|
||||
- OS::TripleO::Services::Redis
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::SaharaApi
|
||||
- OS::TripleO::Services::SaharaEngine
|
||||
|
@ -93,6 +93,7 @@
|
||||
- OS::TripleO::Services::Pacemaker
|
||||
- OS::TripleO::Services::PankoApi
|
||||
- OS::TripleO::Services::Redis
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::SaharaApi
|
||||
- OS::TripleO::Services::SaharaEngine
|
||||
|
@ -126,6 +126,7 @@
|
||||
- OS::TripleO::Services::PankoApi
|
||||
- OS::TripleO::Services::RabbitMQ
|
||||
- OS::TripleO::Services::Redis
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::SaharaApi
|
||||
- OS::TripleO::Services::SaharaEngine
|
||||
|
@ -113,6 +113,7 @@
|
||||
- OS::TripleO::Services::PankoApi
|
||||
- OS::TripleO::Services::RabbitMQ
|
||||
- OS::TripleO::Services::Redis
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::SaharaApi
|
||||
- OS::TripleO::Services::SaharaEngine
|
||||
|
@ -104,6 +104,7 @@
|
||||
- OS::TripleO::Services::Pacemaker
|
||||
- OS::TripleO::Services::PankoApi
|
||||
- OS::TripleO::Services::Redis
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::SaharaApi
|
||||
- OS::TripleO::Services::SaharaEngine
|
||||
|
@ -23,6 +23,7 @@
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::Pacemaker
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::SensuClient
|
||||
- OS::TripleO::Services::Snmp
|
||||
|
@ -45,6 +45,7 @@
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::OpenDaylightOvs
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
|
@ -41,6 +41,7 @@
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::OpenDaylightOvs
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
|
@ -42,6 +42,7 @@
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::OpenDaylightOvs
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
|
@ -41,6 +41,7 @@
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::OpenDaylightOvs
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
|
@ -20,6 +20,7 @@
|
||||
- OS::TripleO::Services::MySQLClient
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::SensuClient
|
||||
- OS::TripleO::Services::Snmp
|
||||
- OS::TripleO::Services::Timezone
|
||||
|
@ -21,6 +21,7 @@
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::Pacemaker
|
||||
- OS::TripleO::Services::RabbitMQ
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::SensuClient
|
||||
- OS::TripleO::Services::Snmp
|
||||
- OS::TripleO::Services::Timezone
|
||||
|
@ -31,6 +31,7 @@
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::OpenDaylightOvs
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::SensuClient
|
||||
- OS::TripleO::Services::SkydiveAgent
|
||||
- OS::TripleO::Services::Snmp
|
||||
|
@ -30,6 +30,7 @@
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::OpenDaylightOvs
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
- OS::TripleO::Services::SkydiveAgent
|
||||
|
@ -29,6 +29,7 @@
|
||||
- OS::TripleO::Services::MySQLClient
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
|
@ -29,6 +29,7 @@
|
||||
- OS::TripleO::Services::PankoApi
|
||||
- OS::TripleO::Services::RabbitMQ
|
||||
- OS::TripleO::Services::Redis
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::Timezone
|
||||
- OS::TripleO::Services::TripleoFirewall
|
||||
- OS::TripleO::Services::TripleoPackages
|
||||
|
@ -46,6 +46,7 @@
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::RabbitMQ
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::SwiftProxy
|
||||
- OS::TripleO::Services::SwiftRingBuilder
|
||||
- OS::TripleO::Services::SwiftStorage
|
||||
|
@ -31,6 +31,7 @@
|
||||
- OS::TripleO::Services::NeutronDhcpAgent
|
||||
- OS::TripleO::Services::NeutronServer
|
||||
- OS::TripleO::Services::RabbitMQ
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::SwiftProxy
|
||||
- OS::TripleO::Services::SwiftRingBuilder
|
||||
- OS::TripleO::Services::SwiftStorage
|
||||
|
@ -134,6 +134,7 @@
|
||||
- OS::TripleO::Services::PankoApi
|
||||
- OS::TripleO::Services::RabbitMQ
|
||||
- OS::TripleO::Services::Redis
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::SaharaApi
|
||||
- OS::TripleO::Services::SaharaEngine
|
||||
@ -204,6 +205,7 @@
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::OpenDaylightOvs
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
@ -242,6 +244,7 @@
|
||||
- OS::TripleO::Services::MySQLClient
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
@ -282,6 +285,7 @@
|
||||
- OS::TripleO::Services::MySQLClient
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
@ -316,6 +320,7 @@
|
||||
- OS::TripleO::Services::MySQLClient
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::RsyslogSidecar
|
||||
- OS::TripleO::Services::Securetty
|
||||
- OS::TripleO::Services::SensuClient
|
||||
|
@ -49,6 +49,7 @@
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::ContainersLogrotateCrond
|
||||
- OS::TripleO::Services::RabbitMQ
|
||||
- OS::TripleO::Services::Rhsm
|
||||
- OS::TripleO::Services::SwiftProxy
|
||||
- OS::TripleO::Services::SwiftRingBuilder
|
||||
- OS::TripleO::Services::SwiftStorage
|
||||
|
Loading…
x
Reference in New Issue
Block a user