Merge "Clarify Kolla build overrides for tripleo"
[apex-tripleo-heat-templates.git] / puppet / services / etcd.yaml
1 heat_template_version: ocata
2
3 description: >
4   Etcd service configured with Puppet
5
6 parameters:
7   ServiceNetMap:
8     default: {}
9     description: Mapping of service_name -> network name. Typically set
10                  via parameter_defaults in the resource registry.  This
11                  mapping overrides those in ServiceNetMapDefaults.
12     type: json
13   DefaultPasswords:
14     default: {}
15     type: json
16   EndpointMap:
17     default: {}
18     description: Mapping of service endpoint -> protocol. Typically set
19                  via parameter_defaults in the resource registry.
20     type: json
21   EtcdInitialClusterToken:
22     description: Initial cluster token for the etcd cluster during bootstrap.
23     type: string
24     hidden: true
25   MonitoringSubscriptionEtcd:
26     default: 'overcloud-etcd'
27     type: string
28
29 outputs:
30   role_data:
31     description: Role data for the Etcd role.
32     value:
33       service_name: etcd
34       monitoring_subscription: {get_param: MonitoringSubscriptionEtcd}
35       config_settings:
36         etcd::etcd_name:
37           str_replace:
38             template:
39               "%{hiera('fqdn_$NETWORK')}"
40             params:
41               $NETWORK: {get_param: [ServiceNetMap, EtcdNetwork]}
42         # NOTE: bind IP is found in Heat replacing the network name with the local node IP
43         # for the given network; replacement examples (eg. for internal_api):
44         # internal_api -> IP
45         # internal_api_uri -> [IP]
46         # internal_api_subnet - > IP/CIDR
47         tripleo::profile::base::etcd::bind_ip: {get_param: [ServiceNetMap, EtcdNetwork]}
48         tripleo::profile::base::etcd::client_port: '2379'
49         tripleo::profile::base::etcd::peer_port: '2380'
50         etcd::initial_cluster_token: {get_param: EtcdInitialClusterToken}
51         etcd::manage_package: false
52         tripleo.etcd.firewall_rules:
53           '141 etcd':
54             dport:
55               - 2379
56               - 2380
57       step_config: |
58         include ::tripleo::profile::base::etcd
59       upgrade_tasks:
60         - name: Check if etcd is deployed
61           command: systemctl is-enabled etcd
62           tags: step0,validation
63           ignore_errors: True
64           register: etcd_enabled
65         - name: "PreUpgrade step0,validation: Check if etcd is running"
66           shell: >
67             /usr/bin/systemctl show 'etcd' --property ActiveState |
68             grep '\bactive\b'
69           when: etcd_enabled.rc == 0
70           tags: step0,validation
71         - name: Stop etcd service
72           tags: step2
73           service: name=etcd state=stopped