Move *Image parameters into role templates
authorSteven Hardy <shardy@redhat.com>
Tue, 26 Jul 2016 11:17:32 +0000 (12:17 +0100)
committerSteven Hardy <shardy@redhat.com>
Wed, 27 Jul 2016 16:04:59 +0000 (17:04 +0100)
We've got some inconsistent naming here, but I'm not attempting to
fix that yet, only move the current parameters inside each role template.

This should be backwards compatible because the parameter names
don't change, but also enable progress on custom-roles.  We can
figure out a strategy for deprecating these and aligning per-role
parameter naming in a subsequent patch.

Also moves ImageUpdatePolicy, which wasn't consistently passed to
all roles anyway, and aligns the default image and constraints
for each role.

Change-Id: I85ec979934df220acbab9f7c3a6055f23e3bfc29
Partially-Implements: blueprint custom-roles

overcloud.yaml
puppet/ceph-storage.yaml
puppet/cinder-storage.yaml
puppet/compute.yaml
puppet/controller.yaml
puppet/swift-storage.yaml

index 2c94fc7..e8343ca 100644 (file)
@@ -36,10 +36,6 @@ parameters:
     default: ''
     description: Set to True to enable debugging on all services.
     type: string
-  ImageUpdatePolicy:
-    default: 'REBUILD_PRESERVE_EPHEMERAL'
-    description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
-    type: string
   InternalApiVirtualFixedIPs:
     default: []
     description: >
@@ -128,11 +124,6 @@ parameters:
     description: |
       Deprecated. Use ControllerExtraConfig via parameter_defaults instead.
     type: json
-  controllerImage:
-    type: string
-    default: overcloud-full
-    constraints:
-      - custom_constraint: glance.image
   OvercloudControlFlavor:
     description: Flavor for control nodes to request when deploying.
     default: baremetal
@@ -187,11 +178,6 @@ parameters:
     default: false
     description: Whether to enable or not the Rbd backend for Nova
     type: boolean
-  NovaImage:
-    type: string
-    default: overcloud-full
-    constraints:
-      - custom_constraint: glance.image
   NovaOVSBridge:
     default: 'br-int'
     description: Name of integration bridge used by Open vSwitch
@@ -321,9 +307,6 @@ parameters:
   BlockStorageCount:
     type: number
     default: 0
-  BlockStorageImage:
-    default: overcloud-full
-    type: string
   OvercloudBlockStorageFlavor:
     description: Flavor for block storage nodes to request when deploying.
     default: baremetal
@@ -358,9 +341,6 @@ parameters:
     type: string
     constraints:
       - custom_constraint: nova.flavor
-  SwiftStorageImage:
-    default: overcloud-full
-    type: string
   ObjectStorageExtraConfig:
     default: {}
     description: |
@@ -386,9 +366,6 @@ parameters:
   CephStorageCount:
     type: number
     default: 0
-  CephStorageImage:
-    default: overcloud-full
-    type: string
   OvercloudCephStorageFlavor:
     default: baremetal
     description: Flavor for Ceph storage nodes to request when deploying.
@@ -548,7 +525,6 @@ resources:
           Flavor: {get_param: OvercloudControlFlavor}
           HeatAuthEncryptionKey: {get_resource: HeatAuthEncryptionKey}
           HorizonSecret: {get_resource: HorizonSecret}
-          Image: {get_param: controllerImage}
           MysqlClusterUniquePart: {get_attr: [MysqlClusterUniquePart, value]}
           MysqlRootPassword: {get_attr: [MysqlRootPassword, value]}
           PcsdPassword: {get_resource: PcsdPassword}
@@ -590,8 +566,6 @@ resources:
           ExtraConfig: {get_param: ExtraConfig}
           Flavor: {get_param: OvercloudComputeFlavor}
           GlanceHost: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, GlanceApiNetwork]}]}
-          Image: {get_param: NovaImage}
-          ImageUpdatePolicy: {get_param: ImageUpdatePolicy}
           KeystoneAdminApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, KeystoneAdminApiNetwork]}]}
           KeystonePublicApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, KeystonePublicApiNetwork]}]}
           NeutronPassword: {get_param: NeutronPassword}
@@ -643,7 +617,6 @@ resources:
       resource_def:
         type: OS::TripleO::BlockStorage
         properties:
-          Image: {get_param: BlockStorageImage}
           Flavor: {get_param: OvercloudBlockStorageFlavor}
           UpdateIdentifier: {get_param: UpdateIdentifier}
           Hostname:
@@ -677,7 +650,6 @@ resources:
         properties:
           Flavor: {get_param: OvercloudSwiftStorageFlavor}
           HashSuffix: {get_param: SwiftHashSuffix}
-          Image: {get_param: SwiftStorageImage}
           UpdateIdentifier: {get_param: UpdateIdentifier}
           ServiceNetMap: {get_param: ServiceNetMap}
           Hostname:
@@ -708,7 +680,6 @@ resources:
       resource_def:
         type: OS::TripleO::CephStorage
         properties:
-          Image: {get_param: CephStorageImage}
           Flavor: {get_param: OvercloudCephStorageFlavor}
           ServiceNetMap: {get_param: ServiceNetMap}
           UpdateIdentifier: {get_param: UpdateIdentifier}
index 93c4a65..4d489c8 100644 (file)
@@ -6,9 +6,9 @@ parameters:
     type: string
     constraints:
       - custom_constraint: nova.flavor
-  Image:
+  CephStorageImage:
     type: string
-    default: overcloud-ceph-storage
+    default: overcloud-full
     constraints:
       - custom_constraint: glance.image
   ImageUpdatePolicy:
@@ -106,7 +106,7 @@ resources:
       os-collect-config:
         command: {get_param: ConfigCommand}
     properties:
-      image: {get_param: Image}
+      image: {get_param: CephStorageImage}
       image_update_policy: {get_param: ImageUpdatePolicy}
       flavor: {get_param: Flavor}
       key_name: {get_param: KeyName}
index 995e19f..fd6a425 100644 (file)
@@ -1,9 +1,11 @@
 heat_template_version: 2015-04-30
 description: 'OpenStack cinder storage configured by Puppet'
 parameters:
-  Image:
-    default: overcloud-cinder-volume
+  BlockStorageImage:
+    default: overcloud-full
     type: string
+    constraints:
+      - custom_constraint: glance.image
   ExtraConfig:
     default: {}
     description: |
@@ -107,7 +109,7 @@ resources:
         command: {get_param: ConfigCommand}
     properties:
       image:
-        {get_param: Image}
+        {get_param: BlockStorageImage}
       flavor: {get_param: Flavor}
       key_name: {get_param: KeyName}
       networks:
index f4cbbf3..4f2971b 100644 (file)
@@ -48,9 +48,9 @@ parameters:
   GlanceHost:
     type: string
     default: ''  # Has to be here because of the ignored empty value bug
-  Image:
+  NovaImage:
     type: string
-    default: overcloud-compute
+    default: overcloud-full
     constraints:
       - custom_constraint: glance.image
   ImageUpdatePolicy:
@@ -228,8 +228,7 @@ resources:
       os-collect-config:
         command: {get_param: ConfigCommand}
     properties:
-      image:
-        {get_param: Image}
+      image: {get_param: NovaImage}
       image_update_policy:
         get_param: ImageUpdatePolicy
       flavor: {get_param: Flavor}
index f05f6da..dee2777 100644 (file)
@@ -117,9 +117,9 @@ parameters:
     description: Secret key for Django
     type: string
     hidden: true
-  Image:
+  controllerImage:
     type: string
-    default: overcloud-control
+    default: overcloud-full
     constraints:
       - custom_constraint: glance.image
   ImageUpdatePolicy:
@@ -340,7 +340,7 @@ resources:
       os-collect-config:
         command: {get_param: ConfigCommand}
     properties:
-      image: {get_param: Image}
+      image: {get_param: controllerImage}
       image_update_policy: {get_param: ImageUpdatePolicy}
       flavor: {get_param: Flavor}
       key_name: {get_param: KeyName}
index 00b81eb..a0111bf 100644 (file)
@@ -11,9 +11,11 @@ parameters:
       in the ring.
     hidden: true
     type: string
-  Image:
-    default: overcloud-swift-storage
+  SwiftStorageImage:
+    default: overcloud-full
     type: string
+    constraints:
+      - custom_constraint: glance.image
   KeyName:
     default: default
     description: Name of an existing Nova key pair to enable SSH access to the instances
@@ -112,7 +114,7 @@ resources:
       os-collect-config:
         command: {get_param: ConfigCommand}
     properties:
-      image: {get_param: Image}
+      image: {get_param: SwiftStorageImage}
       flavor: {get_param: Flavor}
       key_name: {get_param: KeyName}
       networks: