diff --git a/elements/boot-stack/README.md b/elements/boot-stack/README.md index 56fb0aec0..973d6f29c 100644 --- a/elements/boot-stack/README.md +++ b/elements/boot-stack/README.md @@ -4,10 +4,10 @@ Description ----------- This element contains nova, glance, and keystone services with a default -configuration for nova-baremetal operation. If building for baremetal -deployments be sure to also include the nova-baremetal element, which is not -needed for 'overcloud' (KVM/Xen) deployments and thus is not depended on by -boot-stack. +configuration for nova-baremetal operation. + +When building an image containing boot-stack be sure to add either nova-kvm or +nova-baremetal to enabled the appropriate hypervisor. Basic Usage diff --git a/elements/nova-compute/install.d/80-nova-compute b/elements/nova-compute/install.d/80-nova-compute index 805b9c751..6150dce3e 100755 --- a/elements/nova-compute/install.d/80-nova-compute +++ b/elements/nova-compute/install.d/80-nova-compute @@ -68,16 +68,6 @@ eof # Used by all compute install-packages dnsmasq dnsmasq-utils ebtables -# for libvirt clouds only -install-packages libvirt-bin python-libvirt kvm pm-utils syslinux qemu-utils - -# Fedora don't always have the libvirtd group created -if ! grep ^libvirtd /etc/group > /dev/null 2>&1; then - groupadd -f libvirtd -fi - -usermod -a -G libvirtd nova - if [ -d /etc/init ]; then install_dnsmasq_upstart elif [ -d /lib/systemd/system ]; then @@ -92,7 +82,6 @@ elif [ -f /usr/share/syslinux/pxelinux.0 ]; then fi os-svc-daemon nova-compute nova nova-compute "--config-dir /etc/nova" -os-svc-daemon nova-novncproxy nova nova-novncproxy "--config-dir /etc/nova" os-svc-daemon nova-baremetal-deploy-helper nova nova-baremetal-deploy-helper "--config-dir /etc/nova" chown -R nova:nova /var/lib/misc/ diff --git a/elements/nova-compute/os-refresh-config/post-configure.d/80-nova-compute b/elements/nova-compute/os-refresh-config/post-configure.d/80-nova-compute index a14f16319..4fc570bb9 100755 --- a/elements/nova-compute/os-refresh-config/post-configure.d/80-nova-compute +++ b/elements/nova-compute/os-refresh-config/post-configure.d/80-nova-compute @@ -5,13 +5,4 @@ modprobe nbd || true chown -R nova:nova /var/run/nova -compute_driver=$(os-config-applier --type raw --key nova.compute_driver) -if [ "$compute_driver" != "baremetal.driver.BareMetalDriver" ] ; then - mkdir -p /var/lib/nova/instances/_base - chown nova:kvm /var/lib/nova/instances - chown nova:kvm /var/lib/nova/instances/_base - chmod 750 /var/lib/nova/instances - chmod 750 /var/lib/nova/instances/_base -fi - service nova-compute restart diff --git a/elements/nova-kvm/README.md b/elements/nova-kvm/README.md new file mode 100644 index 000000000..0a23b9fe1 --- /dev/null +++ b/elements/nova-kvm/README.md @@ -0,0 +1,4 @@ +Nova Compute KVM +---------------- + +Software install and configuration hooks for Nova with KVM. diff --git a/elements/nova-kvm/element-deps b/elements/nova-kvm/element-deps new file mode 100644 index 000000000..ebf043fc9 --- /dev/null +++ b/elements/nova-kvm/element-deps @@ -0,0 +1,2 @@ +nova-compute +os-refresh-config diff --git a/elements/nova-kvm/install.d/80-nova-kvm b/elements/nova-kvm/install.d/80-nova-kvm new file mode 100755 index 000000000..9760f992e --- /dev/null +++ b/elements/nova-kvm/install.d/80-nova-kvm @@ -0,0 +1,14 @@ +#!/bin/bash +set -eux + +# for libvirt clouds only +install-packages libvirt-bin python-libvirt kvm pm-utils syslinux qemu-utils + +# Fedora don't always have the libvirtd group created +if ! grep ^libvirtd /etc/group > /dev/null 2>&1; then + groupadd -f libvirtd +fi + +usermod -a -G libvirtd nova + +os-svc-daemon nova-novncproxy nova nova-novncproxy "--config-dir /etc/nova" diff --git a/elements/nova-kvm/os-refresh-config/configure.d/80-nova-kvm b/elements/nova-kvm/os-refresh-config/configure.d/80-nova-kvm new file mode 100755 index 000000000..02a293256 --- /dev/null +++ b/elements/nova-kvm/os-refresh-config/configure.d/80-nova-kvm @@ -0,0 +1,8 @@ +#!/bin/bash +set -eux + +mkdir -p /var/lib/nova/instances/_base +chown nova:kvm /var/lib/nova/instances +chown nova:kvm /var/lib/nova/instances/_base +chmod 750 /var/lib/nova/instances +chmod 750 /var/lib/nova/instances/_base