From bdf5e3e45921e4d8fbf6d23140c90954912ddf2f Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Sun, 12 Jan 2025 13:57:08 +0000 Subject: [PATCH 01/19] Run CI with minikube Signed-off-by: Klaus Ma --- .github/workflows/e2e.yaml | 14 ++++++-------- Makefile | 2 +- client/rust/tests/integration_test.rs | 2 +- docker/Dockerfile.console | 2 +- docker/Dockerfile.fem | 2 +- docker/Dockerfile.fsm | 2 +- installer/fsm-service.yaml | 4 +++- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 04af590..33ed605 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -33,14 +33,12 @@ jobs: with: command: make args: build - - name: Install supervisord - run: | - sudo apt-get update && sudo apt-get install -y supervisor - - name: Start supervisord - run: | - mkdir -p ci/logs - cp -r session_manager/migrations . - supervisord -c ci/supervisord.conf + - name: Setup Minikube + uses: hiberbee/github-action-minikube@1.5.0 + - name: Run Skaffold pipeline as action + uses: hiberbee/github-action-skaffold@1.19.0 + with: + command: run - name: Run E2E Test run: | cargo make test diff --git a/Makefile b/Makefile index fb741c9..61eae19 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ FEM_TAG=`cargo get --entry executor_manager/ package.version --pretty` all: docker-release init: - cargo install cargo-get + cargo install cargo-get --force docker-release: init sudo docker build -t xflops/flame-session-manager:${FSM_TAG} -f docker/Dockerfile.fsm . diff --git a/client/rust/tests/integration_test.rs b/client/rust/tests/integration_test.rs index d054f41..8a85e30 100644 --- a/client/rust/tests/integration_test.rs +++ b/client/rust/tests/integration_test.rs @@ -20,7 +20,7 @@ use flame_client as flame; use self::flame::{FlameError, SessionAttributes, SessionState}; -const FLAME_DEFAULT_ADDR: &str = "http://127.0.0.1:8080"; +const FLAME_DEFAULT_ADDR: &str = "http://127.0.0.1:38080"; const FLAME_DEFAULT_APP: &str = "flmexec"; diff --git a/docker/Dockerfile.console b/docker/Dockerfile.console index 500c74e..4b5c42a 100644 --- a/docker/Dockerfile.console +++ b/docker/Dockerfile.console @@ -1,4 +1,4 @@ -FROM rust:1.74-slim-bookworm as builder +FROM rust:1.82-slim-bookworm as builder WORKDIR /usr/src/flame COPY . . diff --git a/docker/Dockerfile.fem b/docker/Dockerfile.fem index 85af0ad..7ee24b8 100644 --- a/docker/Dockerfile.fem +++ b/docker/Dockerfile.fem @@ -1,4 +1,4 @@ -FROM rust:1.74-slim-bookworm as builder +FROM rust:1.82-slim-bookworm as builder WORKDIR /usr/src/flame COPY . . diff --git a/docker/Dockerfile.fsm b/docker/Dockerfile.fsm index c48c295..1055c2f 100644 --- a/docker/Dockerfile.fsm +++ b/docker/Dockerfile.fsm @@ -1,4 +1,4 @@ -FROM rust:1.74-slim-bookworm as builder +FROM rust:1.82-slim-bookworm as builder WORKDIR /usr/src/flame COPY . . diff --git a/installer/fsm-service.yaml b/installer/fsm-service.yaml index 51c966f..cad78ce 100644 --- a/installer/fsm-service.yaml +++ b/installer/fsm-service.yaml @@ -3,9 +3,11 @@ kind: Service metadata: name: flame-session-manager spec: + type: NodePort selector: app.kubernetes.io/name: flame-session-manager ports: - protocol: TCP port: 8080 - targetPort: 8080 \ No newline at end of file + targetPort: 8080 + nodePort: 38080 From dafee7f992dc8fe253bdc790325eb6b384c3f425 Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Mon, 13 Jan 2025 01:03:16 +0000 Subject: [PATCH 02/19] Update skafold ver. Signed-off-by: Klaus Ma --- .github/workflows/e2e.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 33ed605..52e6aab 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -34,9 +34,9 @@ jobs: command: make args: build - name: Setup Minikube - uses: hiberbee/github-action-minikube@1.5.0 - - name: Run Skaffold pipeline as action - uses: hiberbee/github-action-skaffold@1.19.0 + uses: hiberbee/github-action-minikube@1.7.0 + - name: Deploy Flame by Skaffold + uses: hiberbee/github-action-skaffold@1.27.0 with: command: run - name: Run E2E Test From ba1624d3d9a15c216868097c78bc98b835c96665 Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Mon, 13 Jan 2025 01:28:45 +0000 Subject: [PATCH 03/19] Use minikube directly Signed-off-by: Klaus Ma --- .github/workflows/e2e.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 52e6aab..419e0d7 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -34,11 +34,15 @@ jobs: command: make args: build - name: Setup Minikube - uses: hiberbee/github-action-minikube@1.7.0 - - name: Deploy Flame by Skaffold - uses: hiberbee/github-action-skaffold@1.27.0 - with: - command: run + uses: medyagh/setup-minikube@latest + - name: Build image + run: | + minikube image build -t registry.minikube/flame-executor-manager -f docker/Dockerfile.fem . + minikube image build -t registry.minikube/flame-session-manager -f docker/Dockerfile.fsm . + minikube image build -t registry.minikube/flame-console -f docker/Dockerfile.console . + - name: Deploy Flame + run: | + kubectl apply -k installer/ - name: Run E2E Test run: | cargo make test From 96f2b46c29ac945fe9452c7c1d637f84c0439cbb Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Mon, 13 Jan 2025 01:43:52 +0000 Subject: [PATCH 04/19] refact CI. Signed-off-by: Klaus Ma --- .github/workflows/code-verify.yaml | 4 ++++ .github/workflows/e2e.yaml | 19 ------------------- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/.github/workflows/code-verify.yaml b/.github/workflows/code-verify.yaml index 5774900..1cd6993 100644 --- a/.github/workflows/code-verify.yaml +++ b/.github/workflows/code-verify.yaml @@ -28,6 +28,10 @@ jobs: - name: Install gRPC run: | sudo apt-get update && sudo apt-get install -y protobuf-compiler + - name: Cargo make + uses: actions-rs/cargo@v1 + with: + command: make - name: Cargo fmt uses: actions-rs/cargo@v1 with: diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 419e0d7..65b5c9d 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -14,25 +14,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install rust - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust }} - profile: minimal - override: true - - name: Install cargo-make - uses: actions-rs/cargo@v1 - with: - command: install - args: --debug cargo-make - - name: Install gRPC - run: | - sudo apt-get update && sudo apt-get install -y protobuf-compiler - - name: Cargo build - uses: actions-rs/cargo@v1 - with: - command: make - args: build - name: Setup Minikube uses: medyagh/setup-minikube@latest - name: Build image From c875c23581dedd800606ec299e8c837499965190 Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Mon, 13 Jan 2025 01:55:04 +0000 Subject: [PATCH 05/19] Fix build-release. Signed-off-by: Klaus Ma --- .github/workflows/code-verify.yaml | 11 ++++++----- .github/workflows/e2e.yaml | 6 +++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/code-verify.yaml b/.github/workflows/code-verify.yaml index 1cd6993..118576b 100644 --- a/.github/workflows/code-verify.yaml +++ b/.github/workflows/code-verify.yaml @@ -28,11 +28,7 @@ jobs: - name: Install gRPC run: | sudo apt-get update && sudo apt-get install -y protobuf-compiler - - name: Cargo make - uses: actions-rs/cargo@v1 - with: - command: make - - name: Cargo fmt + - name: Cargo fmt uses: actions-rs/cargo@v1 with: command: make @@ -42,3 +38,8 @@ jobs: with: command: make args: clippy-ci-flow + - name: Cargo make + uses: actions-rs/cargo@v1 + with: + command: make + args: build-release diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 65b5c9d..e63b5e0 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -16,10 +16,14 @@ jobs: uses: actions/checkout@v2 - name: Setup Minikube uses: medyagh/setup-minikube@latest - - name: Build image + - name: Build flame-executor-manager image run: | minikube image build -t registry.minikube/flame-executor-manager -f docker/Dockerfile.fem . + - name: Build flame-session-manager image + run: | minikube image build -t registry.minikube/flame-session-manager -f docker/Dockerfile.fsm . + - name: Build flame-console image + run: | minikube image build -t registry.minikube/flame-console -f docker/Dockerfile.console . - name: Deploy Flame run: | From a72e4a53391668b6d31e05a485828f9744043d55 Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Mon, 13 Jan 2025 01:56:20 +0000 Subject: [PATCH 06/19] Fix code verify error. Signed-off-by: Klaus Ma --- .github/workflows/code-verify.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code-verify.yaml b/.github/workflows/code-verify.yaml index 118576b..de8c358 100644 --- a/.github/workflows/code-verify.yaml +++ b/.github/workflows/code-verify.yaml @@ -28,7 +28,7 @@ jobs: - name: Install gRPC run: | sudo apt-get update && sudo apt-get install -y protobuf-compiler - - name: Cargo fmt + - name: Cargo fmt uses: actions-rs/cargo@v1 with: command: make From bf56e953e654af54d9023d6a253ecf1894686031 Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Mon, 13 Jan 2025 02:15:20 +0000 Subject: [PATCH 07/19] Update node port. Signed-off-by: Klaus Ma --- client/rust/tests/integration_test.rs | 2 +- installer/fsm-service.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/rust/tests/integration_test.rs b/client/rust/tests/integration_test.rs index 8a85e30..48fb95d 100644 --- a/client/rust/tests/integration_test.rs +++ b/client/rust/tests/integration_test.rs @@ -20,7 +20,7 @@ use flame_client as flame; use self::flame::{FlameError, SessionAttributes, SessionState}; -const FLAME_DEFAULT_ADDR: &str = "http://127.0.0.1:38080"; +const FLAME_DEFAULT_ADDR: &str = "http://127.0.0.1:30080"; const FLAME_DEFAULT_APP: &str = "flmexec"; diff --git a/installer/fsm-service.yaml b/installer/fsm-service.yaml index cad78ce..7363195 100644 --- a/installer/fsm-service.yaml +++ b/installer/fsm-service.yaml @@ -10,4 +10,4 @@ spec: - protocol: TCP port: 8080 targetPort: 8080 - nodePort: 38080 + nodePort: 30080 From 08b953b2840a82b802600640f076bf95e59985e2 Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Mon, 13 Jan 2025 02:50:38 +0000 Subject: [PATCH 08/19] Install cargo-make. Signed-off-by: Klaus Ma --- .github/workflows/e2e.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index e63b5e0..b2cac4f 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -14,6 +14,17 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Install rust + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + profile: minimal + override: true + - name: Install cargo-make + uses: actions-rs/cargo@v1 + with: + command: install + args: --debug cargo-make - name: Setup Minikube uses: medyagh/setup-minikube@latest - name: Build flame-executor-manager image From 858fcd5c612e61c1d64abcaceea687eba7af767b Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Mon, 13 Jan 2025 10:45:23 +0200 Subject: [PATCH 09/19] Install gRPC. Signed-off-by: Klaus Ma --- .github/workflows/e2e.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index b2cac4f..2a9113e 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -14,6 +14,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Install gRPC + run: | + sudo apt-get update && sudo apt-get install -y protobuf-compiler - name: Install rust uses: actions-rs/toolchain@v1 with: From 34fc33d22fe83cbbc19bc8c4d9e4ad92e9c0bcaf Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Mon, 13 Jan 2025 11:03:09 +0000 Subject: [PATCH 10/19] Change to kind. Signed-off-by: Klaus Ma --- .github/workflows/e2e.yaml | 18 ++++++++---------- ci/flame-conf.yaml | 2 +- ci/kind.yaml | 8 ++++++++ installer/flame-console.yaml | 4 ++-- installer/flame-executor-manager.yaml | 4 ++-- installer/flame-session-manager.yaml | 4 ++-- installer/kustomization.yaml | 5 ++--- 7 files changed, 25 insertions(+), 20 deletions(-) create mode 100644 ci/kind.yaml diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 2a9113e..8d37f4b 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -28,17 +28,15 @@ jobs: with: command: install args: --debug cargo-make - - name: Setup Minikube - uses: medyagh/setup-minikube@latest - - name: Build flame-executor-manager image + - name: Setup Kind Cluster + uses: helm/kind-action@v1 + with: + config: ci/kind.conf + - name: Build and Load images run: | - minikube image build -t registry.minikube/flame-executor-manager -f docker/Dockerfile.fem . - - name: Build flame-session-manager image - run: | - minikube image build -t registry.minikube/flame-session-manager -f docker/Dockerfile.fsm . - - name: Build flame-console image - run: | - minikube image build -t registry.minikube/flame-console -f docker/Dockerfile.console . + make + kind load docker-image xflops/flame-session-manager:v0.3.0 + kind load docker-image xflops/flame-executor-manager:v0.3.0 - name: Deploy Flame run: | kubectl apply -k installer/ diff --git a/ci/flame-conf.yaml b/ci/flame-conf.yaml index 86209a1..d4b13c0 100644 --- a/ci/flame-conf.yaml +++ b/ci/flame-conf.yaml @@ -1,6 +1,6 @@ --- name: flame -endpoint: "http://127.0.0.1:8080" +endpoint: "http://flame-session-manager.flame-system:8080" slot: "cpu=1,mem=1g" policy: priority storage: sqlite://flame.db diff --git a/ci/kind.yaml b/ci/kind.yaml new file mode 100644 index 0000000..648a71b --- /dev/null +++ b/ci/kind.yaml @@ -0,0 +1,8 @@ +apiVersion: kind.x-k8s.io/v1alpha4 +kind: Cluster +nodes: +- role: control-plane + extraPortMappings: + - containerPort: 30080 + hostPort: 30080 +- role: worker diff --git a/installer/flame-console.yaml b/installer/flame-console.yaml index e924f88..20ae183 100644 --- a/installer/flame-console.yaml +++ b/installer/flame-console.yaml @@ -16,7 +16,7 @@ spec: spec: containers: - name: console - image: registry.minikube/flame-console:latest + image: xflops/flame-console:v0.3.0 env: - name: RUST_LOG value: "info" @@ -26,4 +26,4 @@ spec: volumes: - name: flame-conf configMap: - name: flame-conf \ No newline at end of file + name: flame-conf diff --git a/installer/flame-executor-manager.yaml b/installer/flame-executor-manager.yaml index 7e8b4e2..4698c15 100644 --- a/installer/flame-executor-manager.yaml +++ b/installer/flame-executor-manager.yaml @@ -16,7 +16,7 @@ spec: spec: containers: - name: fem - image: registry.minikube/flame-executor-manager:latest + image: xflops/flame-executor-manager:v0.3.0 env: - name: RUST_LOG value: "info" @@ -26,4 +26,4 @@ spec: volumes: - name: flame-conf configMap: - name: flame-conf \ No newline at end of file + name: flame-conf diff --git a/installer/flame-session-manager.yaml b/installer/flame-session-manager.yaml index 7fd96b5..11f859a 100644 --- a/installer/flame-session-manager.yaml +++ b/installer/flame-session-manager.yaml @@ -16,7 +16,7 @@ spec: spec: containers: - name: fsm - image: registry.minikube/flame-session-manager:latest + image: xflops/flame-session-manager:v0.3.0 env: - name: RUST_LOG value: "info" @@ -32,4 +32,4 @@ spec: volumes: - name: flame-conf configMap: - name: flame-conf \ No newline at end of file + name: flame-conf diff --git a/installer/kustomization.yaml b/installer/kustomization.yaml index b879661..39320e9 100644 --- a/installer/kustomization.yaml +++ b/installer/kustomization.yaml @@ -1,15 +1,14 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +namespace: flame-system resources: - flame-system.yaml - flame-executor-manager.yaml - flame-session-manager.yaml - fsm-service.yaml - - flame-console.yaml configMapGenerator: - name: flame-conf files: - flame-conf.yaml - generatorOptions: - disableNameSuffixHash: true \ No newline at end of file + disableNameSuffixHash: true From 6e5f5335e7026d31c9ccd9cf4aaf87b7cdfc3f6a Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Mon, 13 Jan 2025 11:05:41 +0000 Subject: [PATCH 11/19] Load img Signed-off-by: Klaus Ma --- .github/workflows/e2e.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 8d37f4b..73158b1 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -34,9 +34,7 @@ jobs: config: ci/kind.conf - name: Build and Load images run: | - make - kind load docker-image xflops/flame-session-manager:v0.3.0 - kind load docker-image xflops/flame-executor-manager:v0.3.0 + make && kind load docker-image xflops/flame-session-manager:v0.3.0 && kind load docker-image xflops/flame-executor-manager:v0.3.0 - name: Deploy Flame run: | kubectl apply -k installer/ From feac2ceea1903a7016e1bb79c73815fea7317028 Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Mon, 13 Jan 2025 11:06:55 +0000 Subject: [PATCH 12/19] fix fmt. Signed-off-by: Klaus Ma --- .github/workflows/e2e.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 73158b1..0255fd7 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -30,11 +30,13 @@ jobs: args: --debug cargo-make - name: Setup Kind Cluster uses: helm/kind-action@v1 - with: - config: ci/kind.conf + with: + config: ci/kind.conf - name: Build and Load images run: | - make && kind load docker-image xflops/flame-session-manager:v0.3.0 && kind load docker-image xflops/flame-executor-manager:v0.3.0 + make + kind load docker-image xflops/flame-session-manager:v0.3.0 + kind load docker-image xflops/flame-executor-manager:v0.3.0 - name: Deploy Flame run: | kubectl apply -k installer/ From 00116fe30db43b38522fdf320fdbd2016dec0c8a Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Mon, 13 Jan 2025 11:14:56 +0000 Subject: [PATCH 13/19] fix dir Signed-off-by: Klaus Ma --- .github/workflows/e2e.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 0255fd7..9749fdf 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -31,7 +31,7 @@ jobs: - name: Setup Kind Cluster uses: helm/kind-action@v1 with: - config: ci/kind.conf + config: ./ci/kind.conf - name: Build and Load images run: | make From cd3fa68748f23b50f703aca0f6a28282b6e3c1da Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Mon, 13 Jan 2025 11:37:18 +0000 Subject: [PATCH 14/19] fix Signed-off-by: Klaus Ma --- .github/workflows/e2e.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 9749fdf..b0c43b2 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -31,7 +31,7 @@ jobs: - name: Setup Kind Cluster uses: helm/kind-action@v1 with: - config: ./ci/kind.conf + config: ~/work/flame/flame/ci/kind.conf - name: Build and Load images run: | make From 6ca06da6efe3ba8ffc46f72d86f46bbd672408b8 Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Mon, 13 Jan 2025 11:38:57 +0000 Subject: [PATCH 15/19] fix Signed-off-by: Klaus Ma --- .github/workflows/e2e.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index b0c43b2..cb54868 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -14,6 +14,18 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Setup Kind Cluster + uses: helm/kind-action@v1 + with: + config: ~/work/flame/flame/ci/kind.conf + - name: Build and Load images + run: | + make + kind load docker-image xflops/flame-session-manager:v0.3.0 + kind load docker-image xflops/flame-executor-manager:v0.3.0 + - name: Deploy Flame + run: | + kubectl apply -k installer/ - name: Install gRPC run: | sudo apt-get update && sudo apt-get install -y protobuf-compiler @@ -28,18 +40,6 @@ jobs: with: command: install args: --debug cargo-make - - name: Setup Kind Cluster - uses: helm/kind-action@v1 - with: - config: ~/work/flame/flame/ci/kind.conf - - name: Build and Load images - run: | - make - kind load docker-image xflops/flame-session-manager:v0.3.0 - kind load docker-image xflops/flame-executor-manager:v0.3.0 - - name: Deploy Flame - run: | - kubectl apply -k installer/ - name: Run E2E Test run: | cargo make test From f8915aa74ee0a489c98a16dc53a77ad57b502293 Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Mon, 13 Jan 2025 12:00:08 +0000 Subject: [PATCH 16/19] fix kind Signed-off-by: Klaus Ma --- .github/workflows/e2e.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index cb54868..42642c3 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -17,7 +17,7 @@ jobs: - name: Setup Kind Cluster uses: helm/kind-action@v1 with: - config: ~/work/flame/flame/ci/kind.conf + config: ci/kind.yaml - name: Build and Load images run: | make From 9b421c5720c368d3eb023fe11842beb42922e8d3 Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Mon, 13 Jan 2025 14:22:41 +0200 Subject: [PATCH 17/19] Use latest img. Signed-off-by: Klaus Ma --- .github/workflows/e2e.yaml | 12 ++++++++---- Makefile | 5 +++++ installer/flame-console.yaml | 3 ++- installer/flame-executor-manager.yaml | 3 ++- installer/flame-session-manager.yaml | 3 ++- installer/kustomization.yaml | 1 + 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 42642c3..3429b88 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -18,11 +18,15 @@ jobs: uses: helm/kind-action@v1 with: config: ci/kind.yaml - - name: Build and Load images + cluster_name: flame_ci_cluster + - name: Build images run: | - make - kind load docker-image xflops/flame-session-manager:v0.3.0 - kind load docker-image xflops/flame-executor-manager:v0.3.0 + make ci-image + - name: Load images + run: | + kind load docker-image --name flame_ci_cluster xflops/flame-session-manager:latest + kind load docker-image --name flame_ci_cluster xflops/flame-executor-manager:latest + kind load docker-image --name flame_ci_cluster xflops/flame-console:latest - name: Deploy Flame run: | kubectl apply -k installer/ diff --git a/Makefile b/Makefile index 61eae19..068841c 100644 --- a/Makefile +++ b/Makefile @@ -9,3 +9,8 @@ init: docker-release: init sudo docker build -t xflops/flame-session-manager:${FSM_TAG} -f docker/Dockerfile.fsm . sudo docker build -t xflops/flame-executor-manager:${FEM_TAG} -f docker/Dockerfile.fem . + +ci-image: + sudo docker build -t xflops/flame-session-manager -f docker/Dockerfile.fsm . + sudo docker build -t xflops/flame-executor-manager -f docker/Dockerfile.fem . + sudo docker build -t xflops/flame-console -f docker/Dockerfile.console . diff --git a/installer/flame-console.yaml b/installer/flame-console.yaml index 20ae183..a8682bc 100644 --- a/installer/flame-console.yaml +++ b/installer/flame-console.yaml @@ -16,7 +16,8 @@ spec: spec: containers: - name: console - image: xflops/flame-console:v0.3.0 + image: xflops/flame-console:latest + imagePullPolicy: IfNotPresent env: - name: RUST_LOG value: "info" diff --git a/installer/flame-executor-manager.yaml b/installer/flame-executor-manager.yaml index 4698c15..f756cea 100644 --- a/installer/flame-executor-manager.yaml +++ b/installer/flame-executor-manager.yaml @@ -16,7 +16,8 @@ spec: spec: containers: - name: fem - image: xflops/flame-executor-manager:v0.3.0 + image: xflops/flame-executor-manager:latest + imagePullPolicy: IfNotPresent env: - name: RUST_LOG value: "info" diff --git a/installer/flame-session-manager.yaml b/installer/flame-session-manager.yaml index 11f859a..ba09e77 100644 --- a/installer/flame-session-manager.yaml +++ b/installer/flame-session-manager.yaml @@ -16,7 +16,8 @@ spec: spec: containers: - name: fsm - image: xflops/flame-session-manager:v0.3.0 + image: xflops/flame-session-manager:latest + imagePullPolicy: IfNotPresent env: - name: RUST_LOG value: "info" diff --git a/installer/kustomization.yaml b/installer/kustomization.yaml index 39320e9..9b66617 100644 --- a/installer/kustomization.yaml +++ b/installer/kustomization.yaml @@ -5,6 +5,7 @@ resources: - flame-system.yaml - flame-executor-manager.yaml - flame-session-manager.yaml + - flame-console.yaml - fsm-service.yaml configMapGenerator: - name: flame-conf From 41320ed920376ca1367d559d70034b982a501fda Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Mon, 13 Jan 2025 14:24:21 +0200 Subject: [PATCH 18/19] fix Signed-off-by: Klaus Ma --- .github/workflows/e2e.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 3429b88..21c5998 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -18,15 +18,15 @@ jobs: uses: helm/kind-action@v1 with: config: ci/kind.yaml - cluster_name: flame_ci_cluster + cluster_name: flame-ci-cluster - name: Build images run: | make ci-image - name: Load images run: | - kind load docker-image --name flame_ci_cluster xflops/flame-session-manager:latest - kind load docker-image --name flame_ci_cluster xflops/flame-executor-manager:latest - kind load docker-image --name flame_ci_cluster xflops/flame-console:latest + kind load docker-image --name flame-ci-cluster xflops/flame-session-manager:latest + kind load docker-image --name flame-ci-cluster xflops/flame-executor-manager:latest + kind load docker-image --name flame-ci-cluster xflops/flame-console:latest - name: Deploy Flame run: | kubectl apply -k installer/ From 885f4210a3c363b7ef233c9c9ecb557573d294c0 Mon Sep 17 00:00:00 2001 From: Klaus Ma Date: Mon, 13 Jan 2025 14:59:40 +0200 Subject: [PATCH 19/19] increase fem number Signed-off-by: Klaus Ma --- ci/kind.yaml | 2 ++ installer/flame-executor-manager.yaml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/kind.yaml b/ci/kind.yaml index 648a71b..270611b 100644 --- a/ci/kind.yaml +++ b/ci/kind.yaml @@ -6,3 +6,5 @@ nodes: - containerPort: 30080 hostPort: 30080 - role: worker +- role: worker +- role: worker diff --git a/installer/flame-executor-manager.yaml b/installer/flame-executor-manager.yaml index f756cea..2651e71 100644 --- a/installer/flame-executor-manager.yaml +++ b/installer/flame-executor-manager.yaml @@ -5,7 +5,7 @@ metadata: labels: app.kubernetes.io/name: flame-executor-manager spec: - replicas: 3 + replicas: 6 selector: matchLabels: app.kubernetes.io/name: flame-executor-manager