Merge "Rework container volumes as hostpath mounts"
[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
37   NovaIronicBase:
38     type: ../../puppet/services/nova-ironic.yaml
39     properties:
40       EndpointMap: {get_param: EndpointMap}
41
42 outputs:
43   role_data:
44     description: Role data for the Nova Compute service.
45     value:
46       service_name: {get_attr: [NovaIronicBase, role_data, service_name]}
47       config_settings: {get_attr: [NovaIronicBase, role_data, config_settings]}
48       step_config: &step_config
49         get_attr: [NovaIronicBase, role_data, step_config]
50       puppet_config:
51         config_volume: nova
52         puppet_tags: nova_config,nova_paste_api_ini
53         step_config: *step_config
54         config_image:
55           list_join:
56           - '/'
57           - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
58       kolla_config:
59         /var/lib/kolla/config_files/nova_ironic.json:
60            command: /usr/bin/nova-compute --config-file /etc/nova/nova.conf --config-file /etc/nova/rootwrap.conf
61            config_files:
62            - dest: /etc/nova/nova.conf
63              owner: nova
64              perm: '0600'
65              source: /var/lib/kolla/config_files/src/etc/nova/nova.conf
66            - dest: /etc/nova/rootwrap.conf
67              owner: nova
68              perm: '0600'
69              source: /var/lib/kolla/config_files/src/etc/nova/rootwrap.conf
70       docker_config:
71         step_5:
72           novacompute:
73             image:
74               list_join:
75               - '/'
76               - [ {get_param: DockerNamespace}, {get_param: DockerNovaComputeImage} ]
77             net: host
78             privileged: true
79             user: root
80             restart: always
81             volumes:
82               - /var/lib/kolla/config_files/nova_ironic.json:/var/lib/kolla/config_files/config.json:ro
83               - /var/lib/config-data/nova:/var/lib/kolla/config_files/src:ro
84               - /etc/localtime:/etc/localtime:ro
85               - /run:/run
86               - /dev:/dev
87               - /etc/iscsi:/etc/iscsi
88               - /var/lib/nova/:/var/lib/nova
89             environment:
90              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
91       upgrade_tasks:
92         - name: Stop and disable nova-compute service
93           tags: step2
94           service: name=nova-compute state=stopped enabled=no