puppet: Add EnablePackageInstall option
This adds an option which enables package installation via Yum when Puppet executes. Users might want to disable Yum installation of packages via puppet when using pre-installed images. The option is off by default: meaning that Puppet will no longer install packages by default. Users will need to enable the EnablePackageInstall in order to get the previous behavior. The intent is to use the default_parameters section of the Heat environment to allow users to cleanly enable this features without wiring it into the top level. This is because the new parameter is Puppet specific and doesn't really apply to other implementations. Kilo Heat already has support for default_parameters and so does python-heatclient. NOTE: most TripleO users do not yet have the heatclient features because setup-clienttools in tripleo-incubator only installs releases via pip. It is for these reasons the default_parameters section in overcloud-resource-registry-puppet.yaml is commented out for now. Change-Id: I3af71b801b87d080b367d9e4a1fb44c1bfea6e87
This commit is contained in:
parent
6ba5a41062
commit
f8a9c530e0
@ -84,6 +84,10 @@ parameters:
|
||||
NtpServer:
|
||||
type: string
|
||||
default: ''
|
||||
EnablePackageInstall:
|
||||
default: 'false'
|
||||
description: Set to true to enable package installation via Puppet
|
||||
type: boolean
|
||||
|
||||
resources:
|
||||
BlockStorage:
|
||||
@ -124,6 +128,7 @@ resources:
|
||||
template: '["server"]'
|
||||
params:
|
||||
server: {get_param: NtpServer}
|
||||
enable_package_install: {get_param: EnablePackageInstall}
|
||||
signal_transport: NO_SIGNAL
|
||||
|
||||
# Map heat metadata into hiera datafiles
|
||||
@ -153,6 +158,7 @@ resources:
|
||||
cinder::rabbit_userid: {get_input: rabbit_username}
|
||||
cinder::rabbit_password: {get_input: rabbit_password}
|
||||
ntp::servers: {get_input: ntp_servers}
|
||||
enable_package_install: {get_input: enable_package_install}
|
||||
|
||||
VolumePuppetConfig:
|
||||
type: OS::Heat::SoftwareConfig
|
||||
|
@ -227,7 +227,10 @@ parameters:
|
||||
description: The user password for SNMPd with readonly rights running on all Overcloud nodes
|
||||
type: string
|
||||
hidden: true
|
||||
|
||||
EnablePackageInstall:
|
||||
default: 'false'
|
||||
description: Set to true to enable package installation via Puppet
|
||||
type: boolean
|
||||
|
||||
resources:
|
||||
|
||||
@ -336,6 +339,7 @@ resources:
|
||||
neutron::rabbit_password: {get_input: rabbit_password}
|
||||
ceilometer::rabbit_password: {get_input: rabbit_password}
|
||||
ntp::servers: {get_input: ntp_servers}
|
||||
enable_package_install: {get_input: enable_package_install}
|
||||
|
||||
NovaComputeDeployment:
|
||||
type: OS::TripleO::SoftwareDeployment
|
||||
@ -385,6 +389,7 @@ resources:
|
||||
template: '["server"]'
|
||||
params:
|
||||
server: {get_param: NtpServer}
|
||||
enable_package_install: {get_param: EnablePackageInstall}
|
||||
|
||||
outputs:
|
||||
ip_address:
|
||||
|
@ -373,7 +373,10 @@ parameters:
|
||||
VirtualIP:
|
||||
type: string
|
||||
default: '' # Has to be here because of the ignored empty value bug
|
||||
|
||||
EnablePackageInstall:
|
||||
default: 'false'
|
||||
description: Set to true to enable package installation via Puppet
|
||||
type: boolean
|
||||
|
||||
resources:
|
||||
|
||||
@ -538,6 +541,7 @@ resources:
|
||||
swift_replicas: {get_param: SwiftReplicas}
|
||||
swift_min_part_hours: {get_param: SwiftMinPartHours}
|
||||
swift_mount_check: {get_param: SwiftMountCheck}
|
||||
enable_package_install: {get_param: EnablePackageInstall}
|
||||
|
||||
# Map heat metadata into hiera datafiles
|
||||
ControllerConfig:
|
||||
@ -704,6 +708,7 @@ resources:
|
||||
controller_virtual_ip: {get_input: controller_virtual_ip}
|
||||
public_virtual_interface: {get_input: public_virtual_interface}
|
||||
public_virtual_ip: {get_input: public_virtual_ip}
|
||||
enable_package_install: {get_input: enable_package_install}
|
||||
|
||||
# NOTE(dprince): this example uses a composition class
|
||||
# on the puppet side (loadbalancer.pp). This seemed like the
|
||||
|
@ -5,3 +5,7 @@ resource_registry:
|
||||
OS::TripleO::Controller: controller-puppet.yaml
|
||||
OS::TripleO::ObjectStorage: swift-storage-puppet.yaml
|
||||
OS::TripleO::Net::SoftwareConfig: net-config-bridge.yaml
|
||||
|
||||
# NOTE(dprince): requires a new release of python-heatclient
|
||||
#default_parameters:
|
||||
#EnablePackageInstall: false
|
||||
|
@ -13,6 +13,17 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
if !str2bool(hiera('enable_package_install', 'false')) {
|
||||
case $::osfamily {
|
||||
'RedHat': {
|
||||
Package { provider => 'norpm' } # provided by tripleo-puppet
|
||||
}
|
||||
default: {
|
||||
warning('enable_package_install option not supported.')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class tripleo::loadbalancer (
|
||||
$keystone_admin = false,
|
||||
$keystone_public = false,
|
||||
|
@ -13,6 +13,17 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
if !str2bool(hiera('enable_package_install', 'false')) {
|
||||
case $::osfamily {
|
||||
'RedHat': {
|
||||
Package { provider => 'norpm' } # provided by tripleo-puppet
|
||||
}
|
||||
default: {
|
||||
warning('enable_package_install option not supported.')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
include ::ntp
|
||||
|
||||
class { 'nova':
|
||||
|
@ -13,6 +13,17 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
if !str2bool(hiera('enable_package_install', 'false')) {
|
||||
case $::osfamily {
|
||||
'RedHat': {
|
||||
Package { provider => 'norpm' } # provided by tripleo-puppet
|
||||
}
|
||||
default: {
|
||||
warning('enable_package_install option not supported.')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if hiera('step') >= 1 {
|
||||
|
||||
include ::ntp
|
||||
|
@ -13,6 +13,16 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
if !str2bool(hiera('enable_package_install', 'false')) {
|
||||
case $::osfamily {
|
||||
'RedHat': {
|
||||
Package { provider => 'norpm' } # provided by tripleo-puppet
|
||||
}
|
||||
default: {
|
||||
warning('enable_package_install option not supported.')
|
||||
}
|
||||
}
|
||||
}
|
||||
include ::ntp
|
||||
|
||||
include ::swift
|
||||
|
@ -13,6 +13,17 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
if str2bool(hiera('disable_package_install', 'false')) {
|
||||
case $::osfamily {
|
||||
'RedHat': {
|
||||
Package { provider => 'norpm' } # provided by tripleo-puppet
|
||||
}
|
||||
default: {
|
||||
warning('disable_package_install option not supported.')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
include ::ntp
|
||||
|
||||
include ::cinder
|
||||
|
@ -13,6 +13,17 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
if str2bool(hiera('disable_package_install', 'false')) {
|
||||
case $::osfamily {
|
||||
'RedHat': {
|
||||
Package { provider => 'norpm' } # provided by tripleo-puppet
|
||||
}
|
||||
default: {
|
||||
warning('disable_package_install option not supported.')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
define add_devices(
|
||||
$swift_zones = '1'
|
||||
){
|
||||
|
@ -47,6 +47,10 @@ parameters:
|
||||
NtpServer:
|
||||
type: string
|
||||
default: ''
|
||||
EnablePackageInstall:
|
||||
default: 'false'
|
||||
description: Set to true to enable package installation via Puppet
|
||||
type: boolean
|
||||
|
||||
resources:
|
||||
|
||||
@ -121,6 +125,7 @@ resources:
|
||||
# NOTE(dprince): build_ring support is currently not wired in.
|
||||
# See: https://review.openstack.org/#/c/109225/
|
||||
tripleo::ringbuilder::build_ring: True
|
||||
enable_package_install: {get_input: enable_package_install}
|
||||
|
||||
|
||||
SwiftStorageHieraDeploy:
|
||||
@ -143,6 +148,7 @@ resources:
|
||||
template: '["server"]'
|
||||
params:
|
||||
server: {get_param: NtpServer}
|
||||
enable_package_install: {get_param: EnablePackageInstall}
|
||||
|
||||
outputs:
|
||||
hosts_entry:
|
||||
|
Loading…
x
Reference in New Issue
Block a user