Merge "Add ServerIdMap output"
[apex-tripleo-heat-templates.git] / puppet / services / nova-conductor.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack Nova Conductor 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   NovaWorkers:
30     default: 0
31     description: Number of workers for Nova services.
32     type: number
33   MonitoringSubscriptionNovaConductor:
34     default: 'overcloud-nova-conductor'
35     type: string
36   NovaSchedulerLoggingSource:
37     type: json
38     default:
39       tag: openstack.nova.scheduler
40       path: /var/log/nova/nova-scheduler.log
41   UpgradeLevelNovaCompute:
42     type: string
43     description: Nova Compute upgrade level
44     default: auto
45
46 conditions:
47   nova_workers_zero: {equals : [{get_param: NovaWorkers}, 0]}
48
49 resources:
50   NovaBase:
51     type: ./nova-base.yaml
52     properties:
53       ServiceNetMap: {get_param: ServiceNetMap}
54       DefaultPasswords: {get_param: DefaultPasswords}
55       EndpointMap: {get_param: EndpointMap}
56       RoleName: {get_param: RoleName}
57       RoleParameters: {get_param: RoleParameters}
58
59 outputs:
60   role_data:
61     description: Role data for the Nova Conductor service.
62     value:
63       service_name: nova_conductor
64       monitoring_subscription: {get_param: MonitoringSubscriptionNovaConductor}
65       logging_source: {get_param: NovaSchedulerLoggingSource}
66       logging_groups:
67         - nova
68       config_settings:
69         map_merge:
70         - get_attr: [NovaBase, role_data, config_settings]
71         -
72           if:
73           - nova_workers_zero
74           - {}
75           - nova::conductor::workers: {get_param: NovaWorkers}
76       step_config: |
77         include tripleo::profile::base::nova::conductor
78       upgrade_tasks:
79         - name: Stop nova_conductor service
80           tags: step1
81           service: name=openstack-nova-conductor state=stopped
82         # If not already set by puppet (e.g a pre-ocata version), set the
83         # upgrade_level for compute to "auto"
84         - name: Set compute upgrade level to auto
85           tags: step1
86           ini_file:
87             str_replace:
88               template: "dest=/etc/nova/nova.conf section=upgrade_levels option=compute value=LEVEL"
89               params:
90                 LEVEL: {get_param: UpgradeLevelNovaCompute}