diff --git a/deployment/database/redis-pacemaker-puppet.yaml b/deployment/database/redis-pacemaker-puppet.yaml index 9675136125..f06451ca71 100644 --- a/deployment/database/redis-pacemaker-puppet.yaml +++ b/deployment/database/redis-pacemaker-puppet.yaml @@ -79,7 +79,6 @@ parameter_groups: - RedisIPv6 conditions: - puppet_debug_enabled: {get_param: ConfigDebug} internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]} docker_enabled: {equals: [{get_param: ContainerCli}, 'docker']} common_tag_enabled: {equals: [{get_param: ClusterCommonTag}, true]} @@ -234,73 +233,6 @@ outputs: perm: '0600' optional: true container_config_scripts: {get_attr: [ContainersCommon, container_config_scripts]} - docker_config: - step_2: - map_merge: - - redis_init_bundle: - start_order: 1 - detach: false - net: host - ipc: host - user: root - config_volume: 'redis_init_bundle' - command: # '/container_puppet_apply.sh "STEP" "TAGS" "CONFIG" "DEBUG"' - list_concat: - - - '/container_puppet_apply.sh' - - '2' - - 'file,file_line,concat,augeas,pacemaker::resource::bundle,pacemaker::property,pacemaker::resource::ocf,pacemaker::constraint::order,pacemaker::constraint::colocation' - - 'include tripleo::profile::base::pacemaker;include tripleo::profile::pacemaker::database::redis_bundle' - - if: - - puppet_debug_enabled - - - '--debug' - - - '' - image: *redis_config_image - volumes: - list_concat: - - {get_attr: [ContainersCommon, container_puppet_apply_volumes]} - - if: - - docker_enabled - - - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro - - null - environment: - # NOTE: this should force this container to re-run on each - # update (scale-out, etc.) - TRIPLEO_DEPLOY_IDENTIFIER: {get_param: DeployIdentifier} - - redis_restart_bundle: - start_order: 2 - config_volume: redis - detach: false - net: host - ipc: host - user: root - environment: - TRIPLEO_MINOR_UPDATE: '' - command: /var/lib/container-config-scripts/pacemaker_restart_bundle.sh redis redis redis-bundle Slave Master - image: {get_param: ContainerRedisConfigImage} - volumes: - list_concat: - - {get_attr: [ContainersCommon, pacemaker_restart_volumes]} - - - /var/lib/config-data/puppet-generated/redis:/var/lib/kolla/config_files/src:ro - - if: - - internal_tls_enabled - - redis_tls_proxy: - start_order: 3 - image: {get_param: ContainerRedisImage} - net: host - user: root - restart: always - volumes: - list_concat: - - {get_attr: [ContainersCommon, volumes]} - - - - /var/lib/kolla/config_files/redis_tls_proxy.json:/var/lib/kolla/config_files/config.json:ro - - /var/lib/config-data/puppet-generated/redis:/var/lib/kolla/config_files/src:ro - - /etc/pki/tls/certs/redis.crt:/var/lib/kolla/config_files/src-tls/etc/pki/tls/certs/redis.crt:ro - - /etc/pki/tls/private/redis.key:/var/lib/kolla/config_files/src-tls/etc/pki/tls/private/redis.key:ro - - /var/lib/container-config-scripts/wait-port-and-run.sh:/wait-port-and-run.sh:ro - environment: - KOLLA_CONFIG_STRATEGY: COPY_ALWAYS - - {} metadata_settings: get_attr: [RedisBase, role_data, metadata_settings] host_prep_tasks: @@ -327,6 +259,21 @@ outputs: vars: container_image: {get_param: ContainerRedisImage} container_image_latest: *redis_image_pcmklatest + - name: Redis HA Wrappers Step + when: step|int == 2 + block: &redis_puppet_bundle + - name: Redis puppet bundle + import_role: + name: tripleo_ha_wrapper + vars: + tripleo_ha_wrapper_service_name: redis + tripleo_ha_wrapper_resource_name: redis + tripleo_ha_wrapper_bundle_name: redis-bundle + tripleo_ha_wrapper_resource_state: Slave Master + tripleo_ha_wrapper_puppet_config_volume: redis + tripleo_ha_wrapper_puppet_execute: 'include ::tripleo::profile::base::pacemaker; include ::tripleo::profile::pacemaker::database::redis_bundle' + tripleo_ha_wrapper_puppet_tags: 'pacemaker::resource::bundle,pacemaker::property,pacemaker::resource::ocf,pacemaker::constraint::order,pacemaker::constraint::colocation' + tripleo_ha_wrapper_puppet_debug: {get_param: ConfigDebug} update_tasks: - name: Tear-down non-HA redis container when: @@ -364,6 +311,13 @@ outputs: when: - old_redis_image_id.stdout != new_redis_image_id.stdout + post_update_tasks: + - name: Redis bundle post update + when: step|int == 1 + block: *redis_puppet_bundle + vars: + tripleo_ha_wrapper_minor_update: true + upgrade_tasks: - name: Tear-down non-HA redis container when: