-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR integrates the new proving broker implementation added in #8495 into the orchestrator and adds a new caching layer between the orchestrator and the job broker able to resolve jobs that have already been finished (in order to provide crash recovery for the prover-node). --------- Co-authored-by: Santiago Palladino <[email protected]>
- Loading branch information
1 parent
b5a6aa4
commit 6fd5fc1
Showing
65 changed files
with
2,330 additions
and
1,092 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
{{- if .Values.proverBroker.enabled }} | ||
apiVersion: apps/v1 | ||
kind: ReplicaSet | ||
metadata: | ||
name: {{ include "aztec-network.fullname" . }}-prover-broker | ||
labels: | ||
{{- include "aztec-network.labels" . | nindent 4 }} | ||
spec: | ||
replicas: {{ .Values.proverBroker.replicas }} | ||
selector: | ||
matchLabels: | ||
{{- include "aztec-network.selectorLabels" . | nindent 6 }} | ||
app: prover-broker | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "aztec-network.selectorLabels" . | nindent 8 }} | ||
app: prover-broker | ||
spec: | ||
serviceAccountName: {{ include "aztec-network.fullname" . }}-node | ||
{{- if .Values.network.public }} | ||
hostNetwork: true | ||
{{- end }} | ||
volumes: | ||
- name: config | ||
emptyDir: {} | ||
- name: scripts | ||
configMap: | ||
name: {{ include "aztec-network.fullname" . }}-scripts | ||
initContainers: | ||
{{- include "aztec-network.serviceAddressSetupContainer" . | nindent 8 }} | ||
- name: wait-for-prover-node | ||
image: {{ .Values.images.aztec.image }} | ||
command: | ||
- /bin/bash | ||
- -c | ||
- | | ||
source /shared/config/service-addresses | ||
{{- if .Values.telemetry.enabled }} | ||
until curl --head --silent {{ include "aztec-network.otelCollectorMetricsEndpoint" . }} > /dev/null; do | ||
echo "Waiting for OpenTelemetry collector..." | ||
sleep 5 | ||
done | ||
echo "OpenTelemetry collector is ready!" | ||
{{- end }} | ||
volumeMounts: | ||
- name: config | ||
mountPath: /shared/config | ||
containers: | ||
- name: prover-broker | ||
image: "{{ .Values.images.aztec.image }}" | ||
imagePullPolicy: {{ .Values.images.aztec.pullPolicy }} | ||
volumeMounts: | ||
- name: config | ||
mountPath: /shared/config | ||
command: | ||
- "/bin/bash" | ||
- "-c" | ||
- | | ||
source /shared/config/service-addresses && \ | ||
node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js start --prover-broker | ||
env: | ||
- name: AZTEC_PORT | ||
value: "{{ .Values.proverBroker.service.nodePort }}" | ||
- name: LOG_LEVEL | ||
value: "{{ .Values.proverBroker.logLevel }}" | ||
- name: LOG_JSON | ||
value: "1" | ||
- name: DEBUG | ||
value: "{{ .Values.proverBroker.debug }}" | ||
- name: PROVER_BROKER_POLL_INTERVAL_MS | ||
value: "{{ .Values.proverBroker.pollIntervalMs }}" | ||
- name: PROVER_BROKER_JOB_TIMEOUT_MS | ||
value: "{{ .Values.proverBroker.jobTimeoutMs }}" | ||
- name: PROVER_BROKER_JOB_MAX_RETRIES | ||
value: "{{ .Values.proverBroker.jobMaxRetries }}" | ||
- name: PROVER_BROKER_DATA_DIRECTORY | ||
value: "{{ .Values.proverBroker.dataDirectory }}" | ||
- name: OTEL_RESOURCE_ATTRIBUTES | ||
value: service.name={{ .Release.Name }},service.namespace={{ .Release.Namespace }},service.version={{ .Chart.AppVersion }},environment={{ .Values.environment | default "production" }} | ||
- name: OTEL_EXPORTER_OTLP_METRICS_ENDPOINT | ||
value: {{ include "aztec-network.otelCollectorMetricsEndpoint" . | quote }} | ||
- name: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT | ||
value: {{ include "aztec-network.otelCollectorTracesEndpoint" . | quote }} | ||
- name: OTEL_EXPORTER_OTLP_LOGS_ENDPOINT | ||
value: {{ include "aztec-network.otelCollectorLogsEndpoint" . | quote }} | ||
resources: | ||
{{- toYaml .Values.proverBroker.resources | nindent 12 }} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "aztec-network.fullname" . }}-prover-broker | ||
labels: | ||
{{- include "aztec-network.labels" . | nindent 4 }} | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
{{- include "aztec-network.selectorLabels" . | nindent 4 }} | ||
app: prover-broker | ||
ports: | ||
- port: {{ .Values.proverBroker.service.nodePort }} | ||
name: node | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.