Skip to content

Commit

Permalink
chore(env,docker-compose,helm): add model backend connection info (#404)
Browse files Browse the repository at this point in the history
Because

- we want to make the VDP connect to Instill Model in internal network
mode

This commit

- add model backend connection info
  • Loading branch information
donch1989 authored Dec 12, 2023
1 parent ce4119e commit 5e4699f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ CONTROLLER_VDP_VERSION=0.1.6-alpha
CONTROLLER_VDP_HOST=controller-vdp
CONTROLLER_VDP_PRIVATEPORT=3085

# model-backend
MODEL_BACKEND_HOST=model-backend
MODEL_BACKEND_PUBLICPORT=8083

# socat
SOCAT_IMAGE=alpine/socat
SOCAT_VERSION=1.7.4.4-r0
Expand Down
9 changes: 9 additions & 0 deletions charts/vdp/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ app.kubernetes.io/name: {{ include "vdp.name" . }}
{{- printf "%s-controller-vdp" (include "vdp.fullname" .) -}}
{{- end -}}

{{- define "model.modelBackend" -}}
{{- print "model-model-backend" -}}
{{- end -}}

{{- define "core.database" -}}
{{- printf "core-database" -}}
{{- end -}}
Expand Down Expand Up @@ -158,6 +162,11 @@ app.kubernetes.io/name: {{ include "vdp.name" . }}
{{- printf "3084" -}}
{{- end -}}

{{/* model-backend service and container public port */}}
{{- define "model.modelBackend.publicPort" -}}
{{- printf "8083" -}}
{{- end -}}

{{/* temporal container frontend gRPC port */}}
{{- define "core.temporal.frontend.grpcPort" -}}
{{- printf "7233" -}}
Expand Down
8 changes: 8 additions & 0 deletions charts/vdp/templates/pipeline-backend/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ data:
cert: /etc/instill-ai/vdp/ssl/mgmt/tls.crt
key: /etc/instill-ai/vdp/ssl/mgmt/tls.key
{{- end }}
modelbackend:
host: {{ template "model.modelBackend" . }}
publicport: {{ template "model.modelBackend.publicPort" . }}
{{- if .Values.internalTLS.enabled }}
https:
cert: /etc/instill-ai/vdp/ssl/model/tls.crt
key: /etc/instill-ai/vdp/ssl/model/tls.key
{{- end }}
controller:
host: {{ template "vdp.controllerVDP" . }}
privateport: {{ template "vdp.controllerVDP.privatePort" . }}
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ services:
CFG_DATABASE_PASSWORD: password
CFG_MGMTBACKEND_HOST: ${MGMT_BACKEND_HOST}
CFG_MGMTBACKEND_PRIVATEPORT: ${MGMT_BACKEND_PRIVATEPORT}
CFG_MODELBACKEND_HOST: ${MODEL_BACKEND_HOST}
CFG_MODELBACKEND_PUBLICPORT: ${MODEL_BACKEND_PUBLICPORT}
CFG_TEMPORAL_CLIENTOPTIONS_HOSTPORT: ${TEMPORAL_HOST}:${TEMPORAL_PORT}
CFG_CACHE_REDIS_REDISOPTIONS_ADDR: ${REDIS_HOST}:${REDIS_PORT}
CFG_LOG_EXTERNAL: ${OBSERVE_ENABLED}
Expand Down Expand Up @@ -92,6 +94,8 @@ services:
CFG_DATABASE_PASSWORD: password
CFG_MGMTBACKEND_HOST: ${MGMT_BACKEND_HOST}
CFG_MGMTBACKEND_PRIVATEPORT: ${MGMT_BACKEND_PRIVATEPORT}
CFG_MODELBACKEND_HOST: ${MODEL_BACKEND_HOST}
CFG_MODELBACKEND_PUBLICPORT: ${MODEL_BACKEND_PUBLICPORT}
CFG_TEMPORAL_CLIENTOPTIONS_HOSTPORT: ${TEMPORAL_HOST}:${TEMPORAL_PORT}
CFG_CACHE_REDIS_REDISOPTIONS_ADDR: ${REDIS_HOST}:${REDIS_PORT}
CFG_LOG_EXTERNAL: ${OBSERVE_ENABLED}
Expand Down

0 comments on commit 5e4699f

Please sign in to comment.