X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=docker%2Fservices%2Fsahara-api.yaml;h=cf7eae85fde27c5a45689323aea1c536cedf0fea;hb=af040d1e9418e6f266cfe8e2d1111ac80aaa7b94;hp=8d10165786ddd3f2503622ac828c21467de38868;hpb=cdd6d4872e9fdad9d9390d062ec730854c8643a5;p=apex-tripleo-heat-templates.git diff --git a/docker/services/sahara-api.yaml b/docker/services/sahara-api.yaml index 8d101657..cf7eae85 100644 --- a/docker/services/sahara-api.yaml +++ b/docker/services/sahara-api.yaml @@ -4,23 +4,21 @@ description: > OpenStack Sahara service configured with Puppet parameters: - DockerNamespace: - description: namespace - default: 'tripleoupstream' - type: string DockerSaharaApiImage: description: image - default: 'centos-binary-sahara-api:latest' type: string DockerSaharaConfigImage: description: The container image to use for the sahara config_volume - default: 'centos-binary-sahara-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 @@ -38,16 +36,24 @@ parameters: default: {} description: Parameters specific to the role type: json + UpgradeRemoveUnusedPackages: + default: false + description: Remove package if the service is being disabled during upgrade + type: boolean resources: ContainersCommon: type: ./containers-common.yaml + MySQLClient: + type: ../../puppet/services/database/mysql-client.yaml + SaharaApiPuppetBase: type: ../../puppet/services/sahara-api.yaml properties: EndpointMap: {get_param: EndpointMap} + ServiceData: {get_param: ServiceData} ServiceNetMap: {get_param: ServiceNetMap} DefaultPasswords: {get_param: DefaultPasswords} @@ -60,18 +66,20 @@ outputs: map_merge: - get_attr: [SaharaApiPuppetBase, role_data, config_settings] - sahara::sync_db: false + logging_source: {get_attr: [SaharaApiPuppetBase, role_data, logging_source]} + logging_groups: {get_attr: [SaharaApiPuppetBase, role_data, logging_groups]} step_config: &step_config - get_attr: [SaharaApiPuppetBase, role_data, step_config] + list_join: + - "\n" + - - {get_attr: [SaharaApiPuppetBase, role_data, step_config]} + - {get_attr: [MySQLClient, role_data, step_config]} service_config_settings: {get_attr: [SaharaApiPuppetBase, role_data, service_config_settings]} # BEGIN DOCKER SETTINGS # puppet_config: config_volume: sahara puppet_tags: sahara_api_paste_ini,sahara_cluster_template,sahara_config,sahara_node_group_template step_config: *step_config - config_image: - list_join: - - '/' - - [ {get_param: DockerNamespace}, {get_param: DockerSaharaConfigImage} ] + config_image: {get_param: DockerSaharaConfigImage} kolla_config: /var/lib/kolla/config_files/sahara-api.json: command: /usr/bin/sahara-api --config-file /etc/sahara/sahara.conf @@ -90,10 +98,7 @@ outputs: docker_config: step_3: sahara_db_sync: - image: &sahara_api_image - list_join: - - '/' - - [ {get_param: DockerNamespace}, {get_param: DockerSaharaApiImage} ] + image: &sahara_api_image {get_param: DockerSaharaApiImage} net: host privileged: false detach: false @@ -137,3 +142,8 @@ outputs: - name: Stop and disable sahara_api service tags: step2 service: name=openstack-sahara-api state=stopped enabled=no + - name: Remove openstack-sahara-api package if operator requests it + yum: name=openstack-sahara-api state=removed + tags: step2 + ignore_errors: True + when: {get_param: UpgradeRemoveUnusedPackages}