Merge "Don't curl metadata server in userdata example"
[apex-tripleo-heat-templates.git] / docker / services / gnocchi-api.yaml
index 140e93d..41fe197 100644 (file)
@@ -4,23 +4,21 @@ description: >
   OpenStack containerized gnocchi service
 
 parameters:
-  DockerNamespace:
-    description: namespace
-    default: 'tripleoupstream'
-    type: string
   DockerGnocchiApiImage:
     description: image
-    default: 'centos-binary-gnocchi-api:latest'
     type: string
   DockerGnocchiConfigImage:
     description: The container image to use for the gnocchi config_volume
-    default: 'centos-binary-gnocchi-api:latest'
     type: string
   EndpointMap:
     default: {}
     description: Mapping of service endpoint -> protocol. Typically set
                  via parameter_defaults in the resource registry.
     type: json
+  ServiceData:
+    default: {}
+    description: Dictionary packing service data
+    type: json
   ServiceNetMap:
     default: {}
     description: Mapping of service_name -> network name. Typically set
@@ -41,6 +39,10 @@ parameters:
   EnableInternalTLS:
     type: boolean
     default: false
+  NumberOfStorageSacks:
+    default: 128
+    description: Number of storage sacks to create.
+    type: number
 
 conditions:
 
@@ -77,10 +79,7 @@ outputs:
         config_volume: gnocchi
         puppet_tags: gnocchi_api_paste_ini,gnocchi_config
         step_config: *step_config
-        config_image:
-          list_join:
-            - '/'
-            - [ {get_param: DockerNamespace}, {get_param: DockerGnocchiConfigImage} ]
+        config_image: {get_param: DockerGnocchiConfigImage}
       kolla_config:
         /var/lib/kolla/config_files/gnocchi_api.json:
           command: /usr/sbin/httpd -DFOREGROUND
@@ -97,10 +96,7 @@ outputs:
         # db sync runs before permissions set by kolla_config
         step_2:
           gnocchi_init_log:
-            image: &gnocchi_api_image
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerGnocchiApiImage} ]
+            image: &gnocchi_api_image {get_param: DockerGnocchiApiImage}
             user: root
             volumes:
               - /var/log/containers/gnocchi:/var/log/gnocchi
@@ -118,7 +114,11 @@ outputs:
                 -
                   - /var/lib/config-data/gnocchi/etc/gnocchi/:/etc/gnocchi/:ro
                   - /var/log/containers/gnocchi:/var/log/gnocchi
-            command: "/usr/bin/bootstrap_host_exec gnocchi_api su gnocchi -s /bin/bash -c '/usr/bin/gnocchi-upgrade --skip-storage'"
+            command:
+              str_replace:
+                template: "/usr/bin/bootstrap_host_exec gnocchi_api su gnocchi -s /bin/bash -c /usr/bin/gnocchi-upgrade --sacks-number=SACK_NUM"
+                params:
+                  SACK_NUM: {get_param: NumberOfStorageSacks}
         step_4:
           gnocchi_api:
             image: *gnocchi_api_image