-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Virtualization E2E tests on OpenStack (#1511)
* Avoid deleting previously installed CirrOS image. Only clean it up if the test downloaded it in the first place. Signed-off-by: Matthew Arnold <[email protected]> * Default OpenStack provider to no KVM emulation. Allow KVM emulation to be configured, and add an OpenStack provider that copies AWS except for leaving emulation turned off. Signed-off-by: Matthew Arnold <[email protected]> * Avoid trying to delete non-existent storage class. If the test did not need to create an immediate-mode storage class (because the default was already set to immediate), make sure it does not try to delete anything after the test is done. Previously this would cause an error after all the tests were run, even if they were all successful. Signed-off-by: Matthew Arnold <[email protected]> * Create WFFC storage class if default is Immediate. Otherwise the previously-default WFFC tests will all run with Immediate, and make the Immediate-specific tests redundant. Signed-off-by: Matthew Arnold <[email protected]> * Add test scripts for OpenStack. Can't just use AWS for everything after all. Signed-off-by: Matthew Arnold <[email protected]> --------- Signed-off-by: Matthew Arnold <[email protected]>
- Loading branch information
Showing
11 changed files
with
214 additions
and
25 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
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
17 changes: 17 additions & 0 deletions
17
tests/e2e/sample-applications/mongo-persistent/pvc/openstack.yaml
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,17 @@ | ||
apiVersion: v1 | ||
kind: List | ||
items: | ||
- apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: mongo | ||
namespace: mongo-persistent | ||
labels: | ||
app: mongo | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: ocs-storagecluster-ceph-rbd | ||
resources: | ||
requests: | ||
storage: 1Gi |
31 changes: 31 additions & 0 deletions
31
tests/e2e/sample-applications/mysql-persistent/pvc-twoVol/openstack.yaml
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,31 @@ | ||
apiVersion: v1 | ||
kind: List | ||
items: | ||
- apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: mysql | ||
namespace: mysql-persistent | ||
labels: | ||
app: mysql | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: ocs-storagecluster-ceph-rbd | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
- apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: applog | ||
namespace: mysql-persistent | ||
labels: | ||
app: todolist | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: ocs-storagecluster-ceph-rbd | ||
resources: | ||
requests: | ||
storage: 1Gi |
17 changes: 17 additions & 0 deletions
17
tests/e2e/sample-applications/mysql-persistent/pvc/openstack.yaml
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,17 @@ | ||
apiVersion: v1 | ||
kind: List | ||
items: | ||
- apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: mysql | ||
namespace: mysql-persistent | ||
labels: | ||
app: mysql | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: ocs-storagecluster-ceph-rbd | ||
resources: | ||
requests: | ||
storage: 1Gi |
15 changes: 15 additions & 0 deletions
15
tests/e2e/sample-applications/snapclass-csi/openstack.yaml
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,15 @@ | ||
apiVersion: v1 | ||
kind: List | ||
items: | ||
- apiVersion: snapshot.storage.k8s.io/v1 | ||
kind: VolumeSnapshotClass | ||
metadata: | ||
name: oadp-example-snapclass | ||
labels: | ||
velero.io/csi-volumesnapshot-class: 'true' | ||
driver: openshift-storage.rbd.csi.ceph.com | ||
deletionPolicy: Retain | ||
parameters: | ||
clusterID: openshift-storage | ||
csi.storage.k8s.io/snapshotter-secret-name: rook-csi-rbd-provisioner | ||
csi.storage.k8s.io/snapshotter-secret-namespace: openshift-storage |
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
cat > $TMP_DIR/oadpcreds <<EOF | ||
{ | ||
"spec": { | ||
"configuration":{ | ||
"velero":{ | ||
"defaultPlugins": [ | ||
"openshift", "aws" | ||
] | ||
} | ||
}, | ||
"backupLocations": [ | ||
{ | ||
"velero": { | ||
"provider": "aws", | ||
"config": { | ||
"profile": "$BSL_AWS_PROFILE", | ||
"region": "$BSL_REGION" | ||
}, | ||
"objectStorage":{ | ||
"bucket": "$BUCKET" | ||
} | ||
} | ||
} | ||
], | ||
"credential":{ | ||
"name": "$SECRET", | ||
"key": "cloud" | ||
}, | ||
"snapshotLocations": [ | ||
{ | ||
"velero": { | ||
"provider": "aws", | ||
"config": { | ||
"profile": "default", | ||
"region": "$VSL_REGION" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
EOF | ||
|
||
x=$(cat $TMP_DIR/oadpcreds); echo "$x" | grep -o '^[^#]*' > $TMP_DIR/oadpcreds |
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