Merge "Add OpenDaylightConnectionProtocol parameter to opendaylight-api service"
[apex-tripleo-heat-templates.git] / docker / services / nova-libvirt.yaml
1 heat_template_version: ocata
2
3 description: >
4   OpenStack Libvirt Service
5
6 parameters:
7   DockerNamespace:
8     description: namespace
9     default: 'tripleoupstream'
10     type: string
11   DockerLibvirtImage:
12     description: image
13     default: 'centos-binary-nova-libvirt:latest'
14     type: string
15   # we configure libvirt via the nova-compute container due to coupling
16   # in the puppet modules
17   DockerNovaComputeImage:
18     description: image
19     default: 'centos-binary-nova-compute:latest'
20     type: string
21   ServiceNetMap:
22     default: {}
23     description: Mapping of service_name -> network name. Typically set
24                  via parameter_defaults in the resource registry.  This
25                  mapping overrides those in ServiceNetMapDefaults.
26     type: json
27   DefaultPasswords:
28     default: {}
29     type: json
30   EndpointMap:
31     default: {}
32     description: Mapping of service endpoint -> protocol. Typically set
33                  via parameter_defaults in the resource registry.
34     type: json
35
36 resources:
37
38   NovaLibvirtBase:
39     type: ../../puppet/services/nova-libvirt.yaml
40     properties:
41       EndpointMap: {get_param: EndpointMap}
42       ServiceNetMap: {get_param: ServiceNetMap}
43       DefaultPasswords: {get_param: DefaultPasswords}
44
45 outputs:
46   role_data:
47     description: Role data for the Libvirt service.
48     value:
49       service_name: {get_attr: [NovaLibvirtBase, role_data, service_name]}
50       config_settings: {get_attr: [NovaLibvirtBase, role_data, config_settings]}
51       step_config: {get_attr: [NovaLibvirtBase, role_data, step_config]}
52       docker_image: &libvirt_image
53         list_join:
54         - '/'
55         - [ {get_param: DockerNamespace}, {get_param: DockerLibvirtImage} ]
56       puppet_tags: nova_config
57       config_volume: nova_libvirt
58       config_image:
59         list_join:
60         - '/'
61         - [ {get_param: DockerNamespace}, {get_param: DockerNovaComputeImage} ]
62       kolla_config:
63         /var/lib/kolla/config_files/nova-libvirt.json:
64            command: /usr/sbin/libvirtd --config /etc/libvirt/libvirtd.conf
65            config_files:
66            - dest: /etc/libvirt/libvirtd.conf
67              owner: root
68              perm: '0644'
69              source: /var/lib/kolla/config_files/src/etc/libvirt/libvirtd.conf
70       docker_config:
71         step_3:
72           nova_libvirt:
73             image: *libvirt_image
74             net: host
75             pid: host
76             privileged: true
77             restart: always
78             volumes:
79               - /var/lib/kolla/config_files/nova-libvirt.json:/var/lib/kolla/config_files/config.json:ro
80               - /var/lib/config-data/nova_libvirt:/var/lib/kolla/config_files/src:ro
81               - /dev:/dev
82               - /etc/localtime:/etc/localtime:ro
83               - /lib/modules:/lib/modules:ro
84               - /run:/run
85               - /sys/fs/cgroup:/sys/fs/cgroup
86               - /var/lib/nova:/var/lib/nova
87               # Needed to use host's virtlogd
88               - /var/run/libvirt:/var/run/libvirt
89               - libvirtd:/var/lib/libvirt
90               - nova_libvirt_qemu:/etc/libvirt/qemu
91             environment:
92               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS