aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2015-02-04 21:45:44 -0500
committerDan Prince <dprince@redhat.com>2015-02-05 10:12:48 -0500
commitf8a9c530e0694b956fb5819dd46e38380ecc58e2 (patch)
tree70873d123e0a4e579401da915fe4df41533684a9
parent6ba5a410628bcc611923f798baa807ef799178d5 (diff)
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
-rw-r--r--cinder-storage-puppet.yaml6
-rw-r--r--compute-puppet.yaml7
-rw-r--r--controller-puppet.yaml7
-rw-r--r--overcloud-resource-registry-puppet.yaml4
-rw-r--r--puppet/loadbalancer.pp11
-rw-r--r--puppet/overcloud_compute.pp11
-rw-r--r--puppet/overcloud_controller.pp11
-rw-r--r--puppet/overcloud_object.pp10
-rw-r--r--puppet/overcloud_volume.pp11
-rw-r--r--puppet/ringbuilder.pp11
-rw-r--r--swift-storage-puppet.yaml6
11 files changed, 93 insertions, 2 deletions
diff --git a/cinder-storage-puppet.yaml b/cinder-storage-puppet.yaml
index 508b483c..433df328 100644
--- a/cinder-storage-puppet.yaml
+++ b/cinder-storage-puppet.yaml
@@ -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
diff --git a/compute-puppet.yaml b/compute-puppet.yaml
index 000ca8d8..0448b7bf 100644
--- a/compute-puppet.yaml
+++ b/compute-puppet.yaml
@@ -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:
diff --git a/controller-puppet.yaml b/controller-puppet.yaml
index 747c38af..5974f9e4 100644
--- a/controller-puppet.yaml
+++ b/controller-puppet.yaml
@@ -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
diff --git a/overcloud-resource-registry-puppet.yaml b/overcloud-resource-registry-puppet.yaml
index 6860708a..f8e7cc9e 100644
--- a/overcloud-resource-registry-puppet.yaml
+++ b/overcloud-resource-registry-puppet.yaml
@@ -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
diff --git a/puppet/loadbalancer.pp b/puppet/loadbalancer.pp
index 84598da6..88e6bdd4 100644
--- a/puppet/loadbalancer.pp
+++ b/puppet/loadbalancer.pp
@@ -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,
diff --git a/puppet/overcloud_compute.pp b/puppet/overcloud_compute.pp
index 693a06b3..2ff31be2 100644
--- a/puppet/overcloud_compute.pp
+++ b/puppet/overcloud_compute.pp
@@ -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':
diff --git a/puppet/overcloud_controller.pp b/puppet/overcloud_controller.pp
index 6af54a5e..acfea686 100644
--- a/puppet/overcloud_controller.pp
+++ b/puppet/overcloud_controller.pp
@@ -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
diff --git a/puppet/overcloud_object.pp b/puppet/overcloud_object.pp
index d415c23a..c407afad 100644
--- a/puppet/overcloud_object.pp
+++ b/puppet/overcloud_object.pp
@@ -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
diff --git a/puppet/overcloud_volume.pp b/puppet/overcloud_volume.pp
index 91566bb2..9351d708 100644
--- a/puppet/overcloud_volume.pp
+++ b/puppet/overcloud_volume.pp
@@ -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
diff --git a/puppet/ringbuilder.pp b/puppet/ringbuilder.pp
index 85f7eea5..531706d2 100644
--- a/puppet/ringbuilder.pp
+++ b/puppet/ringbuilder.pp
@@ -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'
){
diff --git a/swift-storage-puppet.yaml b/swift-storage-puppet.yaml
index 26efffdb..a529330f 100644
--- a/swift-storage-puppet.yaml
+++ b/swift-storage-puppet.yaml
@@ -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: