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.
51 type: ./containers-common.yaml
54 type: ../../puppet/services/nova-libvirt.yaml
56 EndpointMap: {get_param: EndpointMap}
57 ServiceNetMap: {get_param: ServiceNetMap}
58 DefaultPasswords: {get_param: DefaultPasswords}
59 RoleName: {get_param: RoleName}
60 RoleParameters: {get_param: RoleParameters}
64 description: Role data for the Libvirt service.
66 service_name: {get_attr: [NovaLibvirtBase, role_data, service_name]}
69 - get_attr: [NovaLibvirtBase, role_data, config_settings]
70 # FIXME: we need to disable migration for now as the
71 # hieradata is common for all services, and this means nova
72 # and nova_placement puppet runs also try to configure
73 # libvirt, and they fail. We can remove this override when
74 # we have hieradata separation between containers.
75 - tripleo::profile::base::nova::manage_migration: false
76 step_config: &step_config
77 get_attr: [NovaLibvirtBase, role_data, step_config]
79 config_volume: nova_libvirt
80 puppet_tags: nova_config
81 step_config: *step_config
85 - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
87 /var/lib/kolla/config_files/nova-libvirt.json:
88 command: /usr/sbin/libvirtd --config /etc/libvirt/libvirtd.conf
99 - [ {get_param: DockerNamespace}, {get_param: DockerLibvirtImage} ]
106 - {get_attr: [ContainersCommon, volumes]}
108 - /var/lib/kolla/config_files/nova-libvirt.json:/var/lib/kolla/config_files/config.json:ro
109 - /var/lib/config-data/nova_libvirt/etc/libvirt/:/etc/libvirt/:ro
110 - /lib/modules:/lib/modules:ro
113 - /sys/fs/cgroup:/sys/fs/cgroup
114 - /var/lib/nova:/var/lib/nova
115 # Needed to use host's virtlogd
116 - /var/run/libvirt:/var/run/libvirt
117 - /var/lib/libvirt:/var/lib/libvirt
118 - /etc/libvirt/qemu:/etc/libvirt/qemu
119 - /var/log/libvirt/qemu:/var/log/libvirt/qemu:ro
120 - /var/log/containers/nova:/var/log/nova
122 - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
124 - name: create libvirt persistent data directories
131 - /var/log/containers/nova
132 - name: set enable_package_install fact
134 enable_package_install: {get_param: EnablePackageInstall}
135 # We use virtlogd on host, so when using Deployed Server
136 # feature, we need to ensure libvirt is installed.
137 - name: install libvirt-daemon
141 when: enable_package_install
142 - name: start virtlogd socket
144 name: virtlogd.socket
147 when: enable_package_install
149 - name: Stop and disable libvirtd service
151 service: name=libvirtd state=stopped enabled=no