Skip to content

Commit

Permalink
ci: support v2 data engine for hal cluster
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Chiu <yang.chiu@suse.com>
  • Loading branch information
yangchiu authored and khushboo-rancher committed Oct 25, 2024
1 parent f78ae2c commit 942e57e
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
5 changes: 4 additions & 1 deletion e2e/keywords/common.resource
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*** Settings ***
Documentation Common keywords
Library OperatingSystem
Library ../libs/keywords/common_keywords.py
Library ../libs/keywords/deployment_keywords.py
Library ../libs/keywords/network_keywords.py
Expand Down Expand Up @@ -30,8 +31,10 @@ Set test environment

update_setting v2-data-engine true
${worker_nodes}= get_worker_nodes
${host_provider}= Get Environment Variable HOST_PROVIDER
${disk_path}= Set Variable If "${host_provider}" == "harvester" /dev/vdc /dev/xvdh
FOR ${worker_node} IN @{worker_nodes}
add_disk ${worker_node} block /dev/xvdh
add_disk ${worker_node} block ${disk_path}
END

Cleanup test resources
Expand Down
2 changes: 1 addition & 1 deletion pipelines/e2e/scripts/longhorn-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ create_instance_mapping_configmap(){
}

longhornctl_check(){
curl -L https://github.com/longhorn/cli/releases/download/v1.7.1-rc2/longhornctl-linux-amd64 -o longhornctl
curl -L https://github.com/longhorn/cli/releases/download/v1.7.2/longhornctl-linux-amd64 -o longhornctl
chmod +x longhornctl
./longhornctl install preflight
./longhornctl check preflight
Expand Down
2 changes: 1 addition & 1 deletion test_framework/scripts/longhorn-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ create_aws_secret(){


longhornctl_check(){
curl -L https://github.com/longhorn/cli/releases/download/v1.7.1-rc2/longhornctl-linux-amd64 -o longhornctl
curl -L https://github.com/longhorn/cli/releases/download/v1.7.2/longhornctl-linux-amd64 -o longhornctl
chmod +x longhornctl
./longhornctl install preflight
./longhornctl check preflight
Expand Down
28 changes: 27 additions & 1 deletion test_framework/terraform/harvester/ubuntu/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,14 @@ resource "rancher2_machine_config_v2" "e2e-machine-config" {
disk_info = <<EOF
{
"disks": [{
"imageName": "longhorn-qa/image-nbv7f",
"imageName": "longhorn-qa/image-kkkjv",
"size": 100,
"bootOrder": 1
},
{
"storageClassName": "harvester-longhorn",
"size": 100,
"bootOrder": 2
}]
}
EOF
Expand All @@ -74,11 +79,32 @@ package_update: true
packages:
- qemu-guest-agent
- iptables
- cryptsetup
- dmsetup
runcmd:
- - systemctl
- enable
- '--now'
- qemu-guest-agent.service
- apt-get update
- apt-get install -y linux-modules-extra-`uname -r`
- systemctl stop multipathd.service
- systemctl stop multipathd.socket
- systemctl disable multipathd.service
- systemctl disable multipathd.socket
- modprobe uio
- modprobe uio_pci_generic
- modprobe vfio_pci
- modprobe nvme-tcp
- modprobe dm_crypt
- touch /etc/modules-load.d/modules.conf
- echo uio >> /etc/modules-load.d/modules.conf
- echo uio_pci_generic >> /etc/modules-load.d/modules.conf
- echo vfio_pci >> /etc/modules-load.d/modules.conf
- echo nvme-tcp >> /etc/modules-load.d/modules.conf
- echo dm_crypt >> /etc/modules-load.d/modules.conf
- echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
- echo "vm.nr_hugepages=1024" >> /etc/sysctl.conf
EOF
}
}
Expand Down

0 comments on commit 942e57e

Please sign in to comment.