-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
212 additions
and
63 deletions.
There are no files selected for viewing
72 changes: 72 additions & 0 deletions
72
.github/workflows/deploy-rook-ceph-on-two-k8s-clusters.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,72 @@ | ||
name: "two k8s cluster" | ||
on: | ||
pull_request: | ||
paths-ignore: | ||
- "**/*.md" | ||
- "CODEOWNERS" | ||
push: | ||
paths-ignore: | ||
- "**/*.md" | ||
- "CODEOWNERS" | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
test: | ||
runs-on: "ubuntu-22.04" | ||
env: | ||
MINIKUBE_HOME: ${{ github.workspace }}/test/e2e/bin | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: "go.mod" | ||
- run: env | grep MINIKUBE_HOME | ||
- run: sudo apt-get update | ||
- run: sudo apt-get purge -y apport apport-symptoms fwupd nano netplan.io popularity-contest unattended-upgrades update-manager-core snapd | ||
- run: sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true | ||
- run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /usr/local/share/powershell /usr/share/swift /usr/local/.ghcup /usr/lib/jvm || true | ||
- run: sudo apt-get purge -y $(dpkg-query -W | grep nginx | awk '{print $1}') | ||
- run: sudo apt-get purge -y aria2 ansible azure-cli shellcheck rpm xorriso zsync firefox gfortran-9 google-chrome-stable google-cloud-sdk | ||
- run: sudo apt-get purge -y imagemagick libmagickcore-dev libmagickwand-dev libmagic-dev ant ant-optional mercurial apt-transport-https | ||
- run: sudo apt-get purge -y mono-complete unixodbc-dev yarn chrpath libxft-dev libfreetype6-dev libfontconfig1 libfontconfig1-dev | ||
- run: sudo apt-get purge -y snmp pollinate libpq-dev postgresql-client powershell ruby-full sphinxsearch subversion azure-cli | ||
- run: sudo apt-get purge -y $(dpkg-query -W | grep dotnet | awk '{print $1}') | ||
- run: sudo apt-get autoremove -y >/dev/null 2>&1 | ||
- run: sudo apt-get autoclean -y >/dev/null 2>&1 | ||
- name: "KVM setup" | ||
run: |- | ||
VIRTUALIZATION_SUPPORT=$(grep -E -q 'vmx|svm' /proc/cpuinfo && echo yes || echo no) | ||
echo ${VIRTUALIZATION_SUPPORT} | ||
if [ "${VIRTUALIZATION_SUPPORT}" != "yes" ]; then | ||
exit 1 | ||
fi | ||
sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils | ||
kvm-ok | ||
sudo adduser `id -un` libvirt | ||
sudo adduser `id -un` kvm | ||
virsh list --all | ||
sudo ls -la /var/run/libvirt/libvirt-sock | ||
sudo chmod 777 /var/run/libvirt/libvirt-sock | ||
sudo ls -la /var/run/libvirt/libvirt-sock | ||
ls -l /dev/kvm | ||
sudo rmmod kvm_amd | ||
sudo rmmod kvm | ||
sudo modprobe -a kvm | ||
sudo modprobe -a kvm_amd | ||
- run: |- | ||
make -C test/e2e setup | ||
ln -s $(pwd)/test/e2e/bin/kubectl-1.28.3 test/e2e/bin/kubectl | ||
- run: |- | ||
make -C test/e2e launch-minikube PROFILE=profile1 | ||
make -C test/e2e launch-minikube PROFILE=profile2 | ||
- name: "Deploy primary Rook/Ceph cluster" | ||
run: |- | ||
./test/e2e/bin/kubectl config use-context profile1 | ||
make -C test/e2e launch-single-rook-ceph PROFILE=profile1 | ||
make -C test/e2e setup-single-components | ||
- name: "Deploy secondary Rook/Ceph cluster" | ||
run: |- | ||
./test/e2e/bin/kubectl config use-context profile2 | ||
make -C test/e2e launch-single-rook-ceph PROFILE=profile1 | ||
make -C test/e2e setup-single-components |
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,83 @@ | ||
name: "inter-cluster connection" | ||
on: | ||
pull_request: | ||
paths-ignore: | ||
- "**/*.md" | ||
- "CODEOWNERS" | ||
push: | ||
paths-ignore: | ||
- "**/*.md" | ||
- "CODEOWNERS" | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
test: | ||
runs-on: "ubuntu-22.04" | ||
env: | ||
MINIKUBE_HOME: ${{ github.workspace }}/test/e2e/bin | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: "go.mod" | ||
- run: env | grep MINIKUBE_HOME | ||
- run: sudo apt-get update | ||
- run: sudo apt-get purge -y apport apport-symptoms fwupd nano netplan.io popularity-contest unattended-upgrades update-manager-core snapd | ||
- run: sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true | ||
- run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /usr/local/share/powershell /usr/share/swift /usr/local/.ghcup /usr/lib/jvm || true | ||
- run: sudo apt-get purge -y $(dpkg-query -W | grep nginx | awk '{print $1}') | ||
- run: sudo apt-get purge -y aria2 ansible azure-cli shellcheck rpm xorriso zsync firefox gfortran-9 google-chrome-stable google-cloud-sdk | ||
- run: sudo apt-get purge -y imagemagick libmagickcore-dev libmagickwand-dev libmagic-dev ant ant-optional mercurial apt-transport-https | ||
- run: sudo apt-get purge -y mono-complete unixodbc-dev yarn chrpath libxft-dev libfreetype6-dev libfontconfig1 libfontconfig1-dev | ||
- run: sudo apt-get purge -y snmp pollinate libpq-dev postgresql-client powershell ruby-full sphinxsearch subversion azure-cli | ||
- run: sudo apt-get purge -y $(dpkg-query -W | grep dotnet | awk '{print $1}') | ||
- run: sudo apt-get autoremove -y >/dev/null 2>&1 | ||
- run: sudo apt-get autoclean -y >/dev/null 2>&1 | ||
- name: "KVM setup" | ||
run: |- | ||
VIRTUALIZATION_SUPPORT=$(grep -E -q 'vmx|svm' /proc/cpuinfo && echo yes || echo no) | ||
echo ${VIRTUALIZATION_SUPPORT} | ||
if [ "${VIRTUALIZATION_SUPPORT}" != "yes" ]; then | ||
exit 1 | ||
fi | ||
sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils | ||
kvm-ok | ||
sudo adduser `id -un` libvirt | ||
sudo adduser `id -un` kvm | ||
virsh list --all | ||
sudo ls -la /var/run/libvirt/libvirt-sock | ||
sudo chmod 777 /var/run/libvirt/libvirt-sock | ||
sudo ls -la /var/run/libvirt/libvirt-sock | ||
ls -l /dev/kvm | ||
sudo rmmod kvm_amd | ||
sudo rmmod kvm | ||
sudo modprobe -a kvm | ||
sudo modprobe -a kvm_amd | ||
- run: |- | ||
make -C test/e2e setup | ||
ln -s $(pwd)/test/e2e/bin/kubectl-1.28.3 test/e2e/bin/kubectl | ||
- run: |- | ||
make -C test/e2e launch-minikube PROFILE=profile1 | ||
make -C test/e2e launch-minikube PROFILE=profile2 | ||
- name: "deploy components" | ||
id: deploy-components | ||
run: |- | ||
./test/e2e/bin/kubectl --context profile2 create ns test | ||
./test/e2e/bin/kubectl --context profile2 apply -f test/e2e/nginx.yaml | ||
./test/e2e/bin/kubectl --context profile2 apply -f test/e2e/svcnp.yaml | ||
./test/e2e/bin/minikube -p profile2 service list | ||
SERVICE=$(./test/e2e/bin/minikube -p profile2 service list | grep my-nginx-np | cut -d "|" -f 5 | tr -d "[[:space:]]" | sed 's/\//\\\//g') | ||
echo "service name: ${SERVICE}" | ||
echo "service-name=${SERVICE}" >> "$GITHUB_OUTPUT" | ||
./test/e2e/bin/kubectl wait deploy -n test --timeout=2m --for=condition=available my-nginx | ||
- name: "Run and wait curl job" | ||
run: |- | ||
sed -i "s/placeholder/${{ steps.deploy-components.outputs.service-name }}/" test/e2e/job.yaml | ||
./test/e2e/bin/kubectl --context profile1 apply -f test/e2e/job.yaml | ||
./test/e2e/bin/kubectl --context profile1 wait job --for=condition=complete --timeout=2m curl | ||
PODS=$(./test/e2e/bin/kubectl --context profile1 get pod | grep curl | awk '{print $1}') | ||
for POD in ${PODS}; do | ||
echo "POD: ${POD}" | ||
./test/e2e/bin/kubectl --context profile1 logs ${POD} | ||
done |
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