Replace outdated instruction with link to upstream doc
[apex-tripleo-heat-templates.git] / docker / services / nova-ironic.yaml
1 heat_template_version: pike
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   DockerNovaComputeIronicImage:
12     description: image
13     default: 'centos-binary-nova-compute-ironic:latest'
14     type: string
15   DockerNovaConfigImage:
16     description: The container image to use for the nova config_volume
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   RoleName:
29     default: ''
30     description: Role name on which the service is applied
31     type: string
32   RoleParameters:
33     default: {}
34     description: Parameters specific to the role
35     type: json
36   EndpointMap:
37     default: {}
38     description: Mapping of service endpoint -> protocol. Typically set
39                  via parameter_defaults in the resource registry.
40     type: json
41
42 resources:
43
44   ContainersCommon:
45     type: ./containers-common.yaml
46
47   NovaIronicBase:
48     type: ../../puppet/services/nova-ironic.yaml
49     properties:
50       ServiceNetMap: {get_param: ServiceNetMap}
51       DefaultPasswords: {get_param: DefaultPasswords}
52       EndpointMap: {get_param: EndpointMap}
53       RoleName: {get_param: RoleName}
54       RoleParameters: {get_param: RoleParameters}
55
56 outputs:
57   role_data:
58     description: Role data for the Nova Compute service.
59     value:
60       service_name: {get_attr: [NovaIronicBase, role_data, service_name]}
61       config_settings: {get_attr: [NovaIronicBase, role_data, config_settings]}
62       step_config: &step_config
63         get_attr: [NovaIronicBase, role_data, step_config]
64       puppet_config:
65         config_volume: nova
66         puppet_tags: nova_config,nova_paste_api_ini
67         step_config: *step_config
68         config_image:
69           list_join:
70           - '/'
71           - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
72       kolla_config:
73         /var/lib/kolla/config_files/nova_ironic.json:
74           command: /usr/bin/nova-compute --config-file /etc/nova/nova.conf --config-file /etc/nova/rootwrap.conf
75           permissions:
76             - path: /var/log/nova
77               owner: nova:nova
78               recurse: true
79             - path: /var/lib/nova
80               owner: nova:nova
81               recurse: true
82       docker_config:
83         step_5:
84           nova_compute:
85             image:
86               list_join:
87               - '/'
88               - [ {get_param: DockerNamespace}, {get_param: DockerNovaComputeIronicImage} ]
89             net: host
90             privileged: true
91             user: root
92             restart: always
93             volumes:
94               list_concat:
95                 - {get_attr: [ContainersCommon, volumes]}
96                 -
97                   - /var/lib/kolla/config_files/nova_ironic.json:/var/lib/kolla/config_files/config.json:ro
98                   - /var/lib/config-data/nova/etc/nova/:/etc/nova/:ro
99                   - /run:/run
100                   - /dev:/dev
101                   - /etc/iscsi:/etc/iscsi
102                   - /var/lib/nova/:/var/lib/nova
103                   - /var/log/containers/nova:/var/log/nova
104             environment:
105              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
106       host_prep_tasks:
107         - name: create persistent directories
108           file:
109             path: "{{ item }}"
110             state: directory
111           with_items:
112             - /var/log/containers/nova
113             - /var/lib/nova
114       upgrade_tasks:
115         - name: Stop and disable nova-compute service
116           tags: step2
117           service: name=openstack-nova-compute state=stopped enabled=no