Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
Use minishift with latest kubevirt
Browse files Browse the repository at this point in the history
  • Loading branch information
mmazur committed Apr 29, 2019
1 parent ed6b332 commit b08f8fd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 10 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,27 @@ install:
- sudo pip install -r requirements-dev.txt
jobs:
include:
- stage: Tests
name: "Default (minikube with latest k8s)"
- name: "minishift"
env:
- CPLATFORM=minishift
- KUBEVIRT=v0.16.0
- USE_OPERATOR=yes
- ENABLE_DATAVOLUMES=yes

cache:
- pip
- directories:
- cache
- "~/.minikube/cache"
- "~/.minishift/cache"
before_script:
## FIXME Workaround for https://github.com/kubernetes/kubernetes/issues/61058
### And https://github.com/LiliC/travis-minikube/blob/e0f26f7b388057f51a0e2558afd5f990e07b6c49/.travis.yml#L11
- sudo mount --make-rshared /

- bash -x ci/prepare-host $CPLATFORM
- bash -x ci/prepare-host virtctl
- bash -x ci/start-cluster $CPLATFORM $CVER
- bash -x ci/deploy-kubevirt $CPLATFORM
- bash -x ci/prepare-host virtctl $KUBEVIRT
- bash -x ci/start-cluster $CPLATFORM
- bash -x ci/deploy-kubevirt $CPLATFORM $KUBEVIRT

script:
- timeout 20m bash -x test.sh
Expand Down
16 changes: 6 additions & 10 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
#!/bin/bash

echo "$(minikube ip) minikube" | sudo tee -a /etc/hosts

## No HW virt
kubectl create configmap -n kubevirt kubevirt-config --from-literal debug.useEmulation=true
kubectl scale --replicas=0 deployment/virt-controller -n kubevirt
kubectl scale --replicas=2 deployment/virt-controller -n kubevirt
echo "$(minishift ip) minishift" | sudo tee -a /etc/hosts

## Prepare CDI
export CDI_VERSION=v1.5.0
kubectl apply -f https://github.com/kubevirt/containerized-data-importer/releases/download/$CDI_VERSION/cdi-controller.yaml
export CDI_VERSION=$(curl https://github.com/kubevirt/containerized-data-importer/releases/latest | grep -o "v[0-9]\.[0-9]*\.[0-9]*")
oc create -f https://github.com/kubevirt/containerized-data-importer/releases/download/$CDI_VERSION/cdi-operator.yaml
oc create -f https://github.com/kubevirt/containerized-data-importer/releases/download/$CDI_VERSION/cdi-operator-cr.yaml

get_remaining_pods() {
kubectl get pods \
oc get pods \
--all-namespaces \
--field-selector=status.phase!=Running,status.phase!=Succeeded ;
}
Expand All @@ -21,7 +17,7 @@ sleep 6;

while [[ "$( get_remaining_pods 2>&1 | wc -l)" -gt 2 ]];
do
kubectl get pods --all-namespaces
oc get pods --all-namespaces
sleep 6;
done

Expand Down

0 comments on commit b08f8fd

Please sign in to comment.