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