Change flat network name for nosdn fdio scenario
[apex-tripleo-heat-templates.git] / puppet / services / nova-placement.yaml
index 5564c1b..e44a721 100644 (file)
@@ -1,9 +1,13 @@
-heat_template_version: ocata
+heat_template_version: pike
 
 description: >
   OpenStack Nova Placement API service configured with Puppet
 
 parameters:
+  ServiceData:
+    default: {}
+    description: Dictionary packing service data
+    type: json
   ServiceNetMap:
     default: {}
     description: Mapping of service_name -> network name. Typically set
@@ -13,6 +17,14 @@ parameters:
   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
@@ -20,10 +32,10 @@ parameters:
     type: json
   NovaWorkers:
     default: 0
-    description: Number of workers for Nova Placement API service.
+    description: Number of workers for Nova services.
     type: number
   NovaPassword:
-    description: The password for the nova service and db account, used by nova-placement.
+    description: The password for the nova service and db account
     type: string
     hidden: true
   KeystoneRegion:
@@ -49,17 +61,23 @@ resources:
   ApacheServiceBase:
     type: ./apache.yaml
     properties:
+      ServiceData: {get_param: ServiceData}
       ServiceNetMap: {get_param: ServiceNetMap}
       DefaultPasswords: {get_param: DefaultPasswords}
       EndpointMap: {get_param: EndpointMap}
+      RoleName: {get_param: RoleName}
+      RoleParameters: {get_param: RoleParameters}
       EnableInternalTLS: {get_param: EnableInternalTLS}
 
   NovaBase:
     type: ./nova-base.yaml
     properties:
+      ServiceData: {get_param: ServiceData}
       ServiceNetMap: {get_param: ServiceNetMap}
       DefaultPasswords: {get_param: DefaultPasswords}
       EndpointMap: {get_param: EndpointMap}
+      RoleName: {get_param: RoleName}
+      RoleParameters: {get_param: RoleParameters}
 
 outputs:
   role_data:
@@ -79,6 +97,10 @@ outputs:
               dport:
                 - 8778
                 - 13778
+          nova::keystone::authtoken::project_name: 'service'
+          nova::keystone::authtoken::password: {get_param: NovaPassword}
+          nova::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix] }
+          nova::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix]}
           nova::wsgi::apache_placement::api_port: '8778'
           nova::wsgi::apache_placement::ssl: {get_param: EnableInternalTLS}
           # NOTE: bind IP is found in Heat replacing the network name with the local node IP
@@ -120,5 +142,10 @@ outputs:
               - "%{hiera('mysql_bind_host')}"
       upgrade_tasks:
         - name: Stop nova_placement service (running under httpd)
-          tags: step2
+          tags: step1
           service: name=httpd state=stopped
+        # The nova placement API isn't installed in newton images, so install
+        # it on upgrade
+        - name: Install nova-placement packages on upgrade
+          tags: step3
+          yum: name=openstack-nova-placement-api state=latest