d42a582b41ffdaa45ffc6b3f8749cef8159edc93
[apex-tripleo-heat-templates.git] / puppet / services / nova-base.yaml
1 heat_template_version: ocata
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   EndpointMap:
17     default: {}
18     description: Mapping of service endpoint -> protocol. Typically set
19                  via parameter_defaults in the resource registry.
20     type: json
21   KeystoneRegion:
22     type: string
23     default: 'regionOne'
24     description: Keystone region for endpoint
25   NovaPassword:
26     description: The password for the nova service and db account, used by nova-api.
27     type: string
28     hidden: true
29   NeutronPassword:
30     description: The password for the neutron service and db account, used by neutron agents.
31     type: string
32     hidden: true
33   NovaOVSBridge:
34     default: 'br-int'
35     description: Name of integration bridge used by Open vSwitch
36     type: string
37   RabbitPassword:
38     description: The password for RabbitMQ
39     type: string
40     hidden: true
41   RabbitUserName:
42     default: guest
43     description: The username for RabbitMQ
44     type: string
45   RabbitClientUseSSL:
46     default: false
47     description: >
48         Rabbit client subscriber parameter to specify
49         an SSL connection to the RabbitMQ host.
50     type: string
51   RabbitClientPort:
52     default: 5672
53     description: Set rabbit subscriber port, change this if using SSL
54     type: number
55   Debug:
56     type: string
57     default: ''
58     description: Set to True to enable debugging on all services.
59   EnableConfigPurge:
60     type: boolean
61     default: true
62     description: >
63         Remove configuration that is not generated by TripleO. Setting
64         to false may result in configuration remnants after updates/upgrades.
65   NovaIPv6:
66     default: false
67     description: Enable IPv6 features in Nova
68     type: boolean
69   UpgradeLevelNovaCompute:
70     type: string
71     description: Nova Compute upgrade level
72     default: ''
73   NovaCronArchiveDeleteRowsMinute:
74     type: string
75     description: >
76         Cron to move deleted instances to another table - Minute
77     default: '1'
78   NovaCronArchiveDeleteRowsHour:
79     type: string
80     description: >
81         Cron to move deleted instances to another table - Hour
82     default: '0'
83   NovaCronArchiveDeleteRowsMonthday:
84     type: string
85     description: >
86         Cron to move deleted instances to another table - Month Day
87     default: '*'
88   NovaCronArchiveDeleteRowsMonth:
89     type: string
90     description: >
91         Cron to move deleted instances to another table - Month
92     default: '*'
93   NovaCronArchiveDeleteRowsWeekday:
94     type: string
95     description: >
96         Cron to move deleted instances to another table - Week Day
97     default: '*'
98   NovaCronArchiveDeleteRowsMaxRows:
99     type: string
100     description: >
101         Cron to move deleted instances to another table - Max Rows
102     default: '100'
103   NovaCronArchiveDeleteRowsUser:
104     type: string
105     description: >
106         Cron to move deleted instances to another table - User
107     default: 'nova'
108   NovaCronArchiveDeleteRowsDestination:
109     type: string
110     description: >
111         Cron to move deleted instances to another table - Log destination
112     default: '/var/log/nova/nova-rowsflush.log'
113   NovaCronArchiveDeleteRowsUntilComplete:
114     type: boolean
115     description: >
116         Cron to move deleted instances to another table - Until complete
117     default: false
118   NovaPlacementAPIInterface:
119     type: string
120     description: >
121         Endpoint interface to be used for the placement API.
122     default: 'internal'
123
124
125 conditions:
126
127   compute_upgrade_level_empty: {equals : [{get_param: UpgradeLevelNovaCompute}, '']}
128
129 outputs:
130   role_data:
131     description: Role data for the Nova base service.
132     value:
133       service_name: nova_base
134       config_settings:
135         map_merge:
136         - nova::rabbit_password: {get_param: RabbitPassword}
137           nova::rabbit_userid: {get_param: RabbitUserName}
138           nova::rabbit_use_ssl: {get_param: RabbitClientUseSSL}
139           nova::rabbit_port: {get_param: RabbitClientPort}
140           nova::placement::project_name: 'service'
141           nova::placement::password: {get_param: NovaPassword}
142           nova::placement::auth_url: {get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix]}
143           nova::placement::os_region_name: {get_param: KeystoneRegion}
144           nova::placement::os_interface: {get_param: NovaPlacementAPIInterface}
145           nova::database_connection:
146             list_join:
147               - ''
148               - - {get_param: [EndpointMap, MysqlInternal, protocol]}
149                 - '://nova:'
150                 - {get_param: NovaPassword}
151                 - '@'
152                 - {get_param: [EndpointMap, MysqlInternal, host]}
153                 - '/nova'
154           nova::api_database_connection:
155             list_join:
156               - ''
157               - - {get_param: [EndpointMap, MysqlInternal, protocol]}
158                 - '://nova_api:'
159                 - {get_param: NovaPassword}
160                 - '@'
161                 - {get_param: [EndpointMap, MysqlInternal, host]}
162                 - '/nova_api'
163           nova::placement_database_connection:
164             list_join:
165               - ''
166               - - {get_param: [EndpointMap, MysqlInternal, protocol]}
167                 - '://nova_placement:'
168                 - {get_param: NovaPassword}
169                 - '@'
170                 - {get_param: [EndpointMap, MysqlInternal, host]}
171                 - '/nova_placement'
172           nova::debug: {get_param: Debug}
173           nova::purge_config: {get_param: EnableConfigPurge}
174           nova::network::neutron::neutron_project_name: 'service'
175           nova::network::neutron::neutron_username: 'neutron'
176           nova::network::neutron::dhcp_domain: ''
177           nova::network::neutron::neutron_password: {get_param: NeutronPassword}
178           nova::network::neutron::neutron_url: {get_param: [EndpointMap, NeutronInternal, uri]}
179           nova::network::neutron::neutron_auth_url: {get_param: [EndpointMap, KeystoneV3Admin, uri]}
180           nova::rabbit_heartbeat_timeout_threshold: 60
181           nova::cinder_catalog_info: 'volumev2:cinderv2:internalURL'
182           nova::host: '%{::fqdn}'
183           nova::notify_on_state_change: 'vm_and_task_state'
184           nova::notification_driver: messagingv2
185           nova::network::neutron::neutron_auth_type: 'v3password'
186           nova::db::database_db_max_retries: -1
187           nova::db::database_max_retries: -1
188           nova::glance_api_servers: {get_param: [EndpointMap, GlanceInternal, uri]}
189           nova::use_ipv6: {get_param: NovaIPv6}
190           nova::network::neutron::neutron_ovs_bridge: {get_param: NovaOVSBridge}
191           nova::cron::archive_deleted_rows::minute: {get_param: NovaCronArchiveDeleteRowsMinute}
192           nova::cron::archive_deleted_rows::hour: {get_param: NovaCronArchiveDeleteRowsHour}
193           nova::cron::archive_deleted_rows::monthday: {get_param: NovaCronArchiveDeleteRowsMonthday}
194           nova::cron::archive_deleted_rows::month: {get_param: NovaCronArchiveDeleteRowsMonth}
195           nova::cron::archive_deleted_rows::weekday: {get_param: NovaCronArchiveDeleteRowsWeekday}
196           nova::cron::archive_deleted_rows::max_rows: {get_param: NovaCronArchiveDeleteRowsMaxRows}
197           nova::cron::archive_deleted_rows::user: {get_param: NovaCronArchiveDeleteRowsUser}
198           nova::cron::archive_deleted_rows::destination: {get_param: NovaCronArchiveDeleteRowsDestination}
199           nova::cron::archive_deleted_rows::until_complete: {get_param: NovaCronArchiveDeleteRowsUntilComplete}
200         -
201           if:
202           - compute_upgrade_level_empty
203           - {}
204           - nova::upgrade_level_compute: {get_param: UpgradeLevelNovaCompute}
205       service_config_settings:
206         mysql:
207           # NOTE(aschultz): this should be configurable if/when we support more
208           # complex cell v2 configurations. For now, this is the default cell
209           # created for the cell v2 configuration
210           nova::db::mysql_api::setup_cell0: true
211           nova::rabbit_password: {get_param: RabbitPassword}
212           nova::rabbit_userid: {get_param: RabbitUserName}
213           nova::rabbit_use_ssl: {get_param: RabbitClientUseSSL}
214           nova::rabbit_port: {get_param: RabbitClientPort}