Hiera optimization: use a new hiera hook
[apex-tripleo-heat-templates.git] / puppet / services / ironic-conductor.yaml
1 heat_template_version: 2016-04-08
2
3 description: >
4   OpenStack Ironic conductor 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   EndpointMap:
17     default: {}
18     description: Mapping of service endpoint -> protocol. Typically set
19                  via parameter_defaults in the resource registry.
20     type: json
21   IronicCleaningDiskErase:
22     default: 'full'
23     description: Type of disk cleaning before and between deployments,
24                  "full" for full cleaning, "metadata" to clean only disk
25                  metadata (partition table).
26     type: string
27   IronicEnabledDrivers:
28     default: ['pxe_ipmitool', 'pxe_drac', 'pxe_ilo']
29     description: Enabled Ironic drivers
30     type: comma_delimited_list
31   IronicIPXEEnabled:
32     default: true
33     description: Whether to use iPXE instead of PXE for deployment.
34     type: boolean
35   IronicIPXEPort:
36     default: 8088
37     description: Port to use for serving images when iPXE is used.
38     type: string
39   MonitoringSubscriptionIronicConductor:
40     default: 'overcloud-ironic-conductor'
41     type: string
42
43 resources:
44   IronicBase:
45     type: ./ironic-base.yaml
46     properties:
47       ServiceNetMap: {get_param: ServiceNetMap}
48       DefaultPasswords: {get_param: DefaultPasswords}
49       EndpointMap: {get_param: EndpointMap}
50
51 outputs:
52   role_data:
53     description: Role data for the Ironic conductor role.
54     value:
55       service_name: ironic_conductor
56       monitoring_subscription: {get_param: MonitoringSubscriptionIronicConductor}
57       config_settings:
58         map_merge:
59           - get_attr: [IronicBase, role_data, config_settings]
60           # FIXME: I have no idea why neutron_url is in "api" manifest
61           - ironic::api::neutron_url: {get_param: [EndpointMap, NeutronInternal, uri]}
62             ironic::conductor::api_url: {get_param: [EndpointMap, IronicInternal, uri_no_suffix]}
63             ironic::conductor::cleaning_disk_erase: {get_param: IronicCleaningDiskErase}
64             ironic::conductor::enabled_drivers: {get_param: IronicEnabledDrivers}
65             # We need an endpoint containing a real IP, not a VIP here
66             ironic_conductor_http_host: {get_param: [ServiceNetMap, IronicNetwork]}
67             ironic::conductor::http_url:
68               list_join:
69                 - ''
70                 - - 'http://'
71                   - "%{hiera('ironic_conductor_http_host')}:"
72                   - {get_param: IronicIPXEPort}
73             ironic::drivers::pxe::ipxe_enabled: {get_param: IronicIPXEEnabled}
74             ironic::glance_api_servers: {get_param: [EndpointMap, GlanceInternal, uri]}
75             # NOTE: bind IP is found in Heat replacing the network name with the
76             # local node IP for the given network; replacement examples
77             # (eg. for internal_api):
78             # internal_api -> IP
79             # internal_api_uri -> [IP]
80             # internal_api_subnet - > IP/CIDR
81             ironic::drivers::pxe::tftp_server: {get_param: [ServiceNetMap, IronicNetwork]}
82             # NOTE(dtantsur): UEFI only works with iPXE currently for us
83             ironic::drivers::pxe::uefi_pxe_config_template: '$pybasedir/drivers/modules/ipxe_config.template'
84             ironic::drivers::pxe::uefi_pxe_bootfile_name: 'ipxe.efi'
85             tripleo.ironic_conductor.firewall_rules:
86               '134 ironic conductor TFTP':
87                 dport: 69
88                 proto: udp
89               '135 ironic conductor HTTP':
90                 dport: {get_param: IronicIPXEPort}
91             # NOTE(dtantsur): the my_ip parameter is heavily overloaded in
92             # ironic. It's used as a default value for e.g. TFTP server IP,
93             # glance and neutron endpoints, virtual console IP. We override
94             # the TFTP server IP in ironic-conductor.yaml as it should not be
95             # the VIP, but rather a real IP of the host.
96             ironic::my_ip: {get_param: [ServiceNetMap, IronicNetwork]}
97             ironic::pxe::common::http_port: {get_param: IronicIPXEPort}
98
99       step_config: |
100         include ::tripleo::profile::base::ironic::conductor