diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2017-11-10 18:01:53 +0100 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2017-11-10 18:37:37 +0100 |
commit | 8bdc7b442ebd9f162a36f568d9b61ecf85ab23cb (patch) | |
tree | 2de2d3f0c440c3787b442544235d20ace0098f25 /ci/deploy.sh | |
parent | eb4645206d6d74992fca3b8726ee2eebca97205f (diff) |
deploy.sh: Check hypervisor after prereq install
On a clean system (i.e. no libvirt installed), the prerequisites
should be installed first, before checking for hypervisor access.
While at it, add 'libvirt' to the list of prerequisites, as it is
not automatically required by the others.
Add a note in the documentation about libvirtd service not being
automatically started after installation on CentOS.
Change-Id: I29d94d4a56cd823362811e8fc9c076c83fb6c04c
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'ci/deploy.sh')
-rwxr-xr-x | ci/deploy.sh | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh index 5c2fec7bb..f4d334896 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -236,11 +236,6 @@ if [[ "$(sudo whoami)" != 'root' ]]; then exit 1 fi -if ! virsh list >/dev/null 2>&1; then - notify "[ERROR] This script requires hypervisor access\n" 1>&2 - exit 1 -fi - # Validate mandatory arguments are set if [ -z "${TARGET_LAB}" ] || [ -z "${TARGET_POD}" ] || \ [ -z "${DEPLOY_SCENARIO}" ]; then @@ -265,9 +260,11 @@ pushd "${DEPLOY_DIR}" > /dev/null # Install required packages [ -n "$(command -v apt-get)" ] && sudo apt-get install -y \ - git make rsync mkisofs curl virtinst cpu-checker qemu-kvm uuid-runtime + git make rsync mkisofs curl virtinst cpu-checker qemu-kvm uuid-runtime \ + libvirt-bin [ -n "$(command -v yum)" ] && sudo yum install -y --skip-broken \ - git make rsync genisoimage curl virt-install qemu-kvm util-linux + git make rsync genisoimage curl virt-install qemu-kvm util-linux \ + libvirt # For baremetal, python is indirectly required for PDF parsing if [ "${DEPLOY_TYPE}" = 'baremetal' ]; then @@ -277,6 +274,11 @@ if [ "${DEPLOY_TYPE}" = 'baremetal' ]; then python python-ipaddress python-jinja2 python-yaml fi +if ! virsh list >/dev/null 2>&1; then + notify "[ERROR] This script requires hypervisor access\n" 1>&2 + exit 1 +fi + # Clone git submodules and apply our patches make -C "${REPO_ROOT_PATH}/mcp/patches" deepclean patches-import |