Skip to content

Commit

Permalink
chore: update local clusters setup on CD and Hourly (#3727)
Browse files Browse the repository at this point in the history
* chore: remove k8 install for local clusters on CD

* added local cluster to longevity tests
  • Loading branch information
galibey authored Nov 20, 2023
1 parent ad005a5 commit 6dc55f8
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 48 deletions.
30 changes: 5 additions & 25 deletions .github/workflows/cd_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,12 @@ jobs:
with:
ref: ${{ needs.setup.pub_sha }}
- name: Set up K3d for Ubuntu
if: ${{ matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.cluster_type == 'k8' }}
run: |
curl -s https://raw.githubusercontent.com/rancher/k3d/main/install.sh | TAG=${{ env.K3D_VERSION }} bash
- name: Set up K8 for ubuntu(kind)
if: ${{ matrix.os == 'ubuntu-latest' }}
if: ${{ matrix.cluster_type == 'k8' }}
run: ./k8-util/cluster/reset-k3d.sh
- name: Install Docker for Mac
if: ${{ matrix.os == 'macos-12' }}
uses: docker-practice/actions-setup-docker@master
- name: Set up Kind for Mac
if: ${{ matrix.os == 'macos-12' }}
run: |
brew install kind
kind create cluster --config k8-util/cluster/kind.yaml
- name: Install Fluvio CLI
run: |
curl -fsS https://hub.infinyon.cloud/install/install.sh | FLUVIO_VERSION=latest bash
Expand All @@ -103,13 +95,8 @@ jobs:
timeout-minutes: 3
if: ${{ matrix.cluster_type == 'k8' }}
run: |
if [[ ${{ matrix.os }} == 'macos-12' ]]; then
export PROXY="--proxy-addr 127.0.0.1"
else
export PROXY=""
fi
FLUVIO_IMAGE_TAG_STRATEGY=version-git \
fluvio cluster start --spu-storage-size 1 $PROXY
fluvio cluster start --k8 --spu-storage-size 1
- name: Run E2E Test
timeout-minutes: 2
run: |
Expand All @@ -121,9 +108,7 @@ jobs:
date +"%Y-%m-%dT%H:%M:%S%z"
echo foo | fluvio produce ${{ env.TOPIC }}
fluvio consume ${{ env.TOPIC }} --start 0 -d | grep -F -w "foo"
# Delete the topic afterword but this looks to not work right now.
# fluvio topic delete "${{ env.TOPIC }}"
fluvio topic delete "${{ env.TOPIC }}"
- name: Run diagnostics
if: ${{ !success() }}
timeout-minutes: 5
Expand Down Expand Up @@ -258,18 +243,13 @@ jobs:
uses: mig4/setup-bats@v1
with:
bats-version: 1.2.1
- name: Setup K3d
run: curl -s https://raw.githubusercontent.com/rancher/k3d/main/install.sh | TAG=${{ env.K3D_VERSION }} bash
- name: Create K3d cluster
run: |
./k8-util/cluster/reset-k3d.sh
- name: Setup bin path
run: echo "~/.fluvio/bin" >> $GITHUB_PATH
- name: Install stable CLI and start Fluvio cluster
timeout-minutes: 10
run: |
curl -fsS https://hub.infinyon.cloud/install/install.sh | VERSION=${{ matrix.cluster_version }} bash
fluvio cluster start
fluvio cluster start --local
- name: CLI ${{ matrix.cli_version }} x Cluster ${{ matrix.cluster_version }}
run: |
make FLUVIO_BIN=~/.fluvio/bin/fluvio SKIP_SETUP=true CLI_VERSION=${{ matrix.cli_version }} CLUSTER_VERSION=${{ matrix.cluster_version }} cli-platform-cross-version-test
Expand Down
22 changes: 4 additions & 18 deletions .github/workflows/cd_dev_mac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,12 @@ jobs:
TOPIC: foobar
steps:
- uses: actions/checkout@v4
- name: Set up K3d for Ubuntu
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
curl -s https://raw.githubusercontent.com/rancher/k3d/main/install.sh | TAG=${{ env.K3D_VERSION }} bash
- name: Set up K8 for ubuntu(kind)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: ./k8-util/cluster/reset-k3d.sh
- name: Install Docker for Mac
if: ${{ matrix.os == 'macos-12' }}
if: ${{ matrix.cluster_type == 'k8' }}
uses: docker-practice/actions-setup-docker@master
timeout-minutes: 5
- name: Set up Kind for Mac
if: ${{ matrix.os == 'macos-12' }}
if: ${{ matrix.cluster_type == 'k8' }}
run: |
brew install kind
kind create cluster --config k8-util/cluster/kind.yaml
Expand All @@ -73,12 +66,7 @@ jobs:
timeout-minutes: 3
if: ${{ matrix.cluster_type == 'k8' }}
run: |
if [[ ${{ matrix.os }} == 'macos-12' ]]; then
export PROXY="--proxy-addr 127.0.0.1"
else
export PROXY=""
fi
fluvio cluster start --spu-storage-size 1 --image-version latest $PROXY
fluvio cluster start --k8 --spu-storage-size 1 --image-version latest --proxy-addr 127.0.0.1
- name: Run E2E Test
timeout-minutes: 2
run: |
Expand All @@ -90,9 +78,7 @@ jobs:
date +"%Y-%m-%dT%H:%M:%S%z"
echo foo | fluvio produce ${{ env.TOPIC }}
fluvio consume ${{ env.TOPIC }} --start 0 -d | grep -F -w "foo"
# Delete the topic afterword but this looks to not work right now.
# fluvio topic delete "${{ env.TOPIC }}"
fluvio topic delete "${{ env.TOPIC }}"
- name: Run diagnostics
if: ${{ !success() }}
timeout-minutes: 5
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/hourly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ concurrency:

on:
schedule:
- cron: "0 * * * *"
- cron: "0 */2 * * *"
# pull_request:
# branches: [master]
workflow_dispatch:
Expand Down Expand Up @@ -96,6 +96,7 @@ jobs:
topic: [1, 10]
topic_segment_bytes: [500000] # 500KB
topic_retention: [15s]
cluster_type: [local,k8]
env:
TEST_BINARY: fluvio-test-x86_64-unknown-linux-musl

Expand Down Expand Up @@ -145,8 +146,10 @@ jobs:
# If they don't match, then let's run the test

- name: Setup K3d
if: ${{ matrix.cluster_type == 'k8' }}
run: curl -s https://raw.githubusercontent.com/rancher/k3d/main/install.sh | TAG=${{ env.K3D_VERSION }} bash
- name: Create K3d cluster
if: ${{ matrix.cluster_type == 'k8' }}
run: |
./k8-util/cluster/reset-k3d.sh
- name: Install Fluvio CLI and start cluster
Expand All @@ -156,7 +159,7 @@ jobs:
- name: Start Fluvio Cluster
run: |
fluvio version
fluvio cluster start
fluvio cluster start --${{ matrix.cluster_type}}
# Disabled for now bc data load is unstable in CI
#- name: Look for longevity data
Expand Down
4 changes: 2 additions & 2 deletions tests/cli/cli-platform-cross-version.bats
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ setup_file() {
if [[ -z "$CI" ]];
then
echo "# Deleting cluster" >&3
$FLUVIO_BIN cluster delete
"$FLUVIO_BIN" cluster delete --local || "$FLUVIO_BIN" cluster delete
else
echo "# [CI MODE] Skipping initial cleanup" >&3
fi;
Expand All @@ -57,7 +57,7 @@ teardown_file() {
if [[ -z "$SKIP_CLEANUP" ]];
then
echo "# Deleting cluster" >&3
"$FLUVIO_BIN" cluster delete
"$FLUVIO_BIN" cluster delete --local || "$FLUVIO_BIN" cluster delete
else
echo "# Skipping cleanup" >&3
fi
Expand Down
2 changes: 1 addition & 1 deletion tests/upgrade-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function validate_cluster_stable() {
~/.fvm/bin/fvm switch stable

echo "Installing stable fluvio cluster"
$STABLE_FLUVIO cluster start
$STABLE_FLUVIO cluster start --k8
ci_check;

# Baseline: CLI version and platform version are expected to be the same
Expand Down

0 comments on commit 6dc55f8

Please sign in to comment.