Change flat network name for nosdn fdio scenario
[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   ServiceData:
8     default: {}
9     description: Dictionary packing service data
10     type: json
11   ServiceNetMap:
12     default: {}
13     description: Mapping of service_name -> network name. Typically set
14                  via parameter_defaults in the resource registry.  This
15                  mapping overrides those in ServiceNetMapDefaults.
16     type: json
17   DefaultPasswords:
18     default: {}
19     type: json
20   RoleName:
21     default: ''
22     description: Role name on which the service is applied
23     type: string
24   RoleParameters:
25     default: {}
26     description: Parameters specific to the role
27     type: json
28   EndpointMap:
29     default: {}
30     description: Mapping of service endpoint -> protocol. Typically set
31                  via parameter_defaults in the resource registry.
32     type: json
33   TackerPassword:
34     description: The password for the tacker service account.
35     type: string
36     hidden: true
37   Debug:
38     type: string
39     default: ''
40     description: Set to True to enable debugging on all services.
41   TackerDebug:
42     default: ''
43     description: Set to True to enable debugging Tacker service.
44     type: string
45   KeystoneRegion:
46     type: string
47     default: 'regionOne'
48     description: Keystone region for endpoint
49   RabbitPassword:
50     description: The password for RabbitMQ
51     type: string
52     hidden: true
53   RabbitUserName:
54     default: guest
55     description: The username for RabbitMQ
56     type: string
57   RabbitClientUseSSL:
58     default: false
59     description: >
60         Rabbit client subscriber parameter to specify
61         an SSL connection to the RabbitMQ host.
62     type: string
63   RabbitClientPort:
64     default: 5672
65     description: Set rabbit subscriber port, change this if using SSL
66     type: number
67   TackerPolicies:
68     description: |
69       A hash of policies to configure for Tacker.
70       e.g. { tacker-context_is_admin: { key: context_is_admin, value: 'role:admin' } }
71     default: {}
72     type: json
73   NotificationDriver:
74     type: string
75     default: 'messagingv2'
76     description: Driver or drivers to handle sending notifications.
77     constraints:
78       - allowed_values: [ 'messagingv2', 'noop' ]
79
80 conditions:
81   service_debug_unset: {equals : [{get_param: TackerDebug}, '']}
82
83 outputs:
84   role_data:
85     description: Role data for the Tacker role.
86     value:
87       service_name: tacker
88       config_settings:
89         tacker_password: {get_param: TackerPassword}
90         tacker::db::database_connection:
91           make_url:
92             scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}
93             username: tacker
94             password: {get_param: TackerPassword}
95             host: {get_param: [EndpointMap, MysqlInternal, host]}
96             path: /tacker
97             query:
98               read_default_file: /etc/my.cnf.d/tripleo.cnf
99               read_default_group: tripleo
100
101         tacker::debug:
102           if:
103           - service_debug_unset
104           - {get_param: Debug }
105           - {get_param: TackerDebug }
106         tacker::rpc_backend: rabbit
107         tacker::notification_driver: {get_param: NotificationDriver}
108         tacker::rabbit_userid: {get_param: RabbitUserName}
109         tacker::rabbit_password: {get_param: RabbitPassword}
110         tacker::rabbit_use_ssl: {get_param: RabbitClientUseSSL}
111         tacker::rabbit_port: {get_param: RabbitClientPort}
112         tacker::server::bind_host: {get_param: [ServiceNetMap, TackerApiNetwork]}
113
114         tacker::keystone::authtoken::project_name: 'service'
115         tacker::keystone::authtoken::user_domain_name: 'Default'
116         tacker::keystone::authtoken::project_domain_name: 'Default'
117         tacker::keystone::authtoken::password: {get_param: TackerPassword}
118         tacker::keystone::authtoken::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
119         tacker::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
120
121         tacker::db::mysql::password: {get_param: TackerPassword}
122         tacker::db::mysql::user: tacker
123         tacker::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
124         tacker::db::mysql::dbname: tacker
125         tacker::db::mysql::allowed_hosts:
126           - '%'
127           - {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
128         tacker::policy::policies: {get_param: TackerPolicies}
129
130       service_config_settings:
131         keystone:
132           tacker::keystone::auth::tenant: 'service'
133           tacker::keystone::auth::region: {get_param: KeystoneRegion}
134           tacker::keystone::auth::password: {get_param: TackerPassword}
135           tacker::keystone::auth::public_url: {get_param: [EndpointMap, TackerPublic, uri]}
136           tacker::keystone::auth::internal_url: {get_param: [EndpointMap, TackerInternal, uri]}
137           tacker::keystone::auth::admin_url: {get_param: [EndpointMap, TackerAdmin, uri]}
138
139       step_config: |
140         include ::tripleo::profile::base::tacker
141       upgrade_tasks:
142         - name: Check if tacker is deployed
143           command: systemctl is-enabled openstack-tacker-server
144           tags: common
145           ignore_errors: True
146           register: tacker_enabled
147         - name: "PreUpgrade step0,validation: Check service openstack-tacker-server is running"
148           shell: /usr/bin/systemctl show 'openstack-tacker-server' --property ActiveState | grep '\bactive\b'
149           when: tacker_enabled.rc == 0
150           tags: step0,validation
151         - name: Stop tacker service
152           tags: step1
153           when: tacker_enabled.rc == 0
154           service: name=openstack-tacker-server state=stopped
155         - name: Install openstack-tacker package if it was disabled
156           tags: step3
157           yum: name=openstack-tacker state=latest
158           when: tacker_enabled.rc != 0