Merge "Use -net=host for docker-puppet.py config gen"
[apex-tripleo-heat-templates.git] / docker / services / nova-ironic.yaml
1 heat_template_version: ocata
2
3 description: >
4   OpenStack containerized Nova Ironic Compute service
5
6 parameters:
7   DockerNamespace:
8     description: namespace
9     default: 'tripleoupstream'
10     type: string
11   DockerNovaComputeImage:
12     description: image
13     default: 'centos-binary-nova-compute-ironic:latest'
14     type: string
15   DockerNovaConfigImage:
16     description: image
17     default: 'centos-binary-nova-base:latest'
18     type: string
19   ServiceNetMap:
20     default: {}
21     description: Mapping of service_name -> network name. Typically set
22                  via parameter_defaults in the resource registry.  This
23                  mapping overrides those in ServiceNetMapDefaults.
24     type: json
25   DefaultPasswords:
26     default: {}
27     type: json
28   EndpointMap:
29     default: {}
30     description: Mapping of service endpoint -> protocol. Typically set
31                  via parameter_defaults in the resource registry.
32     type: json
33
34 resources:
35
36   ContainersCommon:
37     type: ./containers-common.yaml
38
39   NovaIronicBase:
40     type: ../../puppet/services/nova-ironic.yaml
41     properties:
42       EndpointMap: {get_param: EndpointMap}
43
44 outputs:
45   role_data:
46     description: Role data for the Nova Compute service.
47     value:
48       service_name: {get_attr: [NovaIronicBase, role_data, service_name]}
49       config_settings: {get_attr: [NovaIronicBase, role_data, config_settings]}
50       step_config: &step_config
51         get_attr: [NovaIronicBase, role_data, step_config]
52       puppet_config:
53         config_volume: nova
54         puppet_tags: nova_config,nova_paste_api_ini
55         step_config: *step_config
56         config_image:
57           list_join:
58           - '/'
59           - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
60       kolla_config:
61         /var/lib/kolla/config_files/nova_ironic.json:
62            command: /usr/bin/nova-compute --config-file /etc/nova/nova.conf --config-file /etc/nova/rootwrap.conf
63       docker_config:
64         step_5:
65           novacompute:
66             image:
67               list_join:
68               - '/'
69               - [ {get_param: DockerNamespace}, {get_param: DockerNovaComputeImage} ]
70             net: host
71             privileged: true
72             user: root
73             restart: always
74             volumes:
75               yaql:
76                 expression: $.data.common.concat($.data.service)
77                 data:
78                   common: {get_attr: [ContainersCommon, volumes]}
79                   service:
80                     - /var/lib/kolla/config_files/nova_ironic.json:/var/lib/kolla/config_files/config.json:ro
81                     - /var/lib/config-data/nova/etc/nova/:/etc/nova/:ro
82                     - /run:/run
83                     - /dev:/dev
84                     - /etc/iscsi:/etc/iscsi
85                     - /var/lib/nova/:/var/lib/nova
86             environment:
87              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
88       upgrade_tasks:
89         - name: Stop and disable nova-compute service
90           tags: step2
91           service: name=openstack-nova-compute state=stopped enabled=no