Merge "Make *AdminStateUp parameters consistent"
[apex-tripleo-heat-templates.git] / puppet / services / nova-base.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack Nova base service. Shared for all Nova services.
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   KeystoneRegion:
30     type: string
31     default: 'regionOne'
32     description: Keystone region for endpoint
33   NotificationDriver:
34     type: string
35     default: 'messagingv2'
36     description: Driver or drivers to handle sending notifications.
37     constraints:
38       - allowed_values: [ 'messagingv2', 'noop' ]
39   NovaPassword:
40     description: The password for the nova service and db account, used by nova-api.
41     type: string
42     hidden: true
43   NeutronPassword:
44     description: The password for the neutron service and db account, used by neutron agents.
45     type: string
46     hidden: true
47   NovaOVSBridge:
48     default: 'br-int'
49     description: Name of integration bridge used by Open vSwitch
50     type: string
51   RabbitPassword:
52     description: The password for RabbitMQ
53     type: string
54     hidden: true
55   RabbitUserName:
56     default: guest
57     description: The username for RabbitMQ
58     type: string
59   RabbitClientUseSSL:
60     default: false
61     description: >
62         Rabbit client subscriber parameter to specify
63         an SSL connection to the RabbitMQ host.
64     type: string
65   RabbitClientPort:
66     default: 5672
67     description: Set rabbit subscriber port, change this if using SSL
68     type: number
69   DatabaseSyncTimeout:
70     default: 300
71     description: DB Sync Timeout default
72     type: number
73   Debug:
74     type: string
75     default: ''
76     description: Set to True to enable debugging on all services.
77   NovaDebug:
78     default: ''
79     description: Set to True to enable debugging Nova services.
80     type: string
81   EnableConfigPurge:
82     type: boolean
83     default: false
84     description: >
85         Remove configuration that is not generated by TripleO. Used to avoid
86         configuration remnants after upgrades.
87   NovaIPv6:
88     default: false
89     description: Enable IPv6 features in Nova
90     type: boolean
91   UpgradeLevelNovaCompute:
92     type: string
93     description: Nova Compute upgrade level
94     default: ''
95   NovaCronArchiveDeleteRowsMinute:
96     type: string
97     description: >
98         Cron to move deleted instances to another table - Minute
99     default: '1'
100   NovaCronArchiveDeleteRowsHour:
101     type: string
102     description: >
103         Cron to move deleted instances to another table - Hour
104     default: '0'
105   NovaCronArchiveDeleteRowsMonthday:
106     type: string
107     description: >
108         Cron to move deleted instances to another table - Month Day
109     default: '*'
110   NovaCronArchiveDeleteRowsMonth:
111     type: string
112     description: >
113         Cron to move deleted instances to another table - Month
114     default: '*'
115   NovaCronArchiveDeleteRowsWeekday:
116     type: string
117     description: >
118         Cron to move deleted instances to another table - Week Day
119     default: '*'
120   NovaCronArchiveDeleteRowsMaxRows:
121     type: string
122     description: >
123         Cron to move deleted instances to another table - Max Rows
124     default: '100'
125   NovaCronArchiveDeleteRowsUser:
126     type: string
127     description: >
128         Cron to move deleted instances to another table - User
129     default: 'nova'
130   NovaCronArchiveDeleteRowsDestination:
131     type: string
132     description: >
133         Cron to move deleted instances to another table - Log destination
134     default: '/var/log/nova/nova-rowsflush.log'
135   NovaCronArchiveDeleteRowsUntilComplete:
136     type: boolean
137     description: >
138         Cron to move deleted instances to another table - Until complete
139     default: false
140   NovaPlacementAPIInterface:
141     type: string
142     description: >
143         Endpoint interface to be used for the placement API.
144     default: 'internal'
145
146 conditions:
147
148   compute_upgrade_level_empty: {equals : [{get_param: UpgradeLevelNovaCompute}, '']}
149   service_debug_unset: {equals : [{get_param: NovaDebug}, '']}
150
151 outputs:
152   role_data:
153     description: Role data for the Nova base service.
154     value:
155       service_name: nova_base
156       config_settings:
157         map_merge:
158         - nova::rabbit_password: {get_param: RabbitPassword}
159           nova::rabbit_userid: {get_param: RabbitUserName}
160           nova::rabbit_use_ssl: {get_param: RabbitClientUseSSL}
161           nova::rabbit_port: {get_param: RabbitClientPort}
162           nova::placement::project_name: 'service'
163           nova::placement::password: {get_param: NovaPassword}
164           nova::placement::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
165           nova::placement::os_region_name: {get_param: KeystoneRegion}
166           nova::placement::os_interface: {get_param: NovaPlacementAPIInterface}
167           nova::database_connection:
168             make_url:
169               scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}
170               username: nova
171               password: {get_param: NovaPassword}
172               host: {get_param: [EndpointMap, MysqlInternal, host]}
173               path: /nova
174               query:
175                 read_default_file: /etc/my.cnf.d/tripleo.cnf
176                 read_default_group: tripleo
177           nova::cell0_database_connection:
178             make_url:
179               scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}
180               username: nova
181               password: {get_param: NovaPassword}
182               host: {get_param: [EndpointMap, MysqlInternal, host]}
183               path: /nova_cell0
184               query:
185                 read_default_file: /etc/my.cnf.d/tripleo.cnf
186                 read_default_group: tripleo
187           nova::api_database_connection:
188             make_url:
189               scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}
190               username: nova_api
191               password: {get_param: NovaPassword}
192               host: {get_param: [EndpointMap, MysqlInternal, host]}
193               path: /nova_api
194               query:
195                 read_default_file: /etc/my.cnf.d/tripleo.cnf
196                 read_default_group: tripleo
197           nova::placement_database_connection:
198             make_url:
199               scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}
200               username: nova_placement
201               password: {get_param: NovaPassword}
202               host: {get_param: [EndpointMap, MysqlInternal, host]}
203               path: /nova_placement
204               query:
205                 read_default_file: /etc/my.cnf.d/tripleo.cnf
206                 read_default_group: tripleo
207           nova::debug:
208             if:
209             - service_debug_unset
210             - {get_param: Debug }
211             - {get_param: NovaDebug }
212           nova::purge_config: {get_param: EnableConfigPurge}
213           nova::network::neutron::neutron_project_name: 'service'
214           nova::network::neutron::neutron_username: 'neutron'
215           nova::network::neutron::neutron_region_name: {get_param: KeystoneRegion}
216           nova::network::neutron::dhcp_domain: ''
217           nova::network::neutron::neutron_password: {get_param: NeutronPassword}
218           nova::network::neutron::neutron_url: {get_param: [EndpointMap, NeutronInternal, uri]}
219           nova::network::neutron::neutron_auth_url: {get_param: [EndpointMap, KeystoneV3Admin, uri]}
220           nova::rabbit_heartbeat_timeout_threshold: 60
221           nova::cinder_catalog_info: 'volumev2:cinderv2:internalURL'
222           nova::host: '%{::fqdn}'
223           nova::notify_on_state_change: 'vm_and_task_state'
224           nova::notification_driver: {get_param: NotificationDriver}
225           nova::network::neutron::neutron_auth_type: 'v3password'
226           nova::db::database_db_max_retries: -1
227           nova::db::database_max_retries: -1
228           nova::db::sync::db_sync_timeout: {get_param: DatabaseSyncTimeout}
229           nova::db::sync_api::db_sync_timeout: {get_param: DatabaseSyncTimeout}
230           nova::glance_api_servers: {get_param: [EndpointMap, GlanceInternal, uri]}
231           nova::use_ipv6: {get_param: NovaIPv6}
232           nova::network::neutron::neutron_ovs_bridge: {get_param: NovaOVSBridge}
233           nova::cron::archive_deleted_rows::minute: {get_param: NovaCronArchiveDeleteRowsMinute}
234           nova::cron::archive_deleted_rows::hour: {get_param: NovaCronArchiveDeleteRowsHour}
235           nova::cron::archive_deleted_rows::monthday: {get_param: NovaCronArchiveDeleteRowsMonthday}
236           nova::cron::archive_deleted_rows::month: {get_param: NovaCronArchiveDeleteRowsMonth}
237           nova::cron::archive_deleted_rows::weekday: {get_param: NovaCronArchiveDeleteRowsWeekday}
238           nova::cron::archive_deleted_rows::max_rows: {get_param: NovaCronArchiveDeleteRowsMaxRows}
239           nova::cron::archive_deleted_rows::user: {get_param: NovaCronArchiveDeleteRowsUser}
240           nova::cron::archive_deleted_rows::destination: {get_param: NovaCronArchiveDeleteRowsDestination}
241           nova::cron::archive_deleted_rows::until_complete: {get_param: NovaCronArchiveDeleteRowsUntilComplete}
242         -
243           if:
244           - compute_upgrade_level_empty
245           - {}
246           - nova::upgrade_level_compute: {get_param: UpgradeLevelNovaCompute}
247       service_config_settings:
248         mysql:
249           # NOTE(aschultz): this should be configurable if/when we support more
250           # complex cell v2 configurations. For now, this is the default cell
251           # created for the cell v2 configuration
252           nova::db::mysql_api::setup_cell0: true
253           nova::rabbit_password: {get_param: RabbitPassword}
254           nova::rabbit_userid: {get_param: RabbitUserName}
255           nova::rabbit_use_ssl: {get_param: RabbitClientUseSSL}
256           nova::rabbit_port: {get_param: RabbitClientPort}