1 heat_template_version: pike
4 OpenStack Libvirt Service
9 default: 'tripleoupstream'
13 default: 'centos-binary-nova-libvirt:latest'
15 # we configure libvirt via the nova-compute container due to coupling
16 # in the puppet modules
17 DockerNovaConfigImage:
19 default: 'centos-binary-nova-compute:latest'
23 description: Set to true to enable package installation
27 description: Mapping of service_name -> network name. Typically set
28 via parameter_defaults in the resource registry. This
29 mapping overrides those in ServiceNetMapDefaults.
36 description: Role name on which the service is applied
40 description: Parameters specific to the role
44 description: Mapping of service endpoint -> protocol. Typically set
45 via parameter_defaults in the resource registry.
50 UseTLSTransportForLiveMigration:
53 description: If set to true and if EnableInternalTLS is enabled, it will
54 set the libvirt URI's transport to tls and configure the
55 relevant keys for libvirt.
59 use_tls_for_live_migration:
62 - {get_param: EnableInternalTLS}
65 - {get_param: UseTLSTransportForLiveMigration}
71 type: ./containers-common.yaml
74 type: ../../puppet/services/nova-libvirt.yaml
76 EndpointMap: {get_param: EndpointMap}
77 ServiceNetMap: {get_param: ServiceNetMap}
78 DefaultPasswords: {get_param: DefaultPasswords}
79 RoleName: {get_param: RoleName}
80 RoleParameters: {get_param: RoleParameters}
84 description: Role data for the Libvirt service.
86 service_name: {get_attr: [NovaLibvirtBase, role_data, service_name]}
89 - get_attr: [NovaLibvirtBase, role_data, config_settings]
90 # FIXME: we need to disable migration for now as the
91 # hieradata is common for all services, and this means nova
92 # and nova_placement puppet runs also try to configure
93 # libvirt, and they fail. We can remove this override when
94 # we have hieradata separation between containers.
95 - tripleo::profile::base::nova::manage_migration: false
96 step_config: &step_config
97 get_attr: [NovaLibvirtBase, role_data, step_config]
99 config_volume: nova_libvirt
100 puppet_tags: nova_config
101 step_config: *step_config
105 - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
107 /var/lib/kolla/config_files/nova-libvirt.json:
110 - use_tls_for_live_migration
111 - /usr/sbin/libvirtd --listen --config /etc/libvirt/libvirtd.conf
112 - /usr/sbin/libvirtd --config /etc/libvirt/libvirtd.conf
114 - path: /var/log/nova
123 - [ {get_param: DockerNamespace}, {get_param: DockerLibvirtImage} ]
130 - {get_attr: [ContainersCommon, volumes]}
132 - /var/lib/kolla/config_files/nova-libvirt.json:/var/lib/kolla/config_files/config.json:ro
133 - /var/lib/config-data/nova_libvirt/etc/libvirt/:/etc/libvirt/:ro
134 - /lib/modules:/lib/modules:ro
137 - /sys/fs/cgroup:/sys/fs/cgroup
138 - /var/lib/nova:/var/lib/nova
139 # Needed to use host's virtlogd
140 - /var/run/libvirt:/var/run/libvirt
141 - /var/lib/libvirt:/var/lib/libvirt
142 - /etc/libvirt/qemu:/etc/libvirt/qemu
143 - /var/log/libvirt/qemu:/var/log/libvirt/qemu:ro
144 - /var/log/containers/nova:/var/log/nova
146 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
148 - name: create libvirt persistent data directories
155 - /var/log/containers/nova
156 - name: set enable_package_install fact
158 enable_package_install: {get_param: EnablePackageInstall}
159 # We use virtlogd on host, so when using Deployed Server
160 # feature, we need to ensure libvirt is installed.
161 - name: install libvirt-daemon
165 when: enable_package_install
166 - name: start virtlogd socket
168 name: virtlogd.socket
171 when: enable_package_install
173 - name: Stop and disable libvirtd service
175 service: name=libvirtd state=stopped enabled=no