Merge "Use underscore for Aodh and Gnocchi's container names"
[apex-tripleo-heat-templates.git] / docker / services / nova-compute.yaml
1 heat_template_version: ocata
2
3 description: >
4   OpenStack containerized Nova 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:latest'
14     type: string
15   ServiceNetMap:
16     default: {}
17     description: Mapping of service_name -> network name. Typically set
18                  via parameter_defaults in the resource registry.  This
19                  mapping overrides those in ServiceNetMapDefaults.
20     type: json
21   DefaultPasswords:
22     default: {}
23     type: json
24   EndpointMap:
25     default: {}
26     description: Mapping of service endpoint -> protocol. Typically set
27                  via parameter_defaults in the resource registry.
28     type: json
29
30 resources:
31
32
33   NovaComputeBase:
34     type: ../../puppet/services/nova-compute.yaml
35     properties:
36       EndpointMap: {get_param: EndpointMap}
37       ServiceNetMap: {get_param: ServiceNetMap}
38       DefaultPasswords: {get_param: DefaultPasswords}
39
40 outputs:
41   role_data:
42     description: Role data for the Nova Compute service.
43     value:
44       service_name: {get_attr: [NovaComputeBase, role_data, service_name]}
45       config_settings: {get_attr: [NovaComputeBase, role_data, config_settings]}
46       step_config: &step_config
47         get_attr: [NovaComputeBase, role_data, step_config]
48       puppet_config:
49         config_volume: nova_libvirt
50         puppet_tags: nova_config,nova_paste_api_ini
51         step_config: *step_config
52         config_image: &nova_compute_image
53           list_join:
54           - '/'
55           - [ {get_param: DockerNamespace}, {get_param: DockerNovaComputeImage} ]
56       kolla_config:
57         /var/lib/kolla/config_files/nova-compute.json:
58           command: /usr/bin/nova-compute --config-file /etc/nova/nova.conf --config-file /etc/nova/rootwrap.conf
59       docker_config:
60         # FIXME: run discover hosts here
61         step_4:
62           novacompute:
63             image: *nova_compute_image
64             net: host
65             privileged: true
66             user: root
67             restart: always
68             volumes:
69               - /var/lib/kolla/config_files/nova-compute.json:/var/lib/kolla/config_files/config.json:ro
70               - /var/lib/config-data/nova_libvirt/etc/nova/:/etc/nova/:ro
71               - /dev:/dev
72               - /etc/iscsi:/etc/iscsi
73               - /etc/localtime:/etc/localtime:ro
74               - /lib/modules:/lib/modules:ro
75               - /run:/run
76               - /var/lib/nova:/var/lib/nova
77               - /var/lib/libvirt:/var/lib/libvirt
78             environment:
79              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
80       host_prep_tasks:
81         - name: create /var/lib/libvirt
82           file:
83             path: /var/lib/libvirt
84             state: directory
85       upgrade_tasks:
86         - name: Stop and disable nova-compute service
87           tags: step2
88           service: name=openstack-nova-compute state=stopped enabled=no