Skip to content

Commit

Permalink
Merge pull request #14 from NVIDIA/solu/helm-updates
Browse files Browse the repository at this point in the history
Various updates for EA
  • Loading branch information
drobison00 authored Aug 28, 2024
2 parents 0a229dc + 7dd740e commit 3297454
Show file tree
Hide file tree
Showing 11 changed files with 231 additions and 82 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
helm/charts/*
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,10 @@ RUN apt-get update \
# Copy the module code
COPY setup.py setup.py
# Don't copy full source here, pipelines won't be installed via setup anyway, and this allows us to rebuild more quickly if we're just changing the pipeline
COPY src/nv_ingest src/nv_ingest
COPY client client

COPY ci ci
COPY requirements.txt test-requirements.txt util-requirements.txt ./

RUN rm -rf ./src/nv_ingest/dist ./client/dist

SHELL ["/bin/bash", "-c"]

# Prevent haystack from ending telemetry data
Expand All @@ -52,6 +49,14 @@ ENV NV_INGEST_RELEASE_TYPE=${RELEASE_TYPE}
ENV NV_INGEST_VERSION_OVERRIDE=${NV_INGEST_VERSION_OVERRIDE}
ENV NV_INGEST_CLIENT_VERSION_OVERRIDE=${NV_INGEST_VERSION_OVERRIDE}

# Cache the requirements and install them before uploading source code changes
RUN source activate morpheus \
&& pip install -r requirements.txt

COPY client client
COPY src/nv_ingest src/nv_ingest
RUN rm -rf ./src/nv_ingest/dist ./client/dist

# Run the build_pip_packages.sh script with the specified build type and library
RUN chmod +x ./ci/scripts/build_pip_packages.sh \
&& ./ci/scripts/build_pip_packages.sh --type ${RELEASE_TYPE} --lib client \
Expand Down
30 changes: 30 additions & 0 deletions helm/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
dependencies:
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
version: 2.22.0
- name: redis
repository: oci://registry-1.docker.io/bitnamicharts
version: 19.1.3
- name: zipkin
repository: https://zipkin.io/zipkin-helm
version: 0.1.2
- name: opentelemetry-collector
repository: https://open-telemetry.github.io/opentelemetry-helm-charts
version: 0.78.1
- name: yolox-nim
repository: https://helm.ngc.nvidia.com/ohlfw0olaadg/ea-participants
version: 0.1.6
- name: cached-nim
repository: https://helm.ngc.nvidia.com/ohlfw0olaadg/ea-participants
version: 0.1.6
- name: paddleocr-nim
repository: https://helm.ngc.nvidia.com/ohlfw0olaadg/ea-participants
version: 0.1.6
- name: deplot-nim
repository: https://helm.ngc.nvidia.com/ohlfw0olaadg/ea-participants
version: 0.1.6
- name: milvus
repository: https://zilliztech.github.io/milvus-helm
version: 4.1.11
digest: sha256:d8d6e4f52bbd9f2ed9bebff78bbb0f7d797fd2c9e8e0c6fbb3c48954871dd7c6
generated: "2024-08-27T10:52:08.944313-06:00"
14 changes: 9 additions & 5 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: nv-ingest
description: NV-Ingest Microservice
type: application
version: 0.3.4
version: 0.3.5
maintainers:
- name: NVIDIA Corporation
url: https://www.nvidia.com/
Expand All @@ -28,17 +28,21 @@ dependencies:
condition: otelDeployed
- name: yolox-nim
repository: "alias:ngc"
version: 0.1.5
version: 0.1.6
condition: yoloxDeployed
- name: cached-nim
repository: "alias:ngc"
version: 0.1.5
version: 0.1.6
condition: cachedDeployed
- name: paddleocr-nim
repository: "alias:ngc"
version: 0.1.5
version: 0.1.6
condition: paddleocrDeployed
- name: deplot-nim
repository: "alias:ngc"
version: 0.1.5
version: 0.1.6
condition: deplotDeployed
- name: milvus
repository: https://zilliztech.github.io/milvus-helm
version: 4.1.11
condition: milvusDeployed
50 changes: 32 additions & 18 deletions helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ helm upgrade \
--set imagePullSecret.password="${NGC_API_KEY}" \
--set ngcSecret.create=true \
--set ngcSecret.password="${NGC_API_KEY}" \
--set image.repository="#placeholder" \
--set image.tag="24.08-rc2" \
#placeholder
--set image.repository="nvcr.io/ohlfw0olaadg/ea-participants/nv-ingest" \
--set image.tag="24.08" \
https://helm.ngc.nvidia.com/ohlfw0olaadg/ea-participants/charts/nv-ingest-0.3.5.tgz

```

Expand Down Expand Up @@ -101,6 +101,17 @@ explicitly called out here.
| `deplot-nim.image.repository` | The repository to override the location of the Deplot NIM | |
| `deplot-nim.image.tag` | The tag override for Deplot NIM | |

### Milvus Deployment parameters

NVIngest uses Milvus and Minio to store extracted images from a document
This chart by default sets up a Milvus standalone instance in the namespace using the
Helm chart at found https://artifacthub.io/packages/helm/milvus-helm/milvus

| Name | Description | Value |
| ---------------- | ---------------------------------------------------------------------- | --------- |
| `milvusDeployed` | Whether to deploy Milvus and Minio from this helm chart | `true` |
| `milvus` | Find values at https://artifacthub.io/packages/helm/milvus-helm/milvus | `sane {}` |

### Autoscaling parameters

Values used for creating a `Horizontal Pod Autoscaler`. If autoscaling is not enabled, the rest are ignored.
Expand Down Expand Up @@ -134,28 +145,31 @@ Define environment variables as key/value dictionary pairs
| `envVars.MESSAGE_CLIENT_HOST` | Override this value if disabling Redis deployment in this chart. | `"nv-ingest-redis-master"` |
| `envVars.MESSAGE_CLIENT_PORT` | Override this value if disabling Redis deployment in this chart. | `"6379"` |
| `envVars.NV_INGEST_DEFAULT_TIMEOUT_MS` | Override the Timeout of the NVIngest requests. | `"1234"` |
| `envVars.MINIO_INTERNAL_ADDRESS` | Override this to the cluster local DNS name of minio | `"nv-ingest-minio:9000"` |
| `envVars.MINIO_PUBLIC_ADDRESS` | Override this to publicly routable minio address, default assumes port-forwarding | `"http://localhost:9000"` |
| `envVars.MINIO_BUCKET` | Override this for specific minio bucket to upload extracted images to | `"nv-ingest"` |

### Open Telemetry

Define environment variables as key/value dictionary pairs for configuring OTEL Deployments
A sane set of parameters is set for the deployed version of OpenTelemetry with this Helm Chart.
Override any values to the Open Telemetry helm chart by overriding the `open-telemetry` value.

| Name | Description | Value |
| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| `otelEnabled` | Whether to enable OTEL collection | `false` |
| `otelDeployed` | Whether to deploy OTEL from this helm chart | `false` |
| `otelEnvVars` | Adds arbitrary environment variables for configuring OTEL using key-value pairs, for example NAME: value | `sane {}` |
| `otelEnvVars.OTEL_EXPORTER_OTLP_ENDPOINT` | | `"http://$(HOST_IP):4317" # sends to gRPC receiver on port 4317` |
| `otelEnvVars.OTEL_SERVICE_NAME` | | `"nemo-retrieval-service"` |
| `otelEnvVars.OTEL_TRACES_EXPORTER` | | `"otlp"` |
| `otelEnvVars.OTEL_METRICS_EXPORTER` | | `"otlp"` |
| `otelEnvVars.OTEL_LOGS_EXPORTER` | | `"none"` |
| `otelEnvVars.OTEL_PROPAGATORS` | | `"tracecontext baggage"` |
| `otelEnvVars.OTEL_RESOURCE_ATTRIBUTES` | | `"deployment.environment=$(NAMESPACE)"` |
| `otelEnvVars.OTEL_PYTHON_EXCLUDED_URLS` | | `"health"` |
| `opentelemetry-collector` | Configures the opentelemetry helm chart - see https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-collector/values.yaml | |
| `zipkinDeployed` | Whether to deploy Zipkin with OpenTelemetry from this helm chart | `false` |
| Name | Description | Value |
| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
| `otelEnabled` | Whether to enable OTEL collection | `true` |
| `otelDeployed` | Whether to deploy OTEL from this helm chart | `true` |
| `opentelemetry-collector` | Configures the opentelemetry helm chart - see https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-collector/values.yaml | |
| `otelEnvVars` | Adds arbitrary environment variables for configuring OTEL using key-value pairs, for example NAME: value | `sane {}` |
| `otelEnvVars.OTEL_EXPORTER_OTLP_ENDPOINT` | Default deployment target for GRPC otel - Default "http://{{ .Release.Name }}-opentelemetry-collector:4317" | |
| `otelEnvVars.OTEL_SERVICE_NAME` | | `"nemo-retrieval-service"` |
| `otelEnvVars.OTEL_TRACES_EXPORTER` | | `"otlp"` |
| `otelEnvVars.OTEL_METRICS_EXPORTER` | | `"otlp"` |
| `otelEnvVars.OTEL_LOGS_EXPORTER` | | `"none"` |
| `otelEnvVars.OTEL_PROPAGATORS` | | `"tracecontext baggage"` |
| `otelEnvVars.OTEL_RESOURCE_ATTRIBUTES` | | `"deployment.environment=$(NAMESPACE)"` |
| `otelEnvVars.OTEL_PYTHON_EXCLUDED_URLS` | | `"health"` |
| `zipkinDeployed` | Whether to deploy Zipkin with OpenTelemetry from this helm chart | `true` |

### Ingress parameters

Expand Down
28 changes: 17 additions & 11 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ spec:
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.containerArgs }}
args:
{{- toYaml .Values.containerArgs | nindent 12 }}
{{- end }}
env:
- name: HOST_IP
valueFrom:
Expand All @@ -70,6 +74,18 @@ spec:
- name: TMPDIR
value: /scratch/tmp

{{- if .Values.envVars.INGEST_LOG_LEVEL }}
- name: INGEST_LOG_LEVEL
value: "{{ .Values.envVars.INGEST_LOG_LEVEL }}"
{{- else }}
- name: INGEST_LOG_LEVEL
value: "{{ .Values.logLevel }}"
{{- end }}
- name: CONSOLE_LOG_LEVEL
value: "{{ .Values.logLevel }}"
- name: LOG_LEVEL
value: "{{ .Values.logLevel }}"

{{- if .Values.envVars }}
{{- range $k, $v := .Values.envVars }}
- name: "{{ $k }}"
Expand All @@ -85,16 +101,10 @@ spec:
{{- end }}
{{- if and .Values.otelEnabled ( not ( index .Values.otelEnvVars "OTEL_EXPORTER_OTLP_ENDPOINT" ) ) }}
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: "http://{{ .Release.Name }}-opentelemetry-collector:4318"
- name: OTEL_EXPORTER_OTLP_PROTOCOL
value: http/protobuf
value: "http://{{ .Release.Name }}-opentelemetry-collector:4317"
{{- end }}
- name: CONSOLE_LOG_LEVEL
value: "{{ .Values.logLevel }}"
- name: OTEL_LOG_LEVEL
value: "{{ .Values.logLevel }}"
- name: LOG_LEVEL
value: "{{ .Values.logLevel }}"
{{- else }}
- name: OTEL_TRACES_EXPORTER
value: none
Expand All @@ -106,10 +116,6 @@ spec:
value: "false"
- name: LOG_HANDLERS
value: console
- name: CONSOLE_LOG_LEVEL
value: "{{ .Values.logLevel }}"
- name: LOG_LEVEL
value: "{{ .Values.logLevel }}"
{{- end }}
envFrom:
{{- if .Values.extraEnvVarsCM }}
Expand Down
Loading

0 comments on commit 3297454

Please sign in to comment.