Bind mount tripleo.cnf in transient bootstrap containers
[apex-tripleo-heat-templates.git] / docker / services / panko-api.yaml
index 6f10fd0..626d917 100644 (file)
@@ -6,17 +6,11 @@ description: >
   will be disabled in future releases.
 
 parameters:
-  DockerNamespace:
-    description: namespace
-    default: 'tripleoupstream'
-    type: string
   DockerPankoApiImage:
     description: image
-    default: 'centos-binary-panko-api:latest'
     type: string
   DockerPankoConfigImage:
     description: The container image to use for the panko config_volume
-    default: 'centos-binary-panko-api:latest'
     type: string
   EndpointMap:
     default: {}
@@ -57,6 +51,9 @@ resources:
   ContainersCommon:
     type: ./containers-common.yaml
 
+  MySQLClient:
+    type: ../../puppet/services/database/mysql-client.yaml
+
   PankoApiPuppetBase:
     type: ../../puppet/services/panko-api.yaml
     properties:
@@ -77,17 +74,17 @@ outputs:
           - get_attr: [PankoApiPuppetBase, role_data, config_settings]
           - apache::default_vhost: false
       step_config: &step_config
-        get_attr: [PankoApiPuppetBase, role_data, step_config]
+        list_join:
+          - "\n"
+          - - {get_attr: [PankoApiPuppetBase, role_data, step_config]}
+            - {get_attr: [MySQLClient, role_data, step_config]}
       service_config_settings: {get_attr: [PankoApiPuppetBase, role_data, service_config_settings]}
       # BEGIN DOCKER SETTINGS #
       puppet_config:
         config_volume: panko
         puppet_tags: panko_api_paste_ini,panko_config
         step_config: *step_config
-        config_image:
-          list_join:
-            - '/'
-            - [ {get_param: DockerNamespace}, {get_param: DockerPankoConfigImage} ]
+        config_image: {get_param: DockerPankoConfigImage}
       kolla_config:
         /var/lib/kolla/config_files/panko_api.json:
           command: /usr/sbin/httpd -DFOREGROUND
@@ -103,10 +100,7 @@ outputs:
       docker_config:
         step_2:
           panko_init_log:
-            image: &panko_api_image
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerPankoApiImage} ]
+            image: &panko_api_image {get_param: DockerPankoApiImage}
             user: root
             volumes:
               - /var/log/containers/panko:/var/log/panko
@@ -122,6 +116,7 @@ outputs:
               list_concat:
                 - {get_attr: [ContainersCommon, volumes]}
                 -
+                  - /var/lib/config-data/panko/etc/my.cnf.d/tripleo.cnf:/etc/my.cnf.d/tripleo.cnf:ro
                   - /var/lib/config-data/panko/etc/panko:/etc/panko:ro
                   - /var/log/containers/panko:/var/log/panko
             command: "/usr/bin/bootstrap_host_exec panko_api su panko -s /bin/bash -c '/usr/bin/panko-dbsync'"