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