Merge "Dell SC: Add secondary DSM support"
[apex-tripleo-heat-templates.git] / puppet / services / tacker.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack Tacker 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   RoleName:
17     default: ''
18     description: Role name on which the service is applied
19     type: string
20   RoleParameters:
21     default: {}
22     description: Parameters specific to the role
23     type: json
24   EndpointMap:
25     default: {}
26     description: Mapping of service endpoint -> protocol. Typically set
27                  via parameter_defaults in the resource registry.
28     type: json
29   TackerPassword:
30     description: The password for the tacker service account.
31     type: string
32     hidden: true
33   Debug:
34     type: string
35     default: ''
36   KeystoneRegion:
37     type: string
38     default: 'regionOne'
39     description: Keystone region for endpoint
40   RabbitPassword:
41     description: The password for RabbitMQ
42     type: string
43     hidden: true
44   RabbitUserName:
45     default: guest
46     description: The username for RabbitMQ
47     type: string
48   RabbitClientUseSSL:
49     default: false
50     description: >
51         Rabbit client subscriber parameter to specify
52         an SSL connection to the RabbitMQ host.
53     type: string
54   RabbitClientPort:
55     default: 5672
56     description: Set rabbit subscriber port, change this if using SSL
57     type: number
58   TackerPolicies:
59     description: |
60       A hash of policies to configure for Tacker.
61       e.g. { tacker-context_is_admin: { key: context_is_admin, value: 'role:admin' } }
62     default: {}
63     type: json
64
65 outputs:
66   role_data:
67     description: Role data for the Tacker role.
68     value:
69       service_name: tacker
70       config_settings:
71         tacker_password: {get_param: TackerPassword}
72         tacker::db::database_connection:
73           make_url:
74             scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}
75             username: tacker
76             password: {get_param: TackerPassword}
77             host: {get_param: [EndpointMap, MysqlInternal, host]}
78             path: /tacker
79             query:
80               read_default_file: /etc/my.cnf.d/tripleo.cnf
81               read_default_group: tripleo
82
83         tacker::debug: {get_param: Debug}
84         tacker::rpc_backend: rabbit
85         tacker::rabbit_userid: {get_param: RabbitUserName}
86         tacker::rabbit_password: {get_param: RabbitPassword}
87         tacker::rabbit_use_ssl: {get_param: RabbitClientUseSSL}
88         tacker::rabbit_port: {get_param: RabbitClientPort}
89         tacker::server::bind_host: {get_param: [ServiceNetMap, TackerApiNetwork]}
90
91         tacker::keystone::authtoken::project_name: 'service'
92         tacker::keystone::authtoken::user_domain_name: 'Default'
93         tacker::keystone::authtoken::project_domain_name: 'Default'
94         tacker::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
95         tacker::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
96
97         tacker::db::mysql::password: {get_param: TackerPassword}
98         tacker::db::mysql::user: tacker
99         tacker::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
100         tacker::db::mysql::dbname: tacker
101         tacker::db::mysql::allowed_hosts:
102           - '%'
103           - {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
104         tacker::policy::policies: {get_param: TackerPolicies}
105
106       service_config_settings:
107         keystone:
108           tacker::keystone::auth::tenant: 'service'
109           tacker::keystone::auth::region: {get_param: KeystoneRegion}
110           tacker::keystone::auth::password: {get_param: TackerPassword}
111           tacker::keystone::auth::public_url: {get_param: [EndpointMap, TackerPublic, uri]}
112           tacker::keystone::auth::internal_url: {get_param: [EndpointMap, TackerInternal, uri]}
113           tacker::keystone::auth::admin_url: {get_param: [EndpointMap, TackerAdmin, uri]}
114
115       step_config: |
116         include ::tripleo::profile::base::tacker
117       upgrade_tasks:
118         - name: Check if tacker is deployed
119           command: systemctl is-enabled openstack-tacker-server
120           tags: common
121           ignore_errors: True
122           register: tacker_enabled
123         - name: "PreUpgrade step0,validation: Check service openstack-tacker-server is running"
124           shell: /usr/bin/systemctl show 'openstack-tacker-server' --property ActiveState | grep '\bactive\b'
125           when: tacker_enabled.rc == 0
126           tags: step0,validation
127         - name: Stop tacker service
128           tags: step1
129           when: tacker_enabled.rc == 0
130           service: name=openstack-tacker-server state=stopped
131         - name: Install openstack-tacker package if it was disabled
132           tags: step3
133           yum: name=openstack-tacker state=latest
134           when: tacker_enabled.rc != 0