forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kubevirt#2666 from slintes/backport-ocs-tests
[release-0.20] Backport of kubevirt#2617 and kubevirt#2636: VM tests with OCS disks and Block DV fix
- Loading branch information
Showing
21 changed files
with
575 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
851d37c4db3aac525847656472b5f23a5c90a79b | ||
3a398e0bd5bf61d9f42968a75dfc4066d0b18820 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Kubernetes 1.15.1 in ephemeral containers | ||
|
||
Provides a pre-deployed Kubernetes with version 1.15.1 purely in docker | ||
containers with qemu. The provided VMs are completely ephemeral and are | ||
recreated on every cluster restart. The KubeVirt containers are built on the | ||
local machine and are the pushed to a registry which is exposed at | ||
`localhost:5000`. | ||
|
||
## Bringing the cluster up | ||
|
||
```bash | ||
export KUBEVIRT_PROVIDER=k8s-1.15.1 | ||
export KUBEVIRT_NUM_NODES=2 # master + one node | ||
make cluster-up | ||
``` | ||
|
||
The cluster can be accessed as usual: | ||
|
||
```bash | ||
$ cluster/kubectl.sh get nodes | ||
NAME STATUS ROLES AGE VERSION | ||
node01 NotReady master 31s v1.15.1 | ||
node02 NotReady <none> 5s v1.15.1 | ||
``` | ||
|
||
## Bringing the cluster down | ||
|
||
```bash | ||
export KUBEVIRT_PROVIDER=k8s-1.15.1 | ||
make cluster-down | ||
``` | ||
|
||
This destroys the whole cluster. Recreating the cluster is fast, since k8s is | ||
already pre-deployed. The only state which is kept is the state of the local | ||
docker registry. | ||
|
||
## Destroying the docker registry state | ||
|
||
The docker registry survives a `make cluster-down`. It's state is stored in a | ||
docker volume called `kubevirt_registry`. If the volume gets too big or the | ||
volume contains corrupt data, it can be deleted with | ||
|
||
```bash | ||
docker volume rm kubevirt_registry | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
image="k8s-1.15.1@sha256:14d7b1806f24e527167d2913deafd910ea46e69b830bf0b094dde35ba961b159" | ||
|
||
source ${KUBEVIRTCI_PATH}/cluster/ephemeral-provider-common.sh | ||
|
||
function up() { | ||
${_cli} run $(_add_common_params) | ||
|
||
# Copy k8s config and kubectl | ||
${_cli} scp --prefix $provider_prefix /usr/bin/kubectl - >${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/.kubectl | ||
chmod u+x ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/.kubectl | ||
${_cli} scp --prefix $provider_prefix /etc/kubernetes/admin.conf - >${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/.kubeconfig | ||
|
||
# Set server and disable tls check | ||
export KUBECONFIG=${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/.kubeconfig | ||
${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/.kubectl config set-cluster kubernetes --server=https://$(_main_ip):$(_port k8s) | ||
${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/.kubectl config set-cluster kubernetes --insecure-skip-tls-verify=true | ||
|
||
# Make sure that local config is correct | ||
prepare_config | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
7ba5a0fca723a32aca204f778f6776811b4d94fa | ||
d749b29f7a2fa6cb7b46c3590040f2a23e5704e0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.