Skip to content

Commit

Permalink
Add API root and Auth token in
Browse files Browse the repository at this point in the history
auth token will need to be sed'd in to avoid committing it to version control
  • Loading branch information
mgdaily committed Jul 25, 2024
1 parent 6a8aacf commit d1d4d7d
Showing 1 changed file with 67 additions and 22 deletions.
89 changes: 67 additions & 22 deletions banzai/tests/e2e-k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,6 @@ spec:
securityContext:
fsGroup: 10000

initContainers:
# When the Pod is initialized, copy all files within the container at path
# /archive/engineering into the empty data volume mounted at /data
- name: banzai-data
image: docker.lco.global/banzai-e2e-data:1.4.2
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 10087
runAsGroup: 10000
volumeMounts:
- name: banzai-data
mountPath: /data
readOnly: false
command:
- /bin/cp
- -a
- /archive/engineering
- /data/

containers:
- name: banzai-redis
image: redis:5.0.3
Expand Down Expand Up @@ -66,8 +47,10 @@ spec:
readinessProbe:
exec:
command:
- rabbitmqctl
- node_health_check
- sh
- -c
- |
rabbitmq-diagnostics -q ping | grep "Ping succeeded"
initialDelaySeconds: 5
periodSeconds: 1
timeoutSeconds: 10
Expand Down Expand Up @@ -102,6 +85,10 @@ spec:
value: "e2e_task_queue"
- name: REFERENCE_CATALOG_URL
value: "http://phot-catalog.lco.gtn/"
- name: API_ROOT
value: "http://archive-api.lco.global/"
- name: AUTH_TOKEN
value: -authtoken-
command:
- celery
- -A
Expand All @@ -115,13 +102,15 @@ spec:
- "info"
- "-Q"
- "$(CELERY_TASK_QUEUE_NAME)"
- "-n"
- "celery-worker"
readinessProbe:
exec:
command:
- sh
- -c
- |
celery status -d "banzai-celery-worker" | grep "banzai-celery-worker:.*OK"
celery -A banzai status | grep "banzai-celery-worker:.*OK"
initialDelaySeconds: 5
periodSeconds: 1
timeoutSeconds: 10
Expand All @@ -132,6 +121,56 @@ spec:
limits:
cpu: 8
memory: 8Gi
- name: banzai-large-celery-workers
image: 127.0.0.1:5001/banzai
imagePullPolicy: IfNotPresent
volumeMounts:
- name: banzai-data
mountPath: /archive/engineering
subPath: engineering
readOnly: false
env:
- name: DB_ADDRESS
value: "sqlite:////archive/engineering/test.db"
- name: RETRY_DELAY
value: "0"
- name: TASK_HOST
value: "redis://localhost:6379/0"
- name: BANZAI_WORKER_LOGLEVEL
value: debug
- name: CALIBRATE_PROPOSAL_ID
value: "calibrate"
- name: OBSERVATION_PORTAL_URL
value: "http://internal-observation-portal.lco.gtn/api/observations/"
- name: OMP_NUM_THREADS
value: "2"
- name: FITS_EXCHANGE
value: "fits_files"
- name: OPENTSDB_PYTHON_METRICS_TEST_MODE
value: "1"
- name: CELERY_TASK_QUEUE_NAME
value: "e2e_large_task_queue"
- name: REFERENCE_CATALOG_URL
value: "http://phot-catalog.lco.gtn/"
- name: API_ROOT
value: "http://archive-api.lco.global/"
- name: AUTH_TOKEN
value: -authtoken-
command:
- celery
- -A
- banzai
- worker
- --hostname
- "banzai-celery-worker"
- --concurrency
- "1"
- -l
- "info"
- "-Q"
- "$(CELERY_TASK_QUEUE_NAME)"
- "-n"
- "large-celery-worker"
- name: banzai-celery-beat
image: 127.0.0.1:5001/banzai
imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -183,8 +222,14 @@ spec:
value: "1"
- name: CELERY_TASK_QUEUE_NAME
value: "e2e_task_queue"
- name: "CELERY_LARGE_TASK_QUEUE_NAME"
value: "e2e_large_task_queue"
- name: REFERENCE_CATALOG_URL
value: "http://phot-catalog.lco.gtn/"
- name: API_ROOT
value: "http://archive-api.lco.global/"
- name: AUTH_TOKEN
value: -authtoken-
command:
- banzai_run_realtime_pipeline
- "--db-address=sqlite:////archive/engineering/test.db"
Expand Down

0 comments on commit d1d4d7d

Please sign in to comment.