Skip to content

Commit

Permalink
feat(docker-compose,helm): remove controller-vdp
Browse files Browse the repository at this point in the history
  • Loading branch information
donch1989 committed Jan 5, 2024
1 parent 678f7dd commit 53362c4
Show file tree
Hide file tree
Showing 21 changed files with 13 additions and 416 deletions.
8 changes: 1 addition & 7 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ COMPOSE_PROJECT_NAME=instill-vdp
BUILD=false

# docker compose profiles to selectively launch components for developing the latest codebase of the specified component.
# the value can be all, api-gateway, mgmt, pipeline, controller-vdp, model, controller-model, or console.
# the value can be all, api-gateway, mgmt, pipeline, model, controller-model, or console.
PROFILE=all

# system-wise config path (all core, vdp, and model projects must use the same path)
Expand Down Expand Up @@ -60,12 +60,6 @@ MGMT_BACKEND_PRIVATEPORT=3084
MGMT_BACKEND_PUBLICPORT=8084
MGMT_BACKEND_VERSION=0.9.0-beta

# controller-vdp
CONTROLLER_VDP_IMAGE=instill/controller-vdp
CONTROLLER_VDP_VERSION=0.1.7-beta
CONTROLLER_VDP_HOST=controller-vdp
CONTROLLER_VDP_PRIVATEPORT=3085

# model-backend
MODEL_BACKEND_HOST=model-backend
MODEL_BACKEND_PUBLICPORT=8083
Expand Down
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The env variable `PROFILE` is intended to specify which service component you wa

- `{service}`

When you set `PROFILE={service}`, in which `{service}` can be `controller-vdp` or `pipeline`, it means you want to develop on that particular service. The `make` command will launch the corresponding stack **WITHOUT** that service component and **WITH** all its dependencies. Given that, you can later on spin up and down the `{service}` in your dev container. Please take the [pipeline-backend](https://github.com/instill-ai/pipeline-backend#local-dev) as an example.
When you set `PROFILE={service}`, in which `{service}` can be `pipeline`, it means you want to develop on that particular service. The `make` command will launch the corresponding stack **WITHOUT** that service component and **WITH** all its dependencies. Given that, you can later on spin up and down the `{service}` in your dev container. Please take the [pipeline-backend](https://github.com/instill-ai/pipeline-backend#local-dev) as an example.

### Tear down the local dev system

Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/helm-integration-test-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,8 @@ jobs:
--set edition=k8s-ce:test \
--set pipelineBackend.image.tag=latest \
--set pipelineBackend.excludelocalconnector=false \
--set controllerVDP.image.tag=latest \
--set tags.observability=false
kubectl rollout status deployment vdp-pipeline-backend --namespace instill-ai
kubectl rollout status deployment vdp-controller-vdp --namespace instill-ai
sleep 10
- name: Run ${{ inputs.component }} integration test (latest)
Expand Down Expand Up @@ -219,10 +217,8 @@ jobs:
--set edition=k8s-ce:test \
--set pipelineBackend.image.tag=latest \
--set pipelineBackend.excludelocalconnector=false \
--set controllerVDP.image.tag=latest \
--set tags.observability=false
kubectl rollout status deployment vdp-pipeline-backend --namespace instill-ai --timeout=120s
kubectl rollout status deployment vdp-controller-vdp --namespace instill-ai --timeout=120s
sleep 10
- name: Run ${{ inputs.component }} integration test (latest)
Expand Down Expand Up @@ -330,10 +326,8 @@ jobs:
--set edition=k8s-ce:test \
--set pipelineBackend.image.tag=${PIPELINE_BACKEND_VERSION} \
--set pipelineBackend.excludelocalconnector=false \
--set controllerVDP.image.tag=${CONTROLLER_VDP_VERSION} \
--set tags.observability=false
kubectl rollout status deployment vdp-pipeline-backend --namespace instill-ai
kubectl rollout status deployment vdp-controller-vdp --namespace instill-ai
sleep 10
- name: Run ${{ inputs.component }} integration test (release)
Expand Down Expand Up @@ -457,10 +451,8 @@ jobs:
--set edition=k8s-ce:test \
--set pipelineBackend.image.tag=${PIPELINE_BACKEND_VERSION} \
--set pipelineBackend.excludelocalconnector=false \
--set controllerVDP.image.tag=${CONTROLLER_VDP_VERSION} \
--set tags.observability=false
kubectl rollout status deployment vdp-pipeline-backend --namespace instill-ai --timeout=120s
kubectl rollout status deployment vdp-controller-vdp --namespace instill-ai --timeout=120s
sleep 10
- name: Run ${{ inputs.component }} integration test (release)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/helm-integration-test-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
component: [pipeline-backend, controller-vdp]
component: [pipeline-backend]
uses: instill-ai/vdp/.github/workflows/helm-integration-test-backend.yml@main
with:
component: ${{ matrix.component }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/helm-integration-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
component: [pipeline-backend, controller-vdp]
component: [pipeline-backend]
uses: instill-ai/vdp/.github/workflows/helm-integration-test-backend.yml@main
with:
component: ${{ matrix.component }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-test-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
component: [pipeline-backend, controller-vdp]
component: [pipeline-backend]
uses: instill-ai/vdp/.github/workflows/integration-test-backend.yml@main
with:
component: ${{ matrix.component }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
component: [pipeline-backend, controller-vdp]
component: [pipeline-backend]
uses: instill-ai/vdp/.github/workflows/integration-test-backend.yml@main
with:
component: ${{ matrix.component }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/make-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ jobs:
run: |
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:3085/v1beta/health/controller
- name: Tear down Instill VDP (latest)
run: |
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ jobs:
run: |
source .env
yq ".pipelineBackend.image.tag=\"$PIPELINE_BACKEND_VERSION\"" -i charts/vdp/values.yaml
yq ".controllerVDP.image.tag=\"$CONTROLLER_VDP_VERSION\"" -i charts/vdp/values.yaml
- name: Get current chart version
id: get-current-chart-version
run: |
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ RUN git clone https://github.com/instill-ai/core.git
WORKDIR /instill-ai/vdp

RUN git clone https://github.com/instill-ai/pipeline-backend.git
RUN git clone https://github.com/instill-ai/controller-vdp.git

FROM alpine:${ALPINE_VERSION} AS release

Expand All @@ -52,6 +51,5 @@ RUN git clone -b v${INSTILL_CORE_VERSION} -c advice.detachedHead=false https://g

WORKDIR /instill-ai/vdp

ARG PIPELINE_BACKEND_VERSION CONTROLLER_VDP_VERSION
ARG PIPELINE_BACKEND_VERSION
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${CONTROLLER_VDP_VERSION} -c advice.detachedHead=false https://github.com/instill-ai/controller-vdp.git
26 changes: 6 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ all: ## Launch all services with their up-to-date release version
--build-arg CACHE_DATE="$(shell date)" \
--build-arg INSTILL_CORE_VERSION=${INSTILL_CORE_VERSION} \
--build-arg PIPELINE_BACKEND_VERSION=${PIPELINE_BACKEND_VERSION} \
--build-arg CONTROLLER_VDP_VERSION=${CONTROLLER_VDP_VERSION} \
--target release \
-t ${CONTAINER_COMPOSE_IMAGE_NAME}:${INSTILL_VDP_VERSION} .; \
fi
Expand Down Expand Up @@ -161,7 +160,6 @@ build-latest: ## Build latest images for all VDP components
--name ${CONTAINER_BUILD_NAME}-latest \
${CONTAINER_COMPOSE_IMAGE_NAME}:latest /bin/sh -c " \
PIPELINE_BACKEND_VERSION=latest \
CONTROLLER_VDP_VERSION=latest \
docker compose -f docker-compose.build.yml build --progress plain \
"

Expand All @@ -174,7 +172,6 @@ build-release: ## Build release images for all VDP components
--build-arg CACHE_DATE="$(shell date)" \
--build-arg INSTILL_CORE_VERSION=${INSTILL_CORE_VERSION} \
--build-arg PIPELINE_BACKEND_VERSION=${PIPELINE_BACKEND_VERSION} \
--build-arg CONTROLLER_VDP_VERSION=${CONTROLLER_VDP_VERSION} \
--target release \
-t ${CONTAINER_COMPOSE_IMAGE_NAME}:${INSTILL_VDP_VERSION} .
@docker run --rm \
Expand All @@ -185,7 +182,6 @@ build-release: ## Build release images for all VDP components
${CONTAINER_COMPOSE_IMAGE_NAME}:${INSTILL_VDP_VERSION} /bin/sh -c " \
INSTILL_CORE_VERSION=${INSTILL_CORE_VERSION} \
PIPELINE_BACKEND_VERSION=${PIPELINE_BACKEND_VERSION} \
CONTROLLER_VDP_VERSION=${CONTROLLER_VDP_VERSION} \
docker compose -f docker-compose.build.yml build --progress plain \
"

Expand All @@ -196,8 +192,7 @@ integration-test-latest: ## Run integration test on the latest VDP
--network instill-network \
--name ${CONTAINER_BACKEND_INTEGRATION_TEST_NAME}-latest \
${CONTAINER_COMPOSE_IMAGE_NAME}:latest /bin/sh -c " \
/bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=${API_GATEWAY_HOST}:${API_GATEWAY_PORT}' && \
/bin/sh -c 'cd controller-vdp && 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}' \
"
@make down

Expand All @@ -208,8 +203,7 @@ integration-test-release: ## Run integration test on the release VDP
--network instill-network \
--name ${CONTAINER_BACKEND_INTEGRATION_TEST_NAME}-release \
${CONTAINER_COMPOSE_IMAGE_NAME}:${INSTILL_VDP_VERSION} /bin/sh -c " \
/bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=${API_GATEWAY_HOST}:${API_GATEWAY_PORT}' && \
/bin/sh -c 'cd controller-vdp && 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}' \
"
@make down

Expand Down Expand Up @@ -245,20 +239,16 @@ helm-integration-test-latest: ## Run integration test on t
--set edition=k8s-ce:test \
--set pipelineBackend.image.tag=latest \
--set pipelineBackend.excludelocalconnector=false \
--set controllerVDP.image.tag=latest \
--set tags.observability=false
@kubectl rollout status deployment vdp-pipeline-backend --namespace ${HELM_NAMESPACE} --timeout=120s
@kubectl rollout status deployment vdp-controller-vdp --namespace ${HELM_NAMESPACE} --timeout=120s
@sleep 30
ifeq ($(UNAME_S),Darwin)
@docker run --rm --name ${CONTAINER_BACKEND_INTEGRATION_TEST_NAME}-helm-latest ${CONTAINER_COMPOSE_IMAGE_NAME}:latest /bin/sh -c " \
/bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' && \
/bin/sh -c 'cd controller-vdp && 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}' \
"
else ifeq ($(UNAME_S),Linux)
@docker run --rm --network host --name ${CONTAINER_BACKEND_INTEGRATION_TEST_NAME}-helm-latest ${CONTAINER_COMPOSE_IMAGE_NAME}:latest /bin/sh -c " \
/bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}' && \
/bin/sh -c 'cd controller-vdp && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' \
/bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}' \
"
endif
@helm uninstall ${HELM_RELEASE_NAME} --namespace ${HELM_NAMESPACE}
Expand Down Expand Up @@ -299,20 +289,16 @@ helm-integration-test-release: ## Run integration test on
--set edition=k8s-ce:test \
--set pipelineBackend.image.tag=${PIPELINE_BACKEND_VERSION} \
--set pipelineBackend.excludelocalconnector=false \
--set controllerVDP.image.tag=${CONTROLLER_VDP_VERSION} \
--set tags.observability=false
@kubectl rollout status deployment vdp-pipeline-backend --namespace ${HELM_NAMESPACE} --timeout=120s
@kubectl rollout status deployment vdp-controller-vdp --namespace ${HELM_NAMESPACE} --timeout=120s
@sleep 10
ifeq ($(UNAME_S),Darwin)
@docker run --rm --name ${CONTAINER_BACKEND_INTEGRATION_TEST_NAME}-helm-release ${CONTAINER_COMPOSE_IMAGE_NAME}:${INSTILL_VDP_VERSION} /bin/sh -c " \
/bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' && \
/bin/sh -c 'cd controller-vdp && 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}' \
"
else ifeq ($(UNAME_S),Linux)
@docker run --rm --network host --name ${CONTAINER_BACKEND_INTEGRATION_TEST_NAME}-helm-release ${CONTAINER_COMPOSE_IMAGE_NAME}:${INSTILL_VDP_VERSION} /bin/sh -c " \
/bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}' && \
/bin/sh -c 'cd controller-vdp && make integration-test API_GATEWAY_URL=host.docker.internal:${API_GATEWAY_PORT}' \
/bin/sh -c 'cd pipeline-backend && make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}' \
"
endif
@helm uninstall ${HELM_RELEASE_NAME} --namespace ${HELM_NAMESPACE}
Expand Down
18 changes: 0 additions & 18 deletions charts/vdp/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,6 @@ app.kubernetes.io/name: {{ include "vdp.name" . }}
{{- printf "%s-pipeline-backend" (include "vdp.fullname" .) -}}
{{- end -}}


{{- define "vdp.controllerVDP" -}}
{{- printf "%s-controller-vdp" (include "vdp.fullname" .) -}}
{{- end -}}

{{- define "model.modelBackend" -}}
{{- print "model-model-backend" -}}
{{- end -}}
Expand Down Expand Up @@ -147,11 +142,6 @@ app.kubernetes.io/name: {{ include "vdp.name" . }}
{{- printf "3081" -}}
{{- end -}}

{{/* controller service and container private port */}}
{{- define "vdp.controllerVDP.privatePort" -}}
{{- printf "3085" -}}
{{- end -}}

{{/* mgmt-backend service and container public port */}}
{{- define "core.mgmtBackend.publicPort" -}}
{{- printf "8084" -}}
Expand Down Expand Up @@ -209,14 +199,6 @@ app.kubernetes.io/name: {{ include "vdp.name" . }}
{{- end -}}
{{- end -}}

{{- define "vdp.internalTLS.controllerVDP.secretName" -}}
{{- if eq .Values.internalTLS.certSource "secret" -}}
{{- .Values.internalTLS.controllerVDP.secretName -}}
{{- else -}}
{{- printf "%s-controller-vdp-internal-tls" (include "vdp.fullname" .) -}}
{{- end -}}
{{- end -}}

{{/* Allow KubeVersion to be overridden. */}}
{{- define "vdp.ingress.kubeVersion" -}}
{{- default .Capabilities.KubeVersion.Version .Values.expose.ingress.kubeVersionOverride -}}
Expand Down
42 changes: 0 additions & 42 deletions charts/vdp/templates/controller-vdp/configmap.yaml

This file was deleted.

Loading

0 comments on commit 53362c4

Please sign in to comment.