Skip to content

Commit

Permalink
Fixing upgrade N-1 error
Browse files Browse the repository at this point in the history
Signed-off-by: Tushar Tathgur <[email protected]>
  • Loading branch information
Tushar Tathgur authored and Tushar Tathgur committed Jul 25, 2023
1 parent 3465564 commit 9b16ef3
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,10 @@ jobs:
test-upgrade-from-N-1:
name: Upgrade from Theia version N-1
needs:
- build-spark-jobs-image
- build-clickhouse-monitor-image
- build-clickhouse-server-image
- build-clickhouse-server-image
- build-theia-manager-image
runs-on: [ubuntu-latest]
steps:
- name: Free disk space
Expand All @@ -195,22 +197,32 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Download Spark jobs images from previous jobs
uses: actions/download-artifact@v3
with:
name: spark-jobs
- name: Download ClickHouse monitor images from previous jobs
uses: actions/download-artifact@v3
with:
name: clickhouse-monitor
- name: Load Theia image
run: |
docker load -i clickhouse-monitor.tar
docker tag antrea/theia-clickhouse-monitor:latest projects.registry.vmware.com/antrea/theia-clickhouse-monitor:latest
- name: Download ClickHouse server images from previous jobs
uses: actions/download-artifact@v3
with:
name: clickhouse-server
- name: Download Theia Manager images from previous jobs
uses: actions/download-artifact@v3
with:
name: theia-manager
- name: Load Theia image
run: |
docker load -i spark-jobs.tar
docker tag antrea/theia-spark-jobs:latest projects.registry.vmware.com/antrea/theia-spark-jobs:latest
docker load -i clickhouse-monitor.tar
docker tag antrea/theia-clickhouse-monitor:latest projects.registry.vmware.com/antrea/theia-clickhouse-monitor:latest
docker load -i clickhouse-server.tar
docker tag antrea/theia-clickhouse-server:latest projects.registry.vmware.com/antrea/theia-clickhouse-server:latest
docker load -i theia-manager.tar
docker tag antrea/theia-manager:latest projects.registry.vmware.com/antrea/theia-manager:latest
- name: Install Kind
run: |
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-$(uname)-amd64
Expand Down Expand Up @@ -256,15 +268,15 @@ jobs:
uses: actions/download-artifact@v3
with:
name: clickhouse-monitor
- name: Load Theia image
- name: Load Theia clickhouse-monitor image
run: |
docker load -i clickhouse-monitor.tar
docker tag antrea/theia-clickhouse-monitor:latest projects.registry.vmware.com/antrea/theia-clickhouse-monitor:latest
- name: Download ClickHouse server images from previous jobs
uses: actions/download-artifact@v3
with:
name: clickhouse-server
- name: Load Theia image
- name: Load Theia clickhouse-server image
run: |
docker load -i clickhouse-server.tar
docker tag antrea/theia-clickhouse-server:latest projects.registry.vmware.com/antrea/theia-clickhouse-server:latest
Expand Down
1 change: 1 addition & 0 deletions ci/kind/kind-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ function load_images {
continue
fi
echo "loaded image $img"
df -h
done
set -e
}
Expand Down
11 changes: 9 additions & 2 deletions ci/kind/test-upgrade-theia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -189,20 +189,27 @@ DOCKER_IMAGES=("registry.k8s.io/e2e-test-images/agnhost:2.29" \
"projects.registry.vmware.com/antrea/antrea-ubuntu:$ANTREA_FROM_TAG" \
"projects.registry.vmware.com/antrea/theia-clickhouse-monitor:$THEIA_FROM_TAG" \
"projects.registry.vmware.com/antrea/theia-clickhouse-server:$CLICKHOUSE_FROM_TAG" \
"projects.registry.vmware.com/antrea/theia-manager:$THEIA_FROM_TAG" \
"antrea/antrea-ubuntu:latest")

# delete old images first
docker image prune -f --filter "until=1h" || true > /dev/null

for img in "${DOCKER_IMAGES[@]}"; do
echo "Pulling $img"
for i in `seq 3`; do
docker pull $img > /dev/null && break
df -h
sleep 1
done
done

DOCKER_IMAGES+=("projects.registry.vmware.com/antrea/theia-clickhouse-monitor:latest\
projects.registry.vmware.com/antrea/theia-clickhouse-server:latest")
projects.registry.vmware.com/antrea/theia-clickhouse-server:latest\
projects.registry.vmware.com/antrea/theia-manager:latest\
projects.registry.vmware.com/antrea/theia-spark-jobs:latest")

echo "Creating Kind cluster"
echo "Creating Kind cluster "
IMAGES="${DOCKER_IMAGES[@]}"
$THIS_DIR/kind-setup.sh create kind --images "$IMAGES"

Expand Down

0 comments on commit 9b16ef3

Please sign in to comment.