X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=docker%2Fservices%2Fheat-api-cfn.yaml;h=84bc0672e8529dba6a300b2d3b3629baca57e795;hb=5ee398bd0145fbc3e7584c3a9fd8b6c6cf5f61ad;hp=1905281db513bb4dc75c3c2ff7ea8d031de2abda;hpb=35e1411c8c8d4aa1261dab0fc31c6c1d32a33bfc;p=apex-tripleo-heat-templates.git diff --git a/docker/services/heat-api-cfn.yaml b/docker/services/heat-api-cfn.yaml index 1905281d..84bc0672 100644 --- a/docker/services/heat-api-cfn.yaml +++ b/docker/services/heat-api-cfn.yaml @@ -4,24 +4,22 @@ description: > OpenStack containerized Heat API CFN service parameters: - DockerNamespace: - description: namespace - default: 'tripleoupstream' - type: string DockerHeatApiCfnImage: description: image - default: 'centos-binary-heat-api-cfn:latest' type: string # puppet needs the heat-wsgi-api-cfn binary from centos-binary-heat-api-cfn DockerHeatApiCfnConfigImage: description: The container image to use for the heat_api_cfn config_volume - default: 'centos-binary-heat-api-cfn: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 @@ -56,6 +54,7 @@ resources: type: ../../puppet/services/heat-api-cfn.yaml properties: EndpointMap: {get_param: EndpointMap} + ServiceData: {get_param: ServiceData} ServiceNetMap: {get_param: ServiceNetMap} DefaultPasswords: {get_param: DefaultPasswords} RoleName: {get_param: RoleName} @@ -70,6 +69,8 @@ outputs: map_merge: - get_attr: [HeatBase, role_data, config_settings] - apache::default_vhost: false + logging_source: {get_attr: [HeatBase, role_data, logging_source]} + logging_groups: {get_attr: [HeatBase, role_data, logging_groups]} step_config: &step_config get_attr: [HeatBase, role_data, step_config] service_config_settings: {get_attr: [HeatBase, role_data, service_config_settings]} @@ -78,13 +79,15 @@ outputs: config_volume: heat_api_cfn puppet_tags: heat_config,file,concat,file_line step_config: *step_config - config_image: - list_join: - - '/' - - [ {get_param: DockerNamespace}, {get_param: DockerHeatApiCfnConfigImage} ] + config_image: {get_param: DockerHeatApiCfnConfigImage} kolla_config: /var/lib/kolla/config_files/heat_api_cfn.json: command: /usr/sbin/httpd -DFOREGROUND + config_files: + - source: "/var/lib/kolla/config_files/src/*" + dest: "/" + merge: true + preserve_properties: true permissions: - path: /var/log/heat owner: heat:heat @@ -92,10 +95,7 @@ outputs: docker_config: step_4: heat_api_cfn: - image: - list_join: - - '/' - - [ {get_param: DockerNamespace}, {get_param: DockerHeatApiCfnImage} ] + image: {get_param: DockerHeatApiCfnImage} net: host privileged: false restart: always @@ -107,12 +107,9 @@ outputs: - {get_attr: [ContainersCommon, volumes]} - - /var/lib/kolla/config_files/heat_api_cfn.json:/var/lib/kolla/config_files/config.json:ro - - /var/lib/config-data/heat_api_cfn/etc/heat/:/etc/heat/:ro - - /var/lib/config-data/heat_api_cfn/etc/httpd/conf/:/etc/httpd/conf/:ro - - /var/lib/config-data/heat_api_cfn/etc/httpd/conf.d/:/etc/httpd/conf.d/:ro - - /var/lib/config-data/heat_api_cfn/etc/httpd/conf.modules.d/:/etc/httpd/conf.modules.d/:ro - - /var/lib/config-data/heat_api_cfn/var/www/:/var/www/:ro + - /var/lib/config-data/puppet-generated/heat_api_cfn/:/var/lib/kolla/config_files/src:ro - /var/log/containers/heat:/var/log/heat + - /var/log/containers/httpd/heat-api-cfn:/var/log/httpd - if: - internal_tls_enabled @@ -128,11 +125,31 @@ outputs: host_prep_tasks: - name: create persistent logs directory file: - path: /var/log/containers/heat + path: "{{ item }}" state: directory + with_items: + - /var/log/containers/heat + - /var/log/containers/httpd/heat-api-cfn upgrade_tasks: - - name: Stop and disable heat_api_cfn service + - name: Check if heat_api_cfn is deployed + command: systemctl is-enabled openstack-heat-api-cfn + tags: common + ignore_errors: True + register: heat_api_cfn_enabled + - name: check for heat_api_cfn running under apache (post upgrade) + tags: step2 + shell: "httpd -t -D DUMP_VHOSTS | grep -q heat_api_cfn_wsgi" + register: heat_api_cfn_apache + ignore_errors: true + changed_when: false + check_mode: no + - name: Stop heat_api_cfn service (running under httpd) + tags: step2 + service: name=httpd state=stopped + when: heat_api_cfn_apache.rc == 0 + - name: Stop and disable heat_api_cfn service (pre-upgrade not under httpd) tags: step2 - service: name=httpd state=stopped enabled=no + service: name=openstack-heat-api-cfn state=stopped enabled=no + when: heat_api_cfn_enabled.rc == 0 metadata_settings: get_attr: [HeatBase, role_data, metadata_settings]