diff --git a/.env b/.env index 33bf060a..746ba1e1 100644 --- a/.env +++ b/.env @@ -2,7 +2,7 @@ COMPOSE_PROJECT_NAME=instill-core # docker compose profiles to selectively launch components for developing the latest codebase of the specified component. -# the value can be all, exclude-api-gateway, exclude-mgmt, exclude-pipeline, exclude-model, exclude-controller-model, or exclude-console. +# the value can be all, exclude-api-gateway, exclude-mgmt, exclude-pipeline, exclude-model, or exclude-console. PROFILE=all # build from scratch or not at launch, which will build all sources from scrach. Default to false. @@ -85,12 +85,6 @@ ARTIFACT_BACKEND_HOST=artifact-backend ARTIFACT_BACKEND_PRIVATEPORT=3085 ARTIFACT_BACKEND_PUBLICPORT=8085 -# controller-model -CONTROLLER_MODEL_IMAGE=instill/controller-model -CONTROLLER_MODEL_VERSION=0.4.0-alpha -CONTROLLER_MODEL_HOST=controller-model -CONTROLLER_MODEL_PRIVATEPORT=3086 - # console CONSOLE_IMAGE=instill/console CONSOLE_VERSION=0.43.0-beta @@ -144,18 +138,6 @@ REDOC_OPENAPI_VERSION=v2.0.0-rc.70 REDOC_OPENAPI_HOST=redoc-openapi REDOC_OPENAPI_PORT=3001 -# etcd -ETCD_IMAGE=quay.io/coreos/etcd -ETCD_VERSION=3.5.8 -ETCD_HOST=etcd -ETCD_CLIENT_PORT=3379 -ETCD_PEER_PORT=3380 -ETCD_CLUSTER_TOKEN=instill-core-etcd -ETCD_CLUSTER_STATE=new -ETCDCTL_API=3 -ETCD_AUTO_COMPACTION_MODE=revision -ETCD_AUTO_COMPACTION_RETENTION=1 - # influxdb INFLUXDB_IMAGE=influxdb INFLUXDB_VERSION=2.7 diff --git a/.github/workflows/helm-integration-test-backend.yml b/.github/workflows/helm-integration-test-backend.yml index 714ffbdc..c45c198e 100644 --- a/.github/workflows/helm-integration-test-backend.yml +++ b/.github/workflows/helm-integration-test-backend.yml @@ -59,7 +59,6 @@ jobs: --set pipelineBackend.image.tag=latest \ --set pipelineBackend.excludelocalconnector=false \ --set modelBackend.image.tag=latest \ - --set controllerModel.image.tag=latest \ --set console.image.tag=latest \ --set rayService.image.tag=${RAY_SERVER_VERSION} \ --set rayService.headGroupSpec.resources.limits.cpu=0 \ @@ -84,7 +83,7 @@ jobs: echo "$(kubectl get pods --namespace instill-ai)" sleep 10 done - while [[ $(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=controller-model,app.kubernetes.io/instance=core" -o 'jsonpath={..status.phase}') != *"Running"* ]]; do + while [[ $(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=model-backend,app.kubernetes.io/instance=core" -o 'jsonpath={..status.phase}') != *"Running"* ]]; do echo "$(kubectl get pods --namespace instill-ai)" sleep 10 done @@ -165,7 +164,6 @@ jobs: --set pipelineBackend.image.tag=${PIPELINE_BACKEND_VERSION} \ --set pipelineBackend.excludelocalconnector=false \ --set modelBackend.image.tag=${MODEL_BACKEND_VERSION} \ - --set controllerModel.image.tag=${CONTROLLER_MODEL_VERSION} \ --set console.image.tag=${CONSOLE_VERSION} \ --set rayService.image.tag=${RAY_SERVER_VERSION} \ --set rayService.headGroupSpec.resources.limits.cpu=0 \ @@ -190,7 +188,7 @@ jobs: echo "$(kubectl get pods --namespace instill-ai)" sleep 10 done - while [[ $(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=controller-model,app.kubernetes.io/instance=core" -o 'jsonpath={..status.phase}') != *"Running"* ]]; do + while [[ $(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=model-backend,app.kubernetes.io/instance=core" -o 'jsonpath={..status.phase}') != *"Running"* ]]; do echo "$(kubectl get pods --namespace instill-ai)" sleep 10 done diff --git a/.github/workflows/helm-integration-test-console.yml b/.github/workflows/helm-integration-test-console.yml index a764fcf8..32d18a25 100644 --- a/.github/workflows/helm-integration-test-console.yml +++ b/.github/workflows/helm-integration-test-console.yml @@ -52,7 +52,6 @@ jobs: --set pipelineBackend.image.tag=latest \ --set pipelineBackend.excludelocalconnector=false \ --set modelBackend.image.tag=latest \ - --set controllerModel.image.tag=latest \ --set console.image.tag=latest \ --set rayService.image.tag=${RAY_SERVER_VERSION} \ --set rayService.headGroupSpec.resources.limits.cpu=0 \ @@ -77,7 +76,7 @@ jobs: echo "$(kubectl get pods --namespace instill-ai)" sleep 10 done - while [[ $(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=controller-model,app.kubernetes.io/instance=core" -o 'jsonpath={..status.phase}') != *"Running"* ]]; do + while [[ $(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=model-backend,app.kubernetes.io/instance=core" -o 'jsonpath={..status.phase}') != *"Running"* ]]; do echo "$(kubectl get pods --namespace instill-ai)" sleep 10 done @@ -185,7 +184,6 @@ jobs: --set pipelineBackend.image.tag=${PIPELINE_BACKEND_VERSION} \ --set pipelineBackend.excludelocalconnector=false \ --set modelBackend.image.tag=${MODEL_BACKEND_VERSION} \ - --set controllerModel.image.tag=${CONTROLLER_MODEL_VERSION} \ --set console.image.tag=${CONSOLE_VERSION} \ --set rayService.image.tag=${RAY_SERVER_VERSION} \ --set rayService.headGroupSpec.resources.limits.cpu=0 \ @@ -210,7 +208,7 @@ jobs: echo "$(kubectl get pods --namespace instill-ai)" sleep 10 done - while [[ $(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=controller-model,app.kubernetes.io/instance=core" -o 'jsonpath={..status.phase}') != *"Running"* ]]; do + while [[ $(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=model-backend,app.kubernetes.io/instance=core" -o 'jsonpath={..status.phase}') != *"Running"* ]]; do echo "$(kubectl get pods --namespace instill-ai)" sleep 10 done diff --git a/.github/workflows/helm-integration-test-latest.yml b/.github/workflows/helm-integration-test-latest.yml index c914a107..a64ac0e0 100644 --- a/.github/workflows/helm-integration-test-latest.yml +++ b/.github/workflows/helm-integration-test-latest.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: component: - [mgmt-backend, pipeline-backend, model-backend, controller-model] + [mgmt-backend, pipeline-backend, model-backend] uses: instill-ai/instill-core/.github/workflows/helm-integration-test-backend.yml@main with: component: ${{ matrix.component }} diff --git a/.github/workflows/helm-integration-test-release.yml b/.github/workflows/helm-integration-test-release.yml index 5f8cd84d..b54e8760 100644 --- a/.github/workflows/helm-integration-test-release.yml +++ b/.github/workflows/helm-integration-test-release.yml @@ -9,7 +9,7 @@ jobs: fail-fast: false matrix: component: - [mgmt-backend, pipeline-backend, model-backend, controller-model] + [mgmt-backend, pipeline-backend, model-backend] uses: instill-ai/instill-core/.github/workflows/helm-integration-test-backend.yml@main with: component: ${{ matrix.component }} diff --git a/.github/workflows/integration-test-latest.yml b/.github/workflows/integration-test-latest.yml index 9876d8c1..bc6c8bc6 100644 --- a/.github/workflows/integration-test-latest.yml +++ b/.github/workflows/integration-test-latest.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: component: - [mgmt-backend, pipeline-backend, model-backend, controller-model] + [mgmt-backend, pipeline-backend, model-backend] uses: instill-ai/instill-core/.github/workflows/integration-test-backend.yml@main with: component: ${{ matrix.component }} diff --git a/.github/workflows/integration-test-release.yml b/.github/workflows/integration-test-release.yml index f89c71b2..38d2aa57 100644 --- a/.github/workflows/integration-test-release.yml +++ b/.github/workflows/integration-test-release.yml @@ -9,7 +9,7 @@ jobs: fail-fast: false matrix: component: - [mgmt-backend, pipeline-backend, model-backend, controller-model] + [mgmt-backend, pipeline-backend, model-backend] uses: instill-ai/instill-core/.github/workflows/integration-test-backend.yml@main with: component: ${{ matrix.component }} @@ -18,4 +18,3 @@ jobs: uses: instill-ai/instill-core/.github/workflows/integration-test-console.yml@main with: target: release - \ No newline at end of file diff --git a/.github/workflows/make-all.yml b/.github/workflows/make-all.yml index f79102d1..285ab6b6 100644 --- a/.github/workflows/make-all.yml +++ b/.github/workflows/make-all.yml @@ -51,7 +51,6 @@ jobs: curl -s -o /dev/null -w ''%{http_code}'\n' http://localhost:8080/core/v1beta/health/mgmt curl -s -o /dev/null -w ''%{http_code}'\n' http://localhost:8080/vdp/v1beta/health/pipeline curl -s -o /dev/null -w ''%{http_code}'\n' http://localhost:8080/model/v1beta/health/model - curl -s -o /dev/null -w ''%{http_code}'\n' http://localhost:8080/model/v1beta/health/model-controller - name: Tear down Instill Core (release) run: | diff --git a/.github/workflows/make-latest.yml b/.github/workflows/make-latest.yml index f3a95b7d..f5e6416d 100644 --- a/.github/workflows/make-latest.yml +++ b/.github/workflows/make-latest.yml @@ -55,7 +55,6 @@ jobs: curl -s -o /dev/null -w ''%{http_code}'\n' http://localhost:8080/core/v1beta/health/mgmt curl -s -o /dev/null -w ''%{http_code}'\n' http://localhost:8080/vdp/v1beta/health/pipeline curl -s -o /dev/null -w ''%{http_code}'\n' http://localhost:8080/model/v1beta/health/model - curl -s -o /dev/null -w ''%{http_code}'\n' http://localhost:8080/model/v1beta/health/model-controller - name: Tear down Instill Core (latest) run: | diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index bf82d9e3..4f9c0700 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -79,7 +79,6 @@ jobs: yq ".mgmtBackend.image.tag=\"$MGMT_BACKEND_VERSION\"" -i charts/core/values.yaml yq ".pipelineBackend.image.tag=\"$PIPELINE_BACKEND_VERSION\"" -i charts/core/values.yaml yq ".modelBackend.image.tag=\"$MODEL_BACKEND_VERSION\"" -i charts/core/values.yaml - yq ".controllerModel.image.tag=\"$CONTROLLER_MODEL_VERSION\"" -i charts/core/values.yaml yq ".console.image.tag=\"$CONSOLE_VERSION\"" -i charts/core/values.yaml yq ".rayService.image.tag=\"$RAY_SERVER_VERSION\"" -i charts/core/values.yaml yq ".temporal.image.tag=\"$TEMPORAL_VERSION\"" -i charts/core/values.yaml diff --git a/Dockerfile b/Dockerfile index 53e84401..f797c52d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,6 @@ RUN git clone https://github.com/instill-ai/mgmt-backend.git RUN git clone https://github.com/instill-ai/console.git RUN git clone https://github.com/instill-ai/pipeline-backend.git RUN git clone https://github.com/instill-ai/model-backend.git -RUN git clone https://github.com/instill-ai/controller-model.git RUN git clone https://github.com/instill-ai/artifact-backend.git FROM alpine:${ALPINE_VERSION} AS release @@ -48,11 +47,10 @@ RUN echo "Instill Core release codebase cloned on ${CACHE_DATE}" WORKDIR /instill-core -ARG API_GATEWAY_VERSION MGMT_BACKEND_VERSION CONSOLE_VERSION PIPELINE_BACKEND_VERSION MODEL_BACKEND_VERSION CONTROLLER_MODEL_VERSION ARTIFACT_BACKEND_VERSION +ARG API_GATEWAY_VERSION MGMT_BACKEND_VERSION CONSOLE_VERSION PIPELINE_BACKEND_VERSION MODEL_BACKEND_VERSION ARTIFACT_BACKEND_VERSION RUN git clone -b v${API_GATEWAY_VERSION} -c advice.detachedHead=false https://github.com/instill-ai/api-gateway.git RUN git clone -b v${MGMT_BACKEND_VERSION} -c advice.detachedHead=false https://github.com/instill-ai/mgmt-backend.git RUN git clone -b v${CONSOLE_VERSION} -c advice.detachedHead=false https://github.com/instill-ai/console.git RUN git clone -b v${PIPELINE_BACKEND_VERSION} -c advice.detachedHead=false https://github.com/instill-ai/pipeline-backend.git RUN git clone -b v${MODEL_BACKEND_VERSION} -c advice.detachedHead=false https://github.com/instill-ai/model-backend.git -RUN git clone -b v${CONTROLLER_MODEL_VERSION} -c advice.detachedHead=false https://github.com/instill-ai/controller-model.git RUN git clone -b v${ARTIFACT_BACKEND_VERSION} -c advice.detachedHead=false https://github.com/instill-ai/artifact-backend.git diff --git a/Makefile b/Makefile index fe849c38..ead13d1d 100644 --- a/Makefile +++ b/Makefile @@ -95,7 +95,6 @@ build-latest: ## Build latest images for all Instill Core components MGMT_BACKEND_VERSION=latest \ PIPELINE_BACKEND_VERSION=latest \ MODEL_BACKEND_VERSION=latest \ - CONTROLLER_MODEL_VERSION=latest \ ARTIFACT_BACKEND_VERSION=latest \ CONSOLE_VERSION=latest \ COMPOSE_PROFILES=${PROFILE} docker compose -f docker-compose-build.yml build --progress plain \ @@ -113,7 +112,6 @@ build-release: ## Build release images for all Instill Core components --build-arg MGMT_BACKEND_VERSION=${MGMT_BACKEND_VERSION} \ --build-arg PIPELINE_BACKEND_VERSION=${PIPELINE_BACKEND_VERSION} \ --build-arg MODEL_BACKEND_VERSION=${MODEL_BACKEND_VERSION} \ - --build-arg CONTROLLER_MODEL_VERSION=${CONTROLLER_MODEL_VERSION} \ --build-arg ARTIFACT_BACKEND_VERSION=${ARTIFACT_BACKEND_VERSION} \ --build-arg CONSOLE_VERSION=${CONSOLE_VERSION} \ --target release \ @@ -129,7 +127,6 @@ build-release: ## Build release images for all Instill Core components MGMT_BACKEND_VERSION=${MGMT_BACKEND_VERSION} \ PIPELINE_BACKEND_VERSION=${PIPELINE_BACKEND_VERSION} \ MODEL_BACKEND_VERSION=${MODEL_BACKEND_VERSION} \ - CONTROLLER_MODEL_VERSION=${CONTROLLER_MODEL_VERSION} \ ARTIFACT_BACKEND_VERSION=${ARTIFACT_BACKEND_VERSION} \ CONSOLE_VERSION=${CONSOLE_VERSION} \ COMPOSE_PROFILES=${PROFILE} docker compose -f docker-compose-build.yml build --progress plain \ @@ -188,8 +185,7 @@ integration-test-latest: ## Run integration test on the latest VDP ${INSTILL_CORE_IMAGE_NAME}:latest /bin/sh -c " \ /bin/sh -c 'cd mgmt-backend && make integration-test API_GATEWAY_URL=${API_GATEWAY_HOST}:${API_GATEWAY_PORT}' && \ /bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=${API_GATEWAY_HOST}:${API_GATEWAY_PORT}' && \ - /bin/sh -c 'cd model-backend && make integration-test API_GATEWAY_URL=${API_GATEWAY_HOST}:${API_GATEWAY_PORT}' && \ - /bin/sh -c 'cd controller-model && make integration-test API_GATEWAY_URL=${API_GATEWAY_HOST}:${API_GATEWAY_PORT}' \ + /bin/sh -c 'cd model-backend && make integration-test API_GATEWAY_URL=${API_GATEWAY_HOST}:${API_GATEWAY_PORT}' \ " @make down @@ -202,8 +198,7 @@ integration-test-release: ## Run integration test on the release VDP ${INSTILL_CORE_IMAGE_NAME}:${INSTILL_CORE_VERSION} /bin/sh -c " \ /bin/sh -c 'cd mgmt-backend && make integration-test API_GATEWAY_URL=${API_GATEWAY_HOST}:${API_GATEWAY_PORT}' && \ /bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=${API_GATEWAY_HOST}:${API_GATEWAY_PORT}' && \ - /bin/sh -c 'cd model-backend && make integration-test API_GATEWAY_URL=${API_GATEWAY_HOST}:${API_GATEWAY_PORT}' && \ - /bin/sh -c 'cd controller-model && make integration-test API_GATEWAY_URL=${API_GATEWAY_HOST}:${API_GATEWAY_PORT}' \ + /bin/sh -c 'cd model-backend && make integration-test API_GATEWAY_URL=${API_GATEWAY_HOST}:${API_GATEWAY_PORT}' \ " @make down @@ -220,7 +215,6 @@ helm-integration-test-latest: ## Run integration test on t --set pipelineBackend.image.tag=latest \ --set pipelineBackend.excludelocalconnector=false \ --set modelBackend.image.tag=latest \ - --set controllerModel.image.tag=latest \ --set console.image.tag=latest \ --set rayService.image.tag=${RAY_LATEST_TAG} \ --set tags.observability=false \ @@ -233,15 +227,13 @@ ifeq ($(UNAME_S),Darwin) @docker run --rm --name ${INSTILL_CORE_INTEGRATION_TEST_CONTAINER_NAME}-helm-latest ${INSTILL_CORE_IMAGE_NAME}:latest /bin/sh -c " \ /bin/sh -c 'cd mgmt-backend && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' && \ /bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' && \ - /bin/sh -c 'cd model-backend && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' && \ - /bin/sh -c 'cd controller-model && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' \ + /bin/sh -c 'cd model-backend && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' \ " else ifeq ($(UNAME_S),Linux) @docker run --rm --network host --name ${INSTILL_CORE_INTEGRATION_TEST_CONTAINER_NAME}-helm-latest ${INSTILL_CORE_IMAGE_NAME}:latest /bin/sh -c " \ /bin/sh -c 'cd mgmt-backend && make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}' && \ /bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}' && \ - /bin/sh -c 'cd model-backend && make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}' && \ - /bin/sh -c 'cd controller-model && make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}' \ + /bin/sh -c 'cd model-backend && make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}' \ " endif @helm uninstall ${HELM_RELEASE_NAME} --namespace ${HELM_NAMESPACE} @@ -262,7 +254,6 @@ helm-integration-test-release: ## Run integration test on --set pipelineBackend.image.tag=${PIPELINE_BACKEND_VERSION} \ --set pipelineBackend.excludelocalconnector=false \ --set modelBackend.image.tag=${MODEL_BACKEND_VERSION} \ - --set controllerModel.image.tag=${CONTROLLER_MODEL_VERSION} \ --set console.image.tag=${CONSOLE_VERSION} \ --set rayService.image.tag=${RAY_RELEASE_TAG} \ --set tags.observability=false \ @@ -275,15 +266,13 @@ ifeq ($(UNAME_S),Darwin) @docker run --rm --name ${INSTILL_CORE_INTEGRATION_TEST_CONTAINER_NAME}-helm-release ${INSTILL_CORE_IMAGE_NAME}:${INSTILL_CORE_VERSION} /bin/sh -c " \ /bin/sh -c 'cd mgmt-backend && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' && \ /bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' && \ - /bin/sh -c 'cd model-backend && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' && \ - /bin/sh -c 'cd controller-model && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' \ + /bin/sh -c 'cd model-backend && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' \ " else ifeq ($(UNAME_S),Linux) @docker run --rm --network host --name ${INSTILL_CORE_INTEGRATION_TEST_CONTAINER_NAME}-helm-release ${INSTILL_CORE_IMAGE_NAME}:${INSTILL_CORE_VERSION} /bin/sh -c " \ /bin/sh -c 'cd mgmt-backend && make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}' && \ /bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}' && \ - /bin/sh -c 'cd model-backend && make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}' && \ - /bin/sh -c 'cd controller-model && make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}' \ + /bin/sh -c 'cd model-backend && make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}' \ " endif @helm uninstall ${HELM_RELEASE_NAME} --namespace ${HELM_NAMESPACE} @@ -342,7 +331,6 @@ ifeq ($(UNAME_S),Darwin) --set pipelineBackend.image.tag=latest \ --set pipelineBackend.excludelocalconnector=false \ --set modelBackend.image.tag=latest \ - --set controllerModel.image.tag=latest \ --set console.image.tag=latest \ --set rayService.image.tag=${RAY_LATEST_TAG} \ --set apiGatewayURL=http://host.docker.internal:${API_GATEWAY_PORT} \ @@ -360,7 +348,6 @@ else ifeq ($(UNAME_S),Linux) --set pipelineBackend.image.tag=latest \ --set pipelineBackend.excludelocalconnector=false \ --set modelBackend.image.tag=latest \ - --set controllerModel.image.tag=latest \ --set console.image.tag=latest \ --set rayService.image.tag=${RAY_LATEST_TAG} \ --set apiGatewayURL=http://localhost:${API_GATEWAY_PORT} \ @@ -422,7 +409,6 @@ ifeq ($(UNAME_S),Darwin) --set pipelineBackend.image.tag=${PIPELINE_BACKEND_VERSION} \ --set pipelineBackend.excludelocalconnector=false \ --set modelBackend.image.tag=${MODEL_BACKEND_VERSION} \ - --set controllerModel.image.tag=${CONTROLLER_MODEL_VERSION} \ --set console.image.tag=${CONSOLE_VERSION} \ --set rayService.image.tag=${RAY_RELEASE_TAG} \ --set apiGatewayURL=http://host.docker.internal:${API_GATEWAY_PORT} \ @@ -440,7 +426,6 @@ else ifeq ($(UNAME_S),Linux) --set pipelineBackend.image.tag=${PIPELINE_BACKEND_VERSION} \ --set pipelineBackend.excludelocalconnector=false \ --set modelBackend.image.tag=${MODEL_BACKEND_VERSION} \ - --set controllerModel.image.tag=${CONTROLLER_MODEL_VERSION} \ --set console.image.tag=${CONSOLE_VERSION} \ --set rayService.image.tag=${RAY_RELEASE_TAG} \ --set apiGatewayURL=http://localhost:${API_GATEWAY_PORT} \ diff --git a/charts/core/Chart.lock b/charts/core/Chart.lock index 44d632f6..2382eb42 100644 --- a/charts/core/Chart.lock +++ b/charts/core/Chart.lock @@ -2,9 +2,6 @@ dependencies: - name: kuberay-operator repository: https://ray-project.github.io/kuberay-helm/ version: 1.0.0 -- name: etcd - repository: https://charts.bitnami.com/bitnami - version: 8.8.1 - name: elasticsearch repository: https://helm.elastic.co version: 7.17.3 @@ -23,5 +20,5 @@ dependencies: - name: grafana repository: https://grafana.github.io/helm-charts version: 7.0.19 -digest: sha256:e7dccde76e808e60c69a3bfcd6071106b4daab9e2b5fe352f0146814fc64fa61 -generated: "2024-02-26T22:55:15.548288Z" +digest: sha256:cc5d2baa4d56e12db43d69005b7dadf02945026b89b5f011983b40d66116b58b +generated: "2024-03-28T03:28:47.415942+08:00" diff --git a/charts/core/Chart.yaml b/charts/core/Chart.yaml index 812b3414..c5662f0a 100644 --- a/charts/core/Chart.yaml +++ b/charts/core/Chart.yaml @@ -23,12 +23,6 @@ dependencies: version: 1.0.0 tags: - model - - name: etcd - repository: https://charts.bitnami.com/bitnami - version: 8.8.1 - condition: etcd.enabled - tags: - - model - name: elasticsearch repository: https://helm.elastic.co version: 7.17.3 diff --git a/charts/core/README.md b/charts/core/README.md index 42b86e13..4b6524d5 100644 --- a/charts/core/README.md +++ b/charts/core/README.md @@ -8,7 +8,6 @@ The Helm chart of Instill Core | Repository | Name | Version | |------------|------|---------| -| https://charts.bitnami.com/bitnami | etcd | 8.8.1 | | https://grafana.github.io/helm-charts | grafana | 7.0.19 | | https://helm.elastic.co | elasticsearch | 7.17.3 | | https://helm.influxdata.com | influxdb2 | 2.1.1 | diff --git a/charts/core/charts/etcd-8.8.1.tgz b/charts/core/charts/etcd-8.8.1.tgz deleted file mode 100644 index 2a41d2d7..00000000 Binary files a/charts/core/charts/etcd-8.8.1.tgz and /dev/null differ diff --git a/charts/core/templates/_helpers.tpl b/charts/core/templates/_helpers.tpl index 1cb42c9d..66d83568 100644 --- a/charts/core/templates/_helpers.tpl +++ b/charts/core/templates/_helpers.tpl @@ -153,18 +153,6 @@ model-backend {{- printf "3083" -}} {{- end -}} -{{/* -controller-model -*/}} -{{- define "core.controllerModel" -}} - {{- printf "%s-controller-model" (include "core.fullname" .) -}} -{{- end -}} - -{{/* controller-model service and container private port */}} -{{- define "core.controllerModel.privatePort" -}} - {{- printf "3086" -}} -{{- end -}} - {{/* artifact-backend */}} @@ -346,21 +334,6 @@ redis address host:port {{- include "core.database.rawPassword" . | b64enc | quote -}} {{- end -}} -{{/* -etcd -*/}} -{{- define "core.etcd" -}} - {{- printf "%s-etcd" (include "core.fullname" .) -}} -{{- end -}} - -{{- define "core.etcd.clientPort" -}} - {{- printf "2379" -}} -{{- end -}} - -{{- define "core.etcd.peerPort" -}} - {{- printf "2380" -}} -{{- end -}} - {{/* influxdb */}} @@ -451,14 +424,6 @@ internal TLS secret names {{- end -}} {{- end -}} -{{- define "core.internalTLS.controllerModel.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.controllerModel.secretName -}} - {{- else -}} - {{- printf "%s-controller-model-internal-tls" (include "core.fullname" .) -}} - {{- end -}} -{{- end -}} - {{- define "core.internalTLS.console.secretName" -}} {{- if eq .Values.internalTLS.certSource "secret" -}} {{- .Values.internalTLS.console.secretName -}} @@ -470,14 +435,6 @@ internal TLS secret names {{/* Persistent Volume Claims */}} -{{- define "core.modelRepositoryDataVolume" -}} - {{- printf "%s-model-repository-data-volume" (include "core.fullname" .) -}} -{{- end -}} - -{{- define "core.rayCondaDataVolume" -}} - {{- printf "%s-ray-conda-data-volume" (include "core.fullname" .) -}} -{{- end -}} - {{- define "core.registryDataVolume" -}} {{- printf "%s-registry-data-volume" (include "core.fullname" .) -}} {{- end -}} diff --git a/charts/core/templates/controller-model/configmap.yaml b/charts/core/templates/controller-model/configmap.yaml deleted file mode 100644 index 21ca5d1d..00000000 --- a/charts/core/templates/controller-model/configmap.yaml +++ /dev/null @@ -1,50 +0,0 @@ -{{- if .Values.tags.model -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "core.controllerModel" . }} - labels: - {{- include "core.labels" . | nindent 4 }} - app.kubernetes.io/component: controller-model -data: - config.yaml: |+ - server: - privateport: {{ template "core.controllerModel.privatePort" . }} - edition: {{ .Values.edition }} - loopinterval: {{ .Values.controllerModel.loopinterval }} - timeout: 120 - debug: {{ ternary "true" "false" (eq (.Values.logLevel | upper) "DEBUG") }} - {{- if .Values.internalTLS.enabled }} - https: - cert: /etc/instill-ai/model/ssl/controller/tls.crt - key: /etc/instill-ai/model/ssl/controller/tls.key - {{- end }} - etcd: - host: {{ template "core.etcd" . }} - port: {{ template "core.etcd.clientPort" . }} - timeout: 5 - modelbackend: - host: {{ template "core.modelBackend" . }} - publicport: {{ template "core.modelBackend.publicPort" . }} - privateport: {{ template "core.modelBackend.privatePort" . }} - {{- if .Values.internalTLS.enabled }} - https: - cert: /etc/instill-ai/model/ssl/model/tls.crt - key: /etc/instill-ai/model/ssl/model/tls.key - {{- end }} - cache: - redis: - redisoptions: - addr: {{ default (include "core.redis.addr" .) .Values.redis.external.addr }} - model: - {{- toYaml .Values.modelBackend.cache | nindent 8 }} - mgmtbackend: - host: {{ template "core.mgmtBackend" . }} - publicport: {{ template "core.mgmtBackend.publicPort" . }} - privateport: {{ template "core.mgmtBackend.privatePort" . }} - {{- if .Values.internalTLS.enabled }} - https: - cert: /etc/instill-ai/model/ssl/mgmt/tls.crt - key: /etc/instill-ai/model/ssl/mgmt/tls.key - {{- end }} -{{- end }} diff --git a/charts/core/templates/controller-model/deployment.yaml b/charts/core/templates/controller-model/deployment.yaml deleted file mode 100644 index acd76e14..00000000 --- a/charts/core/templates/controller-model/deployment.yaml +++ /dev/null @@ -1,150 +0,0 @@ -{{- if .Values.tags.model -}} -{{- $modelRepository := .Values.persistence.persistentVolumeClaim.modelRepository -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "core.controllerModel" . }} - labels: - {{- include "core.labels" . | nindent 4 }} - app.kubernetes.io/component: controller-model - annotations: - rollme: {{ randAlphaNum 5 | quote }} -spec: - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "RollingUpdate" }} - rollingUpdate: - maxSurge: {{ .Values.updateStrategy.rollingUpdate.maxSurge }} - maxUnavailable: {{ .Values.updateStrategy.rollingUpdate.maxUnavailable }} - {{- else}} - rollingUpdate: null - {{- end }} - {{- if not .Values.controllerModel.autoscaling.enabled }} - replicas: {{ .Values.controllerModel.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "core.matchLabels" . | nindent 6 }} - app.kubernetes.io/component: controller-model - template: - metadata: - labels: - {{- include "core.matchLabels" . | nindent 8 }} - app.kubernetes.io/component: controller-model - annotations: - checksum/config: {{ include (print $.Template.BasePath "/controller-model/configmap.yaml") . | sha256sum }} - {{- with .Values.controllerModel.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - # distroless users - # root:x:0:0:root:/root:/sbin/nologin - # nobody:x:65534:65534:nobody:/nonexistent:/sbin/nologin - # nonroot:x:65532:65532:nonroot:/home/nonroot:/sbin/nologin - securityContext: - runAsUser: 65534 - runAsGroup: 65534 - {{- if .Values.controllerModel.serviceAccountName }} - serviceAccountName: {{ .Values.controllerModel.serviceAccountName }} - {{- end }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.controllerModel.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - initContainers: - - name: wait-for-dependencies - image: curlimages/curl:8.00.1 - command: ['sh', '-c'] - args: - - > - while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${ETCD_HOST}:${ETCD_CLIENT_PORT}/health)" != "200" ]]; do echo waiting for etcd; sleep 1; done && - while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${MODEL_BACKEND_HOST}:${MODEL_BACKEND_PORT}/v1alpha/health/model)" != "200" ]]; do echo waiting for model-backend; sleep 1; done - env: - - name: MODEL_BACKEND_HOST - value: "{{ template "core.modelBackend" . }}" - - name: MODEL_BACKEND_PORT - value: "{{ template "core.modelBackend.publicPort" . }}" - - name: ETCD_HOST - value: "{{ template "core.etcd" . }}" - - name: ETCD_CLIENT_PORT - value: "{{ template "core.etcd.clientPort" . }}" - containers: - - name: controller-model - image: {{ .Values.controllerModel.image.repository }}:{{ .Values.controllerModel.image.tag }} - imagePullPolicy: {{ .Values.controllerModel.image.pullPolicy }} - readinessProbe: - httpGet: - path: /v1alpha/__readiness - scheme: {{ ternary "https" "http" .Values.internalTLS.enabled | upper }} - port: {{ ternary "https" "http" .Values.internalTLS.enabled }}-private - periodSeconds: 10 - livenessProbe: - httpGet: - path: /v1alpha/__liveness - scheme: {{ ternary "https" "http" .Values.internalTLS.enabled | upper }} - port: {{ ternary "https" "http" .Values.internalTLS.enabled }}-private - periodSeconds: 10 - {{- if .Values.controllerModel.resources }} - resources: - {{- toYaml .Values.controllerModel.resources | nindent 12 }} - {{- end }} - command: [./{{ .Values.controllerModel.commandName.main }}] - ports: - - name: {{ ternary "https" "http" .Values.internalTLS.enabled }}-private - containerPort: {{ template "core.controllerModel.privatePort" . }} - protocol: TCP - volumeMounts: - - name: config - mountPath: {{ .Values.controllerModel.configPath }} - subPath: config.yaml - - name: model-repository - mountPath: /model-repository - {{- if .Values.internalTLS.enabled }} - - name: controller-internal-certs - mountPath: "/etc/instill-ai/model/ssl/controller" - {{- end }} - {{- with .Values.controllerModel.extraVolumeMounts }} - {{- toYaml . | nindent 12 }} - {{- end }} - {{- if .Values.controllerModel.extraEnv }} - env: - {{- toYaml .Values.controllerModel.extraEnv | nindent 12 }} - {{- end }} - {{- with .Values.controllerModel.sidecarContainers }} - {{- toYaml . | nindent 8 }} - {{- end }} - volumes: - - name: config - configMap: - name: {{ template "core.controllerModel" . }} - - name: controller-internal-certs - secret: - secretName: {{ template "core.internalTLS.controllerModel.secretName" . }} - - name: model-repository - {{- if not .Values.persistence.enabled }} - emptyDir: {} - {{- else if $modelRepository.existingClaim }} - persistentVolumeClaim: - claimName: {{ $modelRepository.existingClaim }} - {{- else }} - persistentVolumeClaim: - claimName: {{ template "core.modelRepositoryDataVolume" . }} - {{- end }} - {{- with .Values.controllerModel.extraVolumes }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.controllerModel.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.controllerModel.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.controllerModel.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} -{{- end }} diff --git a/charts/core/templates/controller-model/hpa.yml b/charts/core/templates/controller-model/hpa.yml deleted file mode 100644 index 9974c323..00000000 --- a/charts/core/templates/controller-model/hpa.yml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if .Values.tags.model -}} -{{- if .Values.controllerModel.autoscaling.enabled }} -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - name: {{ template "core.controllerModel" . }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ template "core.controllerModel" . }} - labels: - {{- include "core.labels" . | nindent 4 }} - app.kubernetes.io/component: controller-model - minReplicas: {{ .Values.controllerModel.autoscaling.minReplicas }} - maxReplicas: {{ .Values.controllerModel.autoscaling.maxReplicas }} - metrics: -{{- with .Values.controllerModel.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: {{ . }} -{{- end }} -{{- with .Values.controllerModel.autoscaling.targetAverageMemoryUtilization }} - - type: Resource - resource: - name: memory - target: - type: AverageValue - averageValue: {{ . }} -{{- end }} -{{- end }} -{{- end }} diff --git a/charts/core/templates/controller-model/service.yaml b/charts/core/templates/controller-model/service.yaml deleted file mode 100644 index 8c4f578e..00000000 --- a/charts/core/templates/controller-model/service.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if .Values.tags.model -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "core.controllerModel" . }} - labels: - {{- include "core.labels" . | nindent 4 }} - app.kubernetes.io/component: controller-model - {{- with .Values.controllerModel.serviceAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - ports: - - name: {{ ternary "https" "http" .Values.internalTLS.enabled }}-private - port: {{ template "core.controllerModel.privatePort" . }} - targetPort: {{ template "core.controllerModel.privatePort" . }} - selector: - {{- include "core.matchLabels" . | nindent 4 }} - app.kubernetes.io/component: controller-model -{{- end }} diff --git a/charts/core/templates/model-backend/configmap.yaml b/charts/core/templates/model-backend/configmap.yaml index a137e72e..7cc7cdb9 100644 --- a/charts/core/templates/model-backend/configmap.yaml +++ b/charts/core/templates/model-backend/configmap.yaml @@ -27,9 +27,6 @@ data: cert: /etc/instill-ai/model/ssl/model/tls.crt key: /etc/instill-ai/model/ssl/model/tls.key {{- end }} - github: - patenabled: {{ .Values.modelBackend.github.patenabled }} - pat: {{ .Values.modelBackend.github.pat }} log: external: {{ .Values.tags.observability }} otelcollector: @@ -44,17 +41,9 @@ data: cert: /etc/instill-ai/model/ssl/mgmt/tls.crt key: /etc/instill-ai/model/ssl/mgmt/tls.key {{- end }} - controller: - host: {{ template "core.controllerModel" . }} - privateport: {{ template "core.controllerModel.privatePort" . }} - {{- if .Values.internalTLS.enabled }} - https: - cert: /etc/instill-ai/model/ssl/controller/tls.crt - key: /etc/instill-ai/model/ssl/controller/tls.key - {{- end }} rayserver: grpcuri: {{ include "core.ray" . }}:{{ include "core.ray.serveGrpcPort" . }} - modelstore: /model-repository + modelstore: /model-backend vram: {{ .Values.rayService.vram }} database: username: {{ default (include "core.database.username" .) .Values.database.external.username }} @@ -80,8 +69,6 @@ data: redis: redisoptions: addr: {{ default (include "core.redis.addr" .) .Values.redis.external.addr }} - model: - {{- toYaml .Values.modelBackend.cache | nindent 8 }} maxbatchsizelimitation: unspecified: 2 classification: 16 diff --git a/charts/core/templates/model-backend/deployment.yaml b/charts/core/templates/model-backend/deployment.yaml index 18766b69..d9aaf315 100644 --- a/charts/core/templates/model-backend/deployment.yaml +++ b/charts/core/templates/model-backend/deployment.yaml @@ -1,6 +1,4 @@ {{- if .Values.tags.model -}} -{{- $modelRepository := .Values.persistence.persistentVolumeClaim.modelRepository -}} -{{- $rayConda := .Values.persistence.persistentVolumeClaim.rayConda -}} apiVersion: apps/v1 kind: Deployment metadata: @@ -127,15 +125,6 @@ spec: value: "{{ template "core.ray" . }}" - name: RAY_SERVER_SERVE_PORT value: "{{ template "core.ray.servePort" . }}" - - name: chmod-model-repostiroy - securityContext: - runAsUser: 0 - runAsGroup: 0 - image: busybox - command: ["sh", "-c", "chmod -R 777 /model-repository"] - volumeMounts: - - name: model-repository - mountPath: /model-repository containers: - name: model-backend-worker image: {{ .Values.modelBackend.image.repository }}:{{ .Values.modelBackend.image.tag }} @@ -152,10 +141,6 @@ spec: - name: config mountPath: {{ .Values.modelBackend.configPath }} subPath: config.yaml - - name: model-repository - mountPath: /model-repository - - name: ray-conda - mountPath: /ray-conda {{- with .Values.modelBackend.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} @@ -187,10 +172,6 @@ spec: - name: config mountPath: {{ .Values.modelBackend.configPath }} subPath: config.yaml - - name: model-repository - mountPath: /model-repository - - name: ray-conda - mountPath: /ray-conda {{- if .Values.internalTLS.enabled }} - name: model-internal-certs mountPath: "/etc/instill-ai/model/ssl/model" @@ -209,26 +190,6 @@ spec: - name: config configMap: name: {{ template "core.modelBackend" . }} - - name: model-repository - {{- if not .Values.persistence.enabled }} - emptyDir: {} - {{- else if $modelRepository.existingClaim }} - persistentVolumeClaim: - claimName: {{ $modelRepository.existingClaim }} - {{- else }} - persistentVolumeClaim: - claimName: core-model-repository-data-volume - {{- end }} - - name: ray-conda - {{- if not .Values.persistence.enabled }} - emptyDir: {} - {{- else if $rayConda.existingClaim }} - persistentVolumeClaim: - claimName: {{ $rayConda.existingClaim }} - {{- else }} - persistentVolumeClaim: - claimName: {{ template "core.rayCondaDataVolume" . }} - {{- end }} {{- if .Values.internalTLS.enabled }} - name: model-internal-certs secret: diff --git a/charts/core/templates/model-backend/post-install-job.yaml b/charts/core/templates/model-backend/post-install-job.yaml index 5d99e41c..1e9ae266 100644 --- a/charts/core/templates/model-backend/post-install-job.yaml +++ b/charts/core/templates/model-backend/post-install-job.yaml @@ -1,5 +1,4 @@ {{- if .Values.tags.model -}} -{{- $modelRepository := .Values.persistence.persistentVolumeClaim.modelRepository -}} {{- if .Values.modelBackend.initModel.enabled -}} apiVersion: batch/v1 kind: Job @@ -58,8 +57,6 @@ spec: - name: config mountPath: {{ .Values.modelBackend.configPath }} subPath: config.yaml - - name: model-repository - mountPath: /model-repository env: - name: MODEL_BACKEND_HOST value: "{{ template "core.modelBackend" . }}" @@ -67,16 +64,6 @@ spec: - name: config configMap: name: {{ template "core.modelBackend" . }} - - name: model-repository - {{- if not .Values.persistence.enabled }} - emptyDir: {} - {{- else if $modelRepository.existingClaim }} - persistentVolumeClaim: - claimName: {{ $modelRepository.existingClaim }} - {{- else }} - persistentVolumeClaim: - claimName: {{ template "core.modelRepositoryDataVolume" . }} - {{- end }} {{- with .Values.modelBackend.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/core/templates/pvc.yaml b/charts/core/templates/pvc.yaml index 59404c06..242cbfa7 100644 --- a/charts/core/templates/pvc.yaml +++ b/charts/core/templates/pvc.yaml @@ -1,64 +1,4 @@ {{- if .Values.persistence.enabled }} -{{- if .Values.tags.model -}} -{{- $modelRepository := .Values.persistence.persistentVolumeClaim.modelRepository -}} -{{- if not $modelRepository.existingClaim }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "core.modelRepositoryDataVolume" . }} - annotations: - {{- range $key, $value := $modelRepository.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if eq .Values.persistence.resourcePolicy "keep" }} - helm.sh/resource-policy: keep - {{- end }} - labels: - {{- include "core.labels" . | nindent 4 }} - app.kubernetes.io/component: model-backend -spec: - accessModes: - - {{ $modelRepository.accessMode }} - resources: - requests: - storage: {{ $modelRepository.size }} - {{- if $modelRepository.storageClass }} - {{- if eq "-" $modelRepository.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $modelRepository.storageClass }} - {{- end }} - {{- end }} -{{- end }} -{{- $rayConda := .Values.persistence.persistentVolumeClaim.rayConda -}} -{{- if not $rayConda.existingClaim }} ---- -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "core.rayCondaDataVolume" . }} - annotations: - {{- range $key, $value := $rayConda.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - labels: - {{- include "core.labels" . | nindent 4 }} - app.kubernetes.io/component: model-backend -spec: - accessModes: - - {{ $rayConda.accessMode }} - resources: - requests: - storage: {{ $rayConda.size }} - {{- if $rayConda.storageClass }} - {{- if eq "-" $rayConda.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $rayConda.storageClass }} - {{- end }} - {{- end }} -{{- end }} -{{- end }} {{- if eq .Values.registry.config.storage.type "filesystem" }} {{- $registry := .Values.persistence.persistentVolumeClaim.registry -}} {{- if not $registry.existingClaim }} diff --git a/charts/core/templates/ray-service/ray-service.yaml b/charts/core/templates/ray-service/ray-service.yaml index ba627078..5846acd6 100644 --- a/charts/core/templates/ray-service/ray-service.yaml +++ b/charts/core/templates/ray-service/ray-service.yaml @@ -1,6 +1,4 @@ {{- if .Values.tags.model -}} -{{- $modelRepository := .Values.persistence.persistentVolumeClaim.modelRepository -}} -{{- $rayConda := .Values.persistence.persistentVolumeClaim.rayConda -}} apiVersion: ray.io/v1 kind: RayCluster metadata: @@ -15,7 +13,7 @@ spec: upscalingMode: Default # idleTimeoutSeconds is the number of seconds to wait before scaling down a worker pod which is not using Ray resources. idleTimeoutSeconds: 60 - imagePullPolicy: Always + imagePullPolicy: {{ $.Values.rayService.image.pullPolicy }} securityContext: {} env: [] envFrom: [] @@ -39,23 +37,6 @@ spec: {{- toYaml . | nindent 10 }} {{- end }} volumes: - - name: ray-conda - {{- if not $.Values.persistence.enabled }} - emptyDir: {} - {{- else if $rayConda.existingClaim }} - persistentVolumeClaim: - claimName: {{ $rayConda.existingClaim }} - {{- else }} - persistentVolumeClaim: - claimName: {{ template "core.rayCondaDataVolume" . }} - {{- end }} - - name: cp-conda-env-configmap - configMap: - name: cp-conda-env - defaultMode: 0777 - items: - - key: cp_conda_env.sh - path: cp_conda_env.sh - name: podman-configmap configMap: name: podman @@ -81,7 +62,7 @@ spec: # for mounting /dev/fuse # TODO: maybe implement a fuse-device-plugin-daemonset privileged: true - imagePullPolicy: Always + imagePullPolicy: {{ $.Values.rayService.image.pullPolicy }} {{- if .Values.rayService.headGroupSpec.resources }} resources: {{- toYaml .Values.rayService.headGroupSpec.resources | nindent 14 }} @@ -96,10 +77,6 @@ spec: - name: RAY_worker_register_timeout_seconds value: "360" volumeMounts: - - mountPath: /ray-conda-pack - name: ray-conda - - mountPath: /home/ray/script - name: cp-conda-env-configmap - mountPath: /etc/containers/ name: podman-configmap ports: @@ -124,10 +101,9 @@ spec: - "/bin/bash" - "-c" - > - if [[ -n $${NVIDIA_VISIBLE_DEVICES} ]]; then + if [[ -n ${NVIDIA_VISIBLE_DEVICES} ]]; then sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml; fi; - /home/ray/script/cp_conda_env.sh preStop: exec: command: ["/bin/sh","-c","ray stop"] @@ -154,23 +130,6 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} volumes: - - name: model-repository - {{- if not $.Values.persistence.enabled }} - emptyDir: {} - {{- else if $modelRepository.existingClaim }} - persistentVolumeClaim: - claimName: {{ $modelRepository.existingClaim }} - {{- else }} - persistentVolumeClaim: - claimName: core-model-repository-data-volume - {{- end }} - - name: start-ray-serve-configmap - configMap: - name: start-ray-serve - defaultMode: 0777 - items: - - key: start_ray_serve.sh - path: start_ray_serve.sh - name: podman-configmap configMap: name: podman @@ -186,7 +145,7 @@ spec: securityContext: # for newuidmap privileged: true - imagePullPolicy: Always + imagePullPolicy: {{ $.Values.rayService.image.pullPolicy }} env: - name: RAY_worker_register_timeout_seconds value: "360" @@ -197,10 +156,17 @@ spec: - "/bin/bash" - "-c" - > - if [[ -n $${NVIDIA_VISIBLE_DEVICES} ]]; then + if [[ -n ${NVIDIA_VISIBLE_DEVICES} ]]; then sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml; fi; - /home/ray/script/start_ray_serve.sh + while true; do + ray health-check 2>/dev/null; + if [ "$?" = "0" ]; then + break; + fi; + sleep 1; + done; + serve start --http-host=0.0.0.0 --grpc-port 9000 --grpc-servicer-functions ray_pb2_grpc.add_RayServiceServicer_to_server preStop: exec: command: ["/bin/sh","-c","ray stop"] @@ -217,65 +183,12 @@ spec: {{- toYaml $workerGroupSpecs.resources | nindent 16 }} {{- end }} volumeMounts: - - mountPath: /home/ray/script - name: start-ray-serve-configmap - - mountPath: /model-repository - name: model-repository - mountPath: /etc/containers/ name: podman-configmap {{- end }} --- apiVersion: v1 kind: ConfigMap -metadata: - name: cp-conda-env -data: - cp_conda_env.sh: | - #!/bin/bash - - # wait for ray cluster to finish initialization - while true; do - ray health-check 2>/dev/null - if [ "$?" = "0" ]; then - break - else - echo "INFO: waiting for ray head to start" - sleep 1 - fi - done - - echo "INFO: copying Conda env to the shared folder /ray-conda-pack" - - sudo chown -R 1000:100 /ray-conda-pack - cp -r /home/ray/anaconda3/* /ray-conda-pack - - echo "INFO: Conda env copying done" ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: start-ray-serve -data: - start_ray_serve.sh: | - #!/bin/bash - - # wait for ray cluster to finish initialization - while true; do - ray health-check 2>/dev/null - if [ "$?" = "0" ]; then - break - else - echo "INFO: waiting for ray head to start" - sleep 1 - fi - done - - serve start --http-host=0.0.0.0 --grpc-port 9000 --grpc-servicer-functions ray_pb2_grpc.add_RayServiceServicer_to_server - - echo "INFO: Start ray serve" ---- -apiVersion: v1 -kind: ConfigMap metadata: name: podman data: diff --git a/charts/core/templates/registry/deployment.yaml b/charts/core/templates/registry/deployment.yaml index 1dd5ad9c..63f1e625 100644 --- a/charts/core/templates/registry/deployment.yaml +++ b/charts/core/templates/registry/deployment.yaml @@ -59,7 +59,7 @@ spec: - 'ping' env: - name: REDIS_HOST - value: "{{ .Values.registry.config.redis.addr }}" + value: "{{ (split ":" .Values.registry.config.redis.addr)._0 }}" containers: - name: registry image: {{ .Values.registry.image.repository }}:{{ .Values.registry.image.tag }} diff --git a/charts/core/values.yaml b/charts/core/values.yaml index a2c5da95..7901cf11 100644 --- a/charts/core/values.yaml +++ b/charts/core/values.yaml @@ -179,14 +179,6 @@ internalTLS: crt: "" # Content of model-backend's TLS key file, only available when `certSource` is "manual" key: "" - # controller-model related cert configuration - controllerModel: - # secret name for controller-model's tls certs, only available when `certSource` is "secret" - secretName: "" - # Content of controller-model's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of controller-model's TLS key file, only available when `certSource` is "manual" - key: "" # console related cert configuration console: # secret name for console's tls certs, only available when `certSource` is "secret" @@ -215,20 +207,6 @@ persistence: # and redis components, i.e. they are never deleted automatically) resourcePolicy: "keep" persistentVolumeClaim: - modelRepository: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 500Gi - annotations: {} - rayConda: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 20Gi - annotations: {} # If external database is used, the following settings for database will be ignored database: existingClaim: "" @@ -520,69 +498,6 @@ modelBackend: ownerid: admin enabled: false path: https://raw.githubusercontent.com/instill-ai/model/main/model-hub/model_hub_cpu.json - cache: - enabled: false - cache_dir: /model-repository/.cache/models - retentionperiod: 24h - github: - patenabled: false - pat: - # -- Add extra env variables - extraEnv: [] - # -- Mount external volumes - # For example, mount a secret containing Certificate root CA to verify database - # TLS connection. - extraVolumes: [] - # - name: my-volume - # secret: - # secretName: my-secret - extraVolumeMounts: [] - # - name: my-volume - # mountPath: /etc/secrets/my-secret - # readOnly: true - # -- Add extra init containers - extraInitContainers: [] - # extraInitContainers: - # - name: ... - # image: ... - # -- Add extra sidecar containers - sidecarContainers: {} - # -- Additional deployment annotations - podAnnotations: {} - # -- Additional service annotations - serviceAnnotations: {} - resources: {} - autoscaling: - enabled: false - minReplicas: - maxReplicas: - targetCPUUtilizationPercentage: - targetAverageMemoryUtilization: - nodeSelector: {} - tolerations: [] - affinity: {} - podDisruptionBudget: - enabled: false - spec: - minAvailable: -# -- The configuration of controller-model -controllerModel: - # -- The image of controller - image: - repository: instill/controller-model - tag: 0.4.0-alpha - pullPolicy: IfNotPresent - # -- The command names to be executed - commandName: - main: controller-model - # -- The path of configuration file for mgmt-backend - configPath: /controller-model/config/config.yaml - # -- Set the service account to be used, default if left empty - serviceAccountName: "" - # -- Mount the service account token - automountServiceAccountToken: false - # -- The number of replica for controller - replicaCount: 1 # -- Add extra env variables extraEnv: [] # -- Mount external volumes @@ -608,7 +523,6 @@ controllerModel: # -- Additional service annotations serviceAnnotations: {} resources: {} - loopinterval: 3 autoscaling: enabled: false minReplicas: @@ -622,7 +536,6 @@ controllerModel: enabled: false spec: minAvailable: - maxUnavailable: # -- The configuration of artifact-backend artifactBackend: # -- The image of artifact-backend @@ -770,6 +683,7 @@ rayService: repository: instill/ray version: "2.9.3" tag: 0.3.0-alpha + pullPolicy: IfNotPresent headGroupSpec: resources: limits: @@ -1157,15 +1071,6 @@ database: port: username: password: -# -- The configuration of etcd -etcd: - persistence: - enabled: false - auth: - rbac: - create: false - autoCompactionMode: revision - autoCompactionRetention: 1 # -- The configuration of Redis redis: # -- If external Redis is used, set "enabled" to false diff --git a/docker-compose-build.yml b/docker-compose-build.yml index 697506e1..75af14f4 100644 --- a/docker-compose-build.yml +++ b/docker-compose-build.yml @@ -8,7 +8,6 @@ services: - exclude-console - exclude-pipeline - exclude-model - - exclude-controller-model - exclude-artifact image: ${API_GATEWAY_IMAGE}:${API_GATEWAY_VERSION} build: @@ -26,7 +25,6 @@ services: - exclude-console - exclude-pipeline - exclude-model - - exclude-controller-model - exclude-artifact image: ${MGMT_BACKEND_IMAGE}:${MGMT_BACKEND_VERSION} build: @@ -43,7 +41,6 @@ services: - exclude-mgmt - exclude-console - exclude-model - - exclude-controller-model - exclude-artifact image: ${PIPELINE_BACKEND_IMAGE}:${PIPELINE_BACKEND_VERSION} build: @@ -60,7 +57,6 @@ services: - exclude-mgmt - exclude-console - exclude-pipeline - - exclude-controller-model - exclude-artifact image: ${MODEL_BACKEND_IMAGE}:${MODEL_BACKEND_VERSION} build: @@ -72,23 +68,6 @@ services: UBUNTU_VERSION: ${UBUNTU_VERSION} ARTIVC_VERSION: ${ARTIVC_VERSION} - controller_model: - profiles: - - all - - exclude-api-gateway - - exclude-mgmt - - exclude-console - - exclude-pipeline - - exclude-model - - exclude-artifact - image: ${CONTROLLER_MODEL_IMAGE}:${CONTROLLER_MODEL_VERSION} - build: - context: ./${CONTROLLER_MODEL_HOST} - args: - SERVICE_NAME: ${CONTROLLER_MODEL_HOST} - GOLANG_VERSION: ${GOLANG_VERSION} - K6_VERSION: ${K6_VERSION} - console: profiles: - all @@ -96,7 +75,6 @@ services: - exclude-mgmt - exclude-pipeline - exclude-model - - exclude-controller-model - exclude-artifact image: ${CONSOLE_IMAGE}:${CONSOLE_VERSION} build: @@ -109,7 +87,6 @@ services: - exclude-mgmt - exclude-pipeline - exclude-model - - exclude-controller-model - exclude-artifact image: ${CONSOLE_IMAGE}-playwright:${CONSOLE_VERSION} build: @@ -125,7 +102,6 @@ services: - exclude-console - exclude-pipeline - exclude-model - - exclude-controller-model image: ${ARTIFACT_BACKEND_IMAGE}:${ARTIFACT_BACKEND_VERSION} build: context: ./${ARTIFACT_BACKEND_HOST} diff --git a/docker-compose-latest.yml b/docker-compose-latest.yml index 96d059ad..d1fcd979 100644 --- a/docker-compose-latest.yml +++ b/docker-compose-latest.yml @@ -8,7 +8,6 @@ services: - exclude-console - exclude-pipeline - exclude-model - - exclude-controller-model - exclude-artifact image: ${API_GATEWAY_IMAGE}:latest environment: @@ -21,7 +20,6 @@ services: - exclude-console - exclude-pipeline - exclude-model - - exclude-controller-model - exclude-artifact image: ${MGMT_BACKEND_IMAGE}:latest environment: @@ -38,7 +36,6 @@ services: - exclude-console - exclude-pipeline - exclude-model - - exclude-controller-model - exclude-artifact image: ${MGMT_BACKEND_IMAGE}:latest environment: @@ -52,7 +49,6 @@ services: - exclude-mgmt - exclude-console - exclude-model - - exclude-controller-model - exclude-artifact image: ${PIPELINE_BACKEND_IMAGE}:latest environment: @@ -69,7 +65,6 @@ services: - exclude-mgmt - exclude-console - exclude-model - - exclude-controller-model - exclude-artifact image: ${PIPELINE_BACKEND_IMAGE}:latest environment: @@ -83,7 +78,6 @@ services: - exclude-mgmt - exclude-console - exclude-pipeline - - exclude-controller-model - exclude-artifact image: ${MODEL_BACKEND_IMAGE}:latest environment: @@ -96,7 +90,6 @@ services: - exclude-mgmt - exclude-console - exclude-pipeline - - exclude-controller-model - exclude-artifact image: ${MODEL_BACKEND_IMAGE}:latest environment: @@ -113,7 +106,6 @@ services: - exclude-mgmt - exclude-console - exclude-pipeline - - exclude-controller-model - exclude-artifact image: ${MODEL_BACKEND_IMAGE}:latest environment: @@ -128,7 +120,6 @@ services: - exclude-console - exclude-pipeline - exclude-model - - exclude-controller-model image: ${ARTIFACT_BACKEND_IMAGE}:latest environment: CFG_SERVER_DEBUG: "true" @@ -137,22 +128,6 @@ services: - ${ARTIFACT_BACKEND_PRIVATEPORT}:${ARTIFACT_BACKEND_PRIVATEPORT} - ${ARTIFACT_BACKEND_PUBLICPORT}:${ARTIFACT_BACKEND_PUBLICPORT} - controller_model: - profiles: - - all - - exclude-api-gateway - - exclude-mgmt - - exclude-console - - exclude-pipeline - - exclude-model - - exclude-artifact - image: ${CONTROLLER_MODEL_IMAGE}:latest - environment: - CFG_SERVER_DEBUG: "true" - CFG_SERVER_EDITION: ${EDITION} - ports: - - ${CONTROLLER_MODEL_PRIVATEPORT}:${CONTROLLER_MODEL_PRIVATEPORT} - console: profiles: - all @@ -160,7 +135,6 @@ services: - exclude-mgmt - exclude-pipeline - exclude-model - - exclude-controller-model - exclude-artifact image: ${CONSOLE_IMAGE}:latest environment: @@ -191,10 +165,6 @@ services: ports: - ${REDIS_PORT}:6379 - etcd: - ports: - - ${ETCD_CLIENT_PORT}:${ETCD_CLIENT_PORT} - registry: ports: - ${REGISTRY_EXTERNAL_PORT}:5000 diff --git a/docker-compose.yml b/docker-compose.yml index 542aff77..093df427 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,12 +9,6 @@ volumes: name: vdp airbyte: name: airbyte - model_repository: - name: model-repository - model_cache: - name: model-cache - ray_conda: - name: ray-conda elasticsearch_data: name: elasticsearch-data @@ -250,7 +244,7 @@ services: CFG_SERVER_USAGE_ENABLED: ${USAGE_ENABLED} CFG_SERVER_EDITION: ${EDITION} CFG_RAYSERVER_GRPCURI: ${RAY_SERVER_HOST}:${RAY_SERVER_SERVE_GRPC_PORT} - CFG_RAYSERVER_MODELSTORE: /model-repository + CFG_RAYSERVER_MODELSTORE: /model-backend CFG_RAYSERVER_VRAM: ${RAY_SERVER_VRAM} CFG_DATABASE_HOST: ${POSTGRESQL_HOST} CFG_DATABASE_PORT: ${POSTGRESQL_PORT} @@ -262,10 +256,6 @@ services: CFG_CACHE_REDIS_REDISOPTIONS_ADDR: ${REDIS_HOST}:${REDIS_PORT} CFG_LOG_EXTERNAL: ${OBSERVE_ENABLED} CFG_LOG_OTELCOLLECTOR_PORT: ${OTEL_COLLECTOR_PORT} - volumes: - - model_repository:/model-repository - - model_cache:/.cache - - ray_conda:/ray-conda command: - /bin/sh - -c @@ -314,10 +304,6 @@ services: CFG_CACHE_REDIS_REDISOPTIONS_ADDR: ${REDIS_HOST}:${REDIS_PORT} CFG_LOG_EXTERNAL: ${OBSERVE_ENABLED} CFG_LOG_OTELCOLLECTOR_PORT: ${OTEL_COLLECTOR_PORT} - volumes: - - model_repository:/model-repository - - model_cache:/.cache - - ray_conda:/ray-conda entrypoint: ./model-backend-worker depends_on: temporal: @@ -336,25 +322,6 @@ services: model_backend: condition: service_healthy - controller_model: - container_name: ${CONTROLLER_MODEL_HOST} - image: ${CONTROLLER_MODEL_IMAGE}:${CONTROLLER_MODEL_VERSION} - restart: unless-stopped - environment: - CFG_SERVER_DEBUG: "false" - CFG_SERVER_EDITION: ${EDITION} - CFG_DATABASE_HOST: ${POSTGRESQL_HOST} - CFG_DATABASE_PORT: ${POSTGRESQL_PORT} - CFG_DATABASE_USERNAME: postgres - CFG_DATABASE_PASSWORD: password - CFG_ETCD_HOST: ${ETCD_HOST} - CFG_ETCD_PORT: ${ETCD_CLIENT_PORT} - CFG_LOG_EXTERNAL: ${OBSERVE_ENABLED} - CFG_LOG_OTELCOLLECTOR_PORT: ${OTEL_COLLECTOR_PORT} - entrypoint: ./controller-model - volumes: - - model_repository:/model-repository - artifact_backend: container_name: ${ARTIFACT_BACKEND_HOST} image: ${ARTIFACT_BACKEND_IMAGE}:${ARTIFACT_BACKEND_VERSION} @@ -478,8 +445,6 @@ services: serve start --http-host=0.0.0.0 --grpc-port ${RAY_SERVER_SERVE_GRPC_PORT} --grpc-servicer-functions ray_pb2_grpc.add_RayServiceServicer_to_server && tail -f /dev/null' volumes: - - model_repository:/model-repository - - ray_conda:/home/ray/anaconda3/ - /var/lib/containers:/var/lib/containers - ${CONFIG_DIR_PATH}/registry/registries.conf:/etc/containers/registries.conf healthcheck: @@ -582,23 +547,6 @@ services: ports: - ${REDOC_OPENAPI_PORT}:80 - etcd: - container_name: ${ETCD_HOST} - image: ${ETCD_IMAGE}:v${ETCD_VERSION} - restart: unless-stopped - environment: - ETCD_NAME: ${ETCD_HOST} - ETCD_ADVERTISE_CLIENT_URLS: http://${ETCD_HOST}:${ETCD_CLIENT_PORT} - ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:${ETCD_CLIENT_PORT} - ETCD_INITIAL_ADVERTISE_PEER_URLS: http://${ETCD_HOST}:${ETCD_PEER_PORT} - ETCD_LISTEN_PEER_URLS: http://0.0.0.0:${ETCD_PEER_PORT} - ETCD_INITIAL_CLUSTER_TOKEN: ${ETCD_CLUSTER_TOKEN} - ETCD_INITIAL_CLUSTER_STATE: ${ETCD_CLUSTER_STATE} - ETCD_INITIAL_CLUSTER: ${ETCD_HOST}=http://${ETCD_HOST}:${ETCD_PEER_PORT} - ETCDCTL_API: ${ETCDCTL_API} - ETCD_AUTO_COMPACTION_MODE: ${ETCD_AUTO_COMPACTION_MODE} - ETCD_AUTO_COMPACTION_RETENTION: ${ETCD_AUTO_COMPACTION_RETENTION} - openfga_migrate: image: ${OPENFGA_IMAGE}:${OPENFGA_VERSION} container_name: ${OPENFGA_HOST}_migrate