1 heat_template_version: pike
4 Etcd service configured with Puppet
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.
18 description: Role name on which the service is applied
22 description: Parameters specific to the role
26 description: Mapping of service endpoint -> protocol. Typically set
27 via parameter_defaults in the resource registry.
29 EtcdInitialClusterToken:
30 description: Initial cluster token for the etcd cluster during bootstrap.
33 MonitoringSubscriptionEtcd:
34 default: 'overcloud-etcd'
42 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
46 description: Role data for the Etcd role.
49 monitoring_subscription: {get_param: MonitoringSubscriptionEtcd}
56 "%{hiera('fqdn_$NETWORK')}"
58 $NETWORK: {get_param: [ServiceNetMap, EtcdNetwork]}
59 # NOTE: bind IP is found in Heat replacing the network name with the local node IP
60 # for the given network; replacement examples (eg. for internal_api):
62 # internal_api_uri -> [IP]
63 # internal_api_subnet - > IP/CIDR
64 tripleo::profile::base::etcd::bind_ip: {get_param: [ServiceNetMap, EtcdNetwork]}
65 tripleo::profile::base::etcd::client_port: '2379'
66 tripleo::profile::base::etcd::peer_port: '2380'
67 etcd::initial_cluster_token: {get_param: EtcdInitialClusterToken}
68 etcd::manage_package: false
69 tripleo.etcd.firewall_rules:
76 - internal_tls_enabled
77 - generate_service_certificates: true
78 tripleo::profile::base::etcd::certificate_specs:
79 service_certificate: '/etc/pki/tls/certs/etcd.crt'
80 service_key: '/etc/pki/tls/private/etcd.key'
83 template: "%{hiera('fqdn_NETWORK')}"
85 NETWORK: {get_param: [ServiceNetMap, EtcdNetwork]}
88 template: "etcd/%{hiera('fqdn_NETWORK')}"
90 NETWORK: {get_param: [ServiceNetMap, EtcdNetwork]}
93 include ::tripleo::profile::base::etcd
95 - name: Check if etcd is deployed
96 command: systemctl is-enabled etcd
97 tags: step0,validation
99 register: etcd_enabled
100 - name: "PreUpgrade step0,validation: Check if etcd is running"
102 /usr/bin/systemctl show 'etcd' --property ActiveState |
104 when: etcd_enabled.rc == 0
105 tags: step0,validation
106 - name: Stop etcd service
108 service: name=etcd state=stopped
111 - internal_tls_enabled
114 network: {get_param: [ServiceNetMap, EtcdNetwork]}