mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
ci: use VM_DRIVER=podman for AWS virtual-machines
With the CentOS CI machines moving to AWS EC2 virtual-machines, there is no option to run minikube with a VM anymore. Instead, run minikube with the Podman driver and partition the extra xvdb EBS volume into three pieces. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
7681ef27ff
commit
893da82f71
@ -7,6 +7,12 @@
|
||||
# well.
|
||||
#
|
||||
|
||||
# no need to ssh-copy images if there is no VM
|
||||
if [[ "${VM_DRIVER}" == "none" ]] || [[ "${VM_DRIVER}" == "podman" ]]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# fail when a command returns an error
|
||||
set -e -o pipefail
|
||||
|
||||
|
@ -64,7 +64,7 @@ function set_env() {
|
||||
CSI_IMAGE_VERSION=${CSI_IMAGE_VERSION:-"canary"}
|
||||
export GO111MODULE="on"
|
||||
export TEST_COVERAGE="stdout"
|
||||
export VM_DRIVER="kvm2"
|
||||
export VM_DRIVER="podman"
|
||||
export MEMORY="14336"
|
||||
export NUM_DISKS="3"
|
||||
export DISK_SIZE="32gb"
|
||||
@ -86,13 +86,32 @@ function set_env() {
|
||||
export PATH=$PATH:/usr/local/bin
|
||||
}
|
||||
|
||||
# prepare_disks uses the /dev/xvdb EBS device (40GB) and creates 3 12GB
|
||||
# partitions on it. The function uses 'fdisk' with a script that has empty
|
||||
# lines for default values while fdisk prompts for them.
|
||||
function prepare_disks() {
|
||||
fdisk /dev/xvdb << EOS
|
||||
n
|
||||
p
|
||||
|
||||
|
||||
+12G
|
||||
n
|
||||
p
|
||||
|
||||
|
||||
+12G
|
||||
n
|
||||
p
|
||||
|
||||
|
||||
+12G
|
||||
w
|
||||
EOS
|
||||
}
|
||||
|
||||
function install_minikube()
|
||||
{
|
||||
dnf -y groupinstall 'Virtualization Host'
|
||||
systemctl enable --now libvirtd
|
||||
# Warning about "No ACPI IVRS table found", not critical
|
||||
virt-host-validate || true
|
||||
|
||||
# minikube needs socat
|
||||
dnf -y install socat
|
||||
|
||||
@ -107,9 +126,6 @@ function install_minikube()
|
||||
# minikube 1.25.2 adds the GOARCH to the path ("amd64" in our CI)
|
||||
cp ~/.minikube/cache/linux/amd64/"${k8s_version}"/kubectl /usr/bin/
|
||||
fi
|
||||
|
||||
# scan for extra disks
|
||||
minikube ssh 'echo 1 | sudo tee /sys/bus/pci/rescan > /dev/null ; dmesg | grep virtio_blk'
|
||||
}
|
||||
|
||||
function deploy_rook()
|
||||
@ -129,6 +145,9 @@ function deploy_rook()
|
||||
# Set environment variables
|
||||
set_env
|
||||
|
||||
# create disk partitions
|
||||
prepare_disks
|
||||
|
||||
# prepare minikube environment
|
||||
install_minikube
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user