Change flat network name for nosdn fdio scenario
[apex-tripleo-heat-templates.git] / puppet / services / database / redis-base.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack Redis service configured with Puppet
5
6 parameters:
7   RedisPassword:
8     description: The password for the redis service account.
9     type: string
10     hidden: true
11   RedisFDLimit:
12     description: Configure Redis FD limit
13     type: string
14     default: 10240
15   ServiceData:
16     default: {}
17     description: Dictionary packing service data
18     type: json
19   ServiceNetMap:
20     default: {}
21     description: Mapping of service_name -> network name. Typically set
22                  via parameter_defaults in the resource registry.  This
23                  mapping overrides those in ServiceNetMapDefaults.
24     type: json
25   DefaultPasswords:
26     default: {}
27     type: json
28   RoleName:
29     default: ''
30     description: Role name on which the service is applied
31     type: string
32   RoleParameters:
33     default: {}
34     description: Parameters specific to the role
35     type: json
36   EndpointMap:
37     default: {}
38     description: Mapping of service endpoint -> protocol. Typically set
39                  via parameter_defaults in the resource registry.
40     type: json
41   EnableInternalTLS:
42     type: boolean
43     default: false
44
45 conditions:
46   use_tls_proxy: {equals : [{get_param: EnableInternalTLS}, true]}
47
48 outputs:
49   role_data:
50     description: Role data for the redis role.
51     value:
52       service_name: redis_base
53       config_settings:
54         redis::requirepass: {get_param: RedisPassword}
55         redis::masterauth: {get_param: RedisPassword}
56         redis::sentinel_auth_pass: {get_param: RedisPassword}
57         # NOTE: bind IP is found in Heat replacing the network name with the local node IP
58         # for the given network; replacement examples (eg. for internal_api):
59         # internal_api -> IP
60         # internal_api_uri -> [IP]
61         # internal_api_subnet - > IP/CIDR
62         # Bind to localhost if internal TLS is enabled, since we put a TLs
63         # proxy in front.
64         redis::bind:
65           if:
66           - use_tls_proxy
67           - 'localhost'
68           - {get_param: [ServiceNetMap, RedisNetwork]}
69         redis::port: 6379
70         redis::sentinel::master_name: "%{hiera('bootstrap_nodeid')}"
71         redis::sentinel::redis_host: "%{hiera('bootstrap_nodeid_ip')}"
72         redis::sentinel::notification_script: '/usr/local/bin/redis-notifications.sh'
73         redis::sentinel::sentinel_bind:
74           if:
75           - use_tls_proxy
76           - 'localhost'
77           - {get_param: [ServiceNetMap, RedisNetwork]}
78         redis::ulimit: {get_param: RedisFDLimit}