Skip to content

Commit

Permalink
ci(CSI-213): add NFS sanity
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyberezansky committed Sep 24, 2024
1 parent 4ea959e commit 265d9ab
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 3 deletions.
36 changes: 33 additions & 3 deletions .github/workflows/sanity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,54 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- run: docker-compose -f tests/csi-sanity/docker-compose-snapshotcaps.yaml up $COMPOSE_DEFAULTS
env:
SANITY_FUNCTION: directory_volume_and_snapshots
SANITY_FUNCTION: directory_volume_and_snapshots

snaphot_volumes_with_2nd_level_shapshots:
directory_volume_and_snapshots_nfs:
if: success() || failure()
needs: directory_volume_and_snapshots
runs-on: self-hosted
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- run: docker-compose -f tests/csi-sanity/docker-compose-nfs-snapshotcaps.yaml up $COMPOSE_DEFAULTS
env:
SANITY_FUNCTION: directory_volume_and_snapshots_nfs

snaphot_volumes_with_2nd_level_shapshots:
if: success() || failure()
needs: directory_volume_and_snapshots_nfs
runs-on: self-hosted
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- run: docker-compose -f tests/csi-sanity/docker-compose-snapshotcaps.yaml up $COMPOSE_DEFAULTS
env:
SANITY_FUNCTION: snaphot_volumes_with_2nd_level_shapshots

snaphot_volumes_with_2nd_level_shapshots_nfs:
if: success() || failure()
needs: snaphot_volumes_with_2nd_level_shapshots
runs-on: self-hosted
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- run: docker-compose -f tests/csi-sanity/docker-compose-nfs-snapshotcaps.yaml up $COMPOSE_DEFAULTS
env:
SANITY_FUNCTION: snaphot_volumes_with_2nd_level_shapshots_nfs

filesystem_volumes:
if: success() || failure()
needs: snaphot_volumes_with_2nd_level_shapshots
needs: snaphot_volumes_with_2nd_level_shapshots_nfs
runs-on: self-hosted
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- run: docker-compose -f tests/csi-sanity/docker-compose-snapshotcaps.yaml up $COMPOSE_DEFAULTS
env:
SANITY_FUNCTION: filesystem_volumes

filesystem_volumes_nfs:
if: success() || failure()
needs: filesystem_volumes
runs-on: self-hosted
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- run: docker-compose -f tests/csi-sanity/docker-compose-snapshotcaps.yaml up $COMPOSE_DEFAULTS
env:
SANITY_FUNCTION: filesystem_volumes_nfs
40 changes: 40 additions & 0 deletions tests/csi-sanity/docker-compose-nfs-snapshotcaps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: '3.8'

services:
plugin_controller:
image: sanity
command: wekafsplugin -nodeid 1 -v ${PLUGIN_VERBOSITY} --allowinsecurehttps --endpoint=unix://tmp/weka-csi-test/controller.sock --debugpath=/tmp/weka-csi-test/filesystems -metricsport=9091 --csimode=controller -enablemetrics -allowautofscreation -allowautofsexpansion -allowsnapshotsoflegacyvolumes -alwaysallowsnapshotvolumes -usenfs -interfacegroupname=NFS
volumes:
- test-volume:/tmp/weka-csi-test
privileged: true
network_mode: host
healthcheck:
test: test -f /tmp/weka-csi-test/controller.sock
start_period: 1s
timeout: 1s
retries: 10
interval: 3s
plugin_node:
image: sanity
command: wekafsplugin -nodeid 1 -v ${PLUGIN_VERBOSITY} --allowinsecurehttps --endpoint=unix://tmp/weka-csi-test/node.sock --debugpath=/tmp/weka-csi-test/filesystems -metricsport=9092 --csimode=node -enablemetrics -allowautofscreation -allowautofsexpansion -allowsnapshotsoflegacyvolumes -alwaysallowsnapshotvolumes -usenfs -interfacegroupname=NFS
volumes:
- test-volume:/tmp/weka-csi-test
privileged: true
network_mode: host
healthcheck:
test: test -f /tmp/weka-csi-test/node.sock
start_period: 1s
timeout: 1s
retries: 10
interval: 3s
sanity:
image: sanity
command: run_sanity ${SANITY_FUNCTION} ${SANITY_VERBOSITY}
network_mode: host
volumes:
- test-volume:/tmp/weka-csi-test
depends_on:
- plugin_controller
- plugin_node
volumes:
test-volume:
16 changes: 16 additions & 0 deletions tests/csi-sanity/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,22 @@ services:
privileged: true
ports:
- "9004:9090"
plugin_controller_nfs:
build: .
command: wekafsplugin -nodeid 1 -v 9 --allowinsecurehttps --endpoint=unix://tmp/weka-csi-test/controller-nfs.sock --debugpath=/tmp/weka-csi-test/filesystems --csimode=controller -enablemetrics -allowautofscreation -allowautofsexpansion -allowsnapshotsoflegacyvolumes -alwaysallowsnapshotvolumes -usenfs
volumes:
- test-volume:/tmp/weka-csi-test
privileged: true
ports:
- "9005:9090"
plugin_node_nfs:
build: .
command: wekafsplugin -nodeid 1 -v 9 --allowinsecurehttps --endpoint=unix://tmp/weka-csi-test/node.sock --debugpath=/tmp/weka-csi-test/filesystems --csimode=node -enablemetrics -allowautofscreation -allowautofsexpansion -allowsnapshotsoflegacyvolumes -alwaysallowsnapshotvolumes -usenfs
volumes:
- test-volume:/tmp/weka-csi-test
privileged: true
ports:
- "9006:9090"
sanity:
build: .
command: run_sanity
Expand Down
15 changes: 15 additions & 0 deletions tests/csi-sanity/ga_docker_run_sanity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ csi-sanity -csi.stagingdir /tmp/csi-test-staging \
-csi.testvolumeparameters /test/wekafs-dirv1.yaml
}

directory_volume_and_snapshots_nfs() {
echo "RUNNING IN NFS MODE"
directory_volume_and_snapshots "$@"
}

# ---------------------- SNAPSHOT VOLUME WITH API BINDING AND SNAPSHOTS ----------------------
snaphot_volumes_with_2nd_level_shapshots() {
echo "SNAPSHOT VOLUMES WITH 2nd LEVEL SNAPSHOTS STARTED"
Expand All @@ -74,6 +79,11 @@ csi-sanity -csi.stagingdir /tmp/csi-test-staging \
-ginkgo.progress $1\
-csi.testvolumeparameters /test/wekafs-snapvol.yaml
}
# ---------------------- SNAPSHOT VOLUME WITH API BINDING AND SNAPSHOTS ----------------------
snaphot_volumes_with_2nd_level_shapshots_nfs() {
echo "RUNNING IN NFS MODE"
snaphot_volumes_with_2nd_level_shapshots "$@"
}

# ---------------------- FILESYSTEM VOLUME WITH API BINDING AND SNAPSHOTS ----------------------
filesystem_volumes() {
Expand All @@ -89,4 +99,9 @@ csi-sanity -csi.stagingdir /tmp/csi-test-staging \
-csi.testvolumeparameters /test/wekafs-fs.yaml
}

filesystem_volumes_nfs() {
echo "RUNNING IN NFS MODE"
filesystem_volumes "$@"
}

"$@"

0 comments on commit 265d9ab

Please sign in to comment.