From 38c0e4a3f4a6f041a8a63ca538fa4b19d21dc40a Mon Sep 17 00:00:00 2001 From: Vicente Cheng Date: Mon, 23 Sep 2024 23:12:44 +0800 Subject: [PATCH] ci: use k3s to deploy longhorn and node-disk-manager - we could drop rancher in this case Signed-off-by: Vicente Cheng (cherry picked from commit cf3d0b4a7c8112dda3852b30a159f277bc6a0515) --- .github/workflows/basic-ci.yaml | 19 ++++++++++--------- tests/integration/test_1_disk_hotplug_test.go | 4 ++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/basic-ci.yaml b/.github/workflows/basic-ci.yaml index a1b89364..55bf4b49 100644 --- a/.github/workflows/basic-ci.yaml +++ b/.github/workflows/basic-ci.yaml @@ -41,18 +41,19 @@ jobs: - name: "Local Deployment (Harvester+Longhorn+Node-Disk-Manager) for testing" id: vm_deploy run: | - rm -rf ndm-vagrant-rancherd - git clone https://github.com/harvester/vagrant-rancherd ndm-vagrant-rancherd - pushd ndm-vagrant-rancherd - ./new_cluster.sh - yq e -i ".longhorn_version = \"1.5.3\"" settings.yaml + rm -rf ndm-vagrant-k3s + git clone https://github.com/bk201/vagrant-k3s ndm-vagrant-k3s + pushd ndm-vagrant-k3s + yq e -i ".cluster_size = 1" settings.yaml + ./new-cluster.sh + yq e -i ".longhorn_version = \"1.7.1\"" settings.yaml ./scripts/deploy_longhorn.sh cp ../ci/scripts/deploy_ndm.sh ./deploy_ndm.sh ./deploy_ndm.sh popd - name: "Add disk" run: | - pushd ndm-vagrant-rancherd + pushd ndm-vagrant-k3s ./scripts/attach-disk.sh node1 sleep 30 popd @@ -63,14 +64,14 @@ jobs: cat ci/charts/ndm-override.yaml - name: "Upgrade NDM" run: | - pushd ndm-vagrant-rancherd + pushd ndm-vagrant-k3s cp ../ci/scripts/upgrade_ndm.sh ./upgrade_ndm.sh ./upgrade_ndm.sh popd - name: "Run Basic Test" id: basic-test run: | - pushd ndm-vagrant-rancherd + pushd ndm-vagrant-k3s vagrant ssh-config node1 > ../ssh-config cp kubeconfig ../kubeconfig popd @@ -83,6 +84,6 @@ jobs: - name: "Tear Down / Cleanup" if: steps.vm_deploy.conclusion == 'success' run: | - pushd ndm-vagrant-rancherd + pushd ndm-vagrant-k3s vagrant destroy -f --parallel popd diff --git a/tests/integration/test_1_disk_hotplug_test.go b/tests/integration/test_1_disk_hotplug_test.go index e1ee4c22..f5caf50b 100644 --- a/tests/integration/test_1_disk_hotplug_test.go +++ b/tests/integration/test_1_disk_hotplug_test.go @@ -30,11 +30,11 @@ import ( * * NOTE: The default qcow2 and xml location (created by initial operation) is `/tmp/hotplug_disks/`. * File names are `node1-sda.qcow2` and `node1-sda.xml`. - * The target node name is `ndm-vagrant-rancherd_node1`. + * The target node name is `ndm-vagrant-k3s_node1`. */ const ( - hotplugTargetNodeName = "ndm-vagrant-rancherd_node1" + hotplugTargetNodeName = "ndm-vagrant-k3s_node1" hotplugDiskXMLFileName = "/tmp/hotplug_disks/node1-sda.xml" hotplugTargetDiskName = "sda" )