Skip to content

Commit

Permalink
Reconcile config (#2002)
Browse files Browse the repository at this point in the history
* Add gresearch org to images built with goreleaser

* Use standard ports for binoculars

* Remove values from chart

* Refactor magefile

* Add worker bundle helm chart

* Add server bundle chart

* Refactor

* Update

* Update

* Use standard nats port

* Use standard nats port

* Use K8s 1.24 in Kind

* Update charts

* Build ingesters into lookout images

* Add .goattributes

* Normalize all the line endings

* Add to docs that protoc must be installed

* Reconcile config

* Update charts

* Remove annoying printline

* Remove charts

* Whitespace

* Lint

* go mod tidy
  • Loading branch information
severinson committed Jan 12, 2023
1 parent 9360670 commit a6e67d1
Show file tree
Hide file tree
Showing 37 changed files with 1,097 additions and 1,090 deletions.
9 changes: 9 additions & 0 deletions .gitattributes
@@ -0,0 +1,9 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Declare files that will always have LF line endings on checkout.
*.sh text eol=lf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
6 changes: 6 additions & 0 deletions .gitignore
Expand Up @@ -23,6 +23,12 @@ proto
protoc
protoc.zip

# Helm
charts/armada-server-bundle/charts/postgresql-*.tgz
charts/armada-server-bundle/charts/pulsar-*.tgz
charts/armada-server-bundle/charts/redis-ha-*.tgz
charts/armada-server-bundle/charts/stan-*.tgz

# Binaries for programs and plugins
*.exe
*.exe~
Expand Down
6 changes: 5 additions & 1 deletion .goreleaser.yml
Expand Up @@ -130,7 +130,7 @@ sboms:
env:
# If set, BASE_IMAGE determines the base image used for all containers.
- BASE_IMAGE_ARG={{ if index .Env "BASE_IMAGE" }}BASE_IMAGE={{ .Env.BASE_IMAGE }}{{ else }}{{ end }}
- DOCKER_REPO={{ if index .Env "DOCKER_REPO" }}{{ .Env.DOCKER_REPO }}/{{ else }}{{ end }}
- DOCKER_REPO={{ if index .Env "DOCKER_REPO" }}{{ .Env.DOCKER_REPO }}/{{ else }}gresearch/{{ end }}
# Goreleaser always uses the docker buildx builder with name "default"; see
# https://github.com/goreleaser/goreleaser/pull/3199
# To use a builder other than "default", set this variable.
Expand Down Expand Up @@ -316,12 +316,14 @@ dockers:
- --label=org.opencontainers.image.vendor=G-Research
ids:
- lookout
- lookoutingester
extra_files:
- internal\lookout\ui
- pkg/api/api.swagger.json
- pkg/api/lookout/api.swagger.json
- pkg/api/binoculars/api.swagger.json
- config/lookout/config.yaml
- config/lookoutingester/config.yaml
dockerfile: ./build_goreleaser/lookout/Dockerfile
- id: lookoutv2
use: buildx
Expand All @@ -348,8 +350,10 @@ dockers:
- --label=org.opencontainers.image.vendor=G-Research
ids:
- lookoutv2
- lookoutingesterv2
extra_files:
- config/lookoutv2/config.yaml
- config/lookoutingesterv2/config.yaml
dockerfile: ./build_goreleaser/lookoutv2/Dockerfile
- id: eventingester
use: buildx
Expand Down
2 changes: 2 additions & 0 deletions build_goreleaser/lookout/Dockerfile
Expand Up @@ -21,5 +21,7 @@ USER armada
COPY --from=NODE /ui/build/ /app/internal/lookout/ui/build
COPY lookout /app/
COPY config/lookout/ /app/config/lookout
COPY lookoutingester /app/
COPY config/lookoutingester/ /app/config/lookoutingester
WORKDIR /app
ENTRYPOINT ["./lookout"]
6 changes: 2 additions & 4 deletions build_goreleaser/lookoutv2/Dockerfile
@@ -1,12 +1,10 @@
ARG BASE_IMAGE=alpine:3.17.0
FROM ${BASE_IMAGE}

RUN addgroup -S -g 2000 armada && adduser -S -u 1000 armada -G armada
USER armada

COPY lookoutv2 /app/
COPY config/lookoutv2/config.yaml /app/config/lookoutv2/config.yaml

COPY lookoutingesterv2 /app/
COPY config/lookoutingesterv2/ /app/config/lookoutingesterv2
WORKDIR /app

ENTRYPOINT ["./lookoutv2"]
4 changes: 2 additions & 2 deletions config/armada/config.yaml
Expand Up @@ -120,8 +120,8 @@ eventsNats:
subject: "ArmadaTest"
timeout: 10s
servers:
- "nats://localhost:4223"
- "nats://stan:4223"
- "nats://localhost:4222"
- "nats://stan:4222"
databaseRetention:
jobRetentionDuration: 168h
eventRetention:
Expand Down
10 changes: 5 additions & 5 deletions config/binoculars/config.yaml
@@ -1,9 +1,9 @@
grpcPort: 50052
httpPort: 8082
metricsPort: 9002
grpcPort: 50051
httpPort: 8080
metricsPort: 9000
corsAllowedOrigins:
- http://localhost:3000
- http://localhost:8089
- http://localhost:8080
auth:
basicAuth:
enableAuthentication: false
Expand All @@ -19,4 +19,4 @@ grpc:
timeout: 20s
keepaliveEnforcementPolicy:
minTime: 5m
permitWithoutStream: false
permitWithoutStream: false
24 changes: 7 additions & 17 deletions config/lookout/config.yaml
@@ -1,7 +1,6 @@
grpcPort: 50059
httpPort: 8089
metricsPort: 9009

httpPort: 8080
metricsPort: 9000
grpc:
keepaliveParams:
maxConnectionIdle: 5m
Expand All @@ -10,36 +9,27 @@ grpc:
keepaliveEnforcementPolicy:
minTime: 5m
permitWithoutStream: false

uiConfig:
armadaApiBaseUrl: "http://localhost:8080"
armadaApiBaseUrl: "http://armada-server:8080"
userAnnotationPrefix: "armadaproject.io/"
binocularsEnabled: true
binocularsBaseUrlPattern: "http://localhost:8082" # {CLUSTER_ID} gets replaced by appropriate cluster id
binocularsBaseUrlPattern: "http://armada-binoculars:8080"
overviewAutoRefreshMs: 15000
jobSetsAutoRefreshMs: 15000
jobsAutoRefreshMs: 30000
lookoutV2ApiBaseUrl: "http://localhost:10000"

lookoutV2ApiBaseUrl: "http://armada-lookout-v2:10000"
postgres:
maxOpenConns: 100
maxIdleConns: 25
connMaxLifetime: 30m
connection:
host: localhost
host: postgres
port: 5432
user: postgres
password: psw
dbname: postgres
sslmode: disable

eventQueue: "ArmadaLookoutEventProcessor"
nats:
Servers:
- "nats://localhost:4223"
ClusterID: "test-cluster"
Subject: "ArmadaTest"

disableEventProcessing: true
prunerConfig:
daysToKeep: 42
batchSize: 1000
9 changes: 3 additions & 6 deletions config/lookoutingester/config.yaml
Expand Up @@ -3,23 +3,20 @@ postgres:
maxIdleConns: 25
connMaxLifetime: 30m
connection:
host: localhost
host: postgres
port: 5432
user: postgres
password: psw
dbname: postgres
sslmode: disable

metrics:
port: 9003

port: 9000
pulsar:
enabled: true
URL: "pulsar://localhost:6650"
URL: "pulsar://pulsar:6650"
jobsetEventsTopic: "events"
receiveTimeout: 5s
backoffTime: 1s

paralellism: 1
subscriptionName: "lookout-ingester"
batchSize: 10000
Expand Down
11 changes: 4 additions & 7 deletions config/lookoutingesterv2/config.yaml
Expand Up @@ -3,23 +3,20 @@ postgres:
maxIdleConns: 25
connMaxLifetime: 30m
connection:
host: localhost
host: postgres
port: 5433
user: postgres
password: psw
dbname: postgres
sslmode: disable

metrics:
port: 9004

port: 9000
pulsar:
enabled: true
URL: "pulsar://localhost:6650"
jobsetEventsTopic: "persistent://armada/armada/events"
URL: "pulsar://pulsar:6650"
jobsetEventsTopic: "events"
receiveTimeout: 5s
backoffTime: 1s

subscriptionName: "lookout-ingester-v2"
batchSize: 10000
batchDuration: 500ms
Expand Down
3 changes: 1 addition & 2 deletions config/lookoutv2/config.yaml
Expand Up @@ -3,13 +3,12 @@ corsAllowedOrigins:
- "http://localhost:3000"
- "http://localhost:8089"
- "http://localhost:10000"

postgres:
maxOpenConns: 100
maxIdleConns: 25
connMaxLifetime: 30m
connection:
host: localhost
host: postgres
port: 5433
user: postgres
password: psw
Expand Down
8 changes: 0 additions & 8 deletions deployment/executor/Chart.yaml
Expand Up @@ -3,11 +3,3 @@ description: A helm chart for armada-executor component
name: armada-executor
version: LATEST
appVersion: LATEST

priorityClasses:
- name: armada-default
value: 1000
description: "Default priority class for pods created by Armada."
- name: armada-preemptible
value: 900
description: "Priority class to be used for preemptible jobs."
40 changes: 15 additions & 25 deletions docker-compose.yaml
Expand Up @@ -42,9 +42,9 @@ services:
stan:
container_name: stan
image: nats-streaming
command: "-p 4223 -m 8223"
command: "-p 4222 -m 8223"
ports:
- 4223:4223
- 4222:4222
- 8223:8223
networks:
- kind
Expand All @@ -54,7 +54,7 @@ services:
#
server:
container_name: server
image: ${ARMADA_IMAGE:-armada}:${ARMADA_IMAGE_TAG:-latest}
image: ${ARMADA_IMAGE:-gresearch/armada}:${ARMADA_IMAGE_TAG:-latest}
networks:
- kind
ports:
Expand All @@ -67,14 +67,12 @@ services:
- postgres
- pulsar
- stan
- eventingester
working_dir: /app
entrypoint: ./server
command: --config /config/insecure-armada-auth-config.yaml
- eventingester
command: ./server --config /config/insecure-armada-auth-config.yaml

executor:
container_name: executor
image: ${ARMADA_IMAGE:-armada}:${ARMADA_IMAGE_TAG:-latest}
image: ${ARMADA_IMAGE:-gresearch/armada}:${ARMADA_IMAGE_TAG:-latest}
networks:
- kind
ports:
Expand All @@ -86,13 +84,11 @@ services:
- ./.kube/internal:/.kube
environment:
- KUBECONFIG=/.kube/config
working_dir: /app
entrypoint: ./executor
command: --config /config/insecure-executor-config.yaml
command: ./executor --config /config/insecure-executor-config.yaml

binoculars:
container_name: binoculars
image: ${ARMADA_IMAGE:-armada}:${ARMADA_IMAGE_TAG:-latest}
image: ${ARMADA_IMAGE:-gresearch/armada}:${ARMADA_IMAGE_TAG:-latest}
networks:
- kind
ports:
Expand All @@ -101,42 +97,36 @@ services:
- ./.kube/internal:/.kube
environment:
- KUBECONFIG=/.kube/config
working_dir: /app
entrypoint: ./binoculars
command: ./binoculars

jobservice:
container_name: jobservice
image: ${ARMADA_IMAGE:-armada}:${ARMADA_IMAGE_TAG:-latest}
image: ${ARMADA_IMAGE:-gresearch/armada}:${ARMADA_IMAGE_TAG:-latest}
networks:
- kind
ports:
- 60003:60003
depends_on:
- server
working_dir: "/app"
entrypoint: ./jobservice
command: ./jobservice

lookoutingester:
container_name: lookoutingester
image: ${ARMADA_IMAGE:-armada}:${ARMADA_IMAGE_TAG:-latest}
image: ${ARMADA_IMAGE:-gresearch/armada}:${ARMADA_IMAGE_TAG:-latest}
networks:
- kind
depends_on:
- postgres
- pulsar
volumes:
- ./localdev/config:/config
working_dir: /app
entrypoint: ./lookoutingester
command: --config /config/lookoutingester/config.yaml
command: ./lookoutingester --config /config/lookoutingester/config.yaml

eventingester:
container_name: eventingester
image: ${ARMADA_IMAGE:-armada}:${ARMADA_IMAGE_TAG:-latest}
image: ${ARMADA_IMAGE:-gresearch/armada}:${ARMADA_IMAGE_TAG:-latest}
networks:
- kind
depends_on:
- redis
- pulsar
working_dir: /app
entrypoint: ./eventingester
command: ./eventingester
16 changes: 8 additions & 8 deletions docs/design/jobservice/airflow-sequence.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a6e67d1

Please sign in to comment.