Skip to content

Commit

Permalink
Merge branch 'master' into f/chrisma/upgrade-pulsar-client
Browse files Browse the repository at this point in the history
  • Loading branch information
theAntiYeti authored Aug 22, 2023
2 parents 4b5ae4b + c964465 commit 371ec54
Show file tree
Hide file tree
Showing 15 changed files with 407 additions and 182 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/autoupdate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: autoupdate
on:
# This will trigger on all pushes to all branches.
push: {}
# Alternatively, you can only trigger if commits are pushed to certain branches, e.g.:
# push:
# branches:
# - master
# - unstable
jobs:
autoupdate:
name: autoupdate
runs-on: ubuntu-22.04
steps:
- uses: docker://chinthakagodawita/autoupdate-action:v1
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
PR_LABELS: "auto-update"
MERGE_MSG: "Branch was auto-updated."
RETRY_COUNT: "5"
RETRY_SLEEP: "300"
MERGE_CONFLICT_ACTION: "fail"
18 changes: 0 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@ jobs:
path: ./internal/lookout/ui/junit.xml
if-no-files-found: error

- name: Send Coverage Report to Codecov
if: always()
uses: codecov/codecov-action@v3
with:
file: ./internal/lookout/ui/coverage/cobertura-coverage.xml
flags: unittests
name: codecov-armada-ts-unit-tests
verbose: true

go-unit-tests:
name: Golang Unit Tests
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -94,15 +85,6 @@ jobs:
path: test-reports/
if-no-files-found: error

- name: Send Coverage Report to Codecov
if: always()
uses: codecov/codecov-action@v3
with:
file: ./test-reports/coverage.out
flags: unittests
name: codecov-armada-go-unit-tests
verbose: true

go-integration-tests:
name: Golang Integration Tests
runs-on: ubuntu-22.04
Expand Down
8 changes: 0 additions & 8 deletions codecov.yml

This file was deleted.

2 changes: 1 addition & 1 deletion developer/airflow/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM apache/airflow:2.6.0-python3.10
FROM apache/airflow:2.7.0-python3.10

RUN umask 0002; \
mkdir -p /home/airflow/client
Expand Down
9 changes: 5 additions & 4 deletions developer/airflow/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# The following variables are supported:
#
# AIRFLOW_IMAGE_NAME - Docker image name used to run Airflow.
# Default: apache/airflow:2.6.0
# Default: apache/airflow:|version|
# AIRFLOW_UID - User ID in Airflow containers
# Default: 50000
# AIRFLOW_PROJ_DIR - Base path to which all the files will be volumed.
Expand All @@ -50,7 +50,7 @@ x-airflow-common:
# In order to add custom dependencies or upgrade provider packages you can use your extended image.
# Comment the image line, place your Dockerfile in the directory where you placed the docker-compose.yaml
# and uncomment the "build" line below, Then run `docker-compose build` to build the images.
# image: ${AIRFLOW_IMAGE_NAME:-apache/airflow:2.6.0}
# image: ${AIRFLOW_IMAGE_NAME:-apache/airflow:|version|}
build: .
environment:
&airflow-common-env
Expand Down Expand Up @@ -78,6 +78,7 @@ x-airflow-common:
- ${AIRFLOW_PROJ_DIR:-.}/armada_client:/opt/airflow/armada_client
- ${AIRFLOW_PROJ_DIR:-.}/dags:/opt/airflow/dags
- ${AIRFLOW_PROJ_DIR:-.}/logs:/opt/airflow/logs
- ${AIRFLOW_PROJ_DIR:-.}/config:/opt/airflow/config
- ${AIRFLOW_PROJ_DIR:-.}/plugins:/opt/airflow/plugins
user: "${AIRFLOW_UID:-50000}:0"
depends_on:
Expand Down Expand Up @@ -160,7 +161,7 @@ services:
healthcheck:
test:
- "CMD-SHELL"
- 'celery --app airflow.executors.celery_executor.app inspect ping -d "celery@$${HOSTNAME}"'
- 'celery --app airflow.providers.celery.executors.celery_executor.app inspect ping -d "celery@$${HOSTNAME}" || celery --app airflow.executors.celery_executor.app inspect ping -d "celery@$${HOSTNAME}"'
interval: 30s
timeout: 10s
retries: 5
Expand Down Expand Up @@ -264,7 +265,7 @@ services:
# yamllint enable rule:line-length
environment:
<<: *airflow-common-env
_AIRFLOW_DB_UPGRADE: 'true'
_AIRFLOW_DB_MIGRATE: 'true'
_AIRFLOW_WWW_USER_CREATE: 'true'
_AIRFLOW_WWW_USER_USERNAME: ${_AIRFLOW_WWW_USER_USERNAME:-airflow}
_AIRFLOW_WWW_USER_PASSWORD: ${_AIRFLOW_WWW_USER_PASSWORD:-airflow}
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
152 changes: 8 additions & 144 deletions docs/design/diagrams/relationships/generate.py
Original file line number Diff line number Diff line change
@@ -1,147 +1,11 @@
from diagrams import Cluster, Diagram, Edge
from diagrams.onprem.database import PostgreSQL
from diagrams.onprem.inmemory import Redis
from diagrams.k8s.controlplane import API
from diagrams.custom import Custom
import subprocess

graph_attr = {
"concentrate": "false",
"splines": "ortho",
"pad": "2",
"nodesep": "0.30",
"ranksep": "1.5",
"fontsize": "20",
}
def run_scripts():
# Run generate_v1.py
subprocess.run(["python", "generate_v1.py"])

node_attr = {
# decrease image size
"fixedsize": "true",
"width": "1",
"height": "1",
"fontsize": "15",
}
# Run generate_v2.py
subprocess.run(["python", "generate_v2.py"])

edge_attr = {
"minlen": "1",
}

cluster_attr_common = {
"margin": "20",
"fontsize": "15",
}

cluster_attr_server = {
"labelloc": "b",
"bgcolor": "#c7ffd5",
}
cluster_attr_server = {**cluster_attr_common, **cluster_attr_server}

cluster_attr_exec = {
"labelloc": "t",
"bgcolor": "#c7ffd5",
}

cluster_attr_exec = {**cluster_attr_common, **cluster_attr_exec}

armada_logo = "../files/armada.png"
pulsar_logo = "../files/pulsar.png"
browser_logo = "../files/browser.png"

with Diagram(
name="Armada Systems Diagram",
show=False,
direction="LR",
graph_attr=graph_attr,
edge_attr=edge_attr,
node_attr=node_attr,
filename="out/armada_systems_diagram",
):
pulsar = Custom("Pulsar", pulsar_logo)

# Databases
postgres_lookout = PostgreSQL("Postgres (Lookout)")
postgres_scheduler = PostgreSQL("Postgres (Scheduler)")
redis_events = Redis("Redis (Events)")

# Components
server = Custom("Server", armada_logo)
client = Custom("Client", armada_logo)
scheduler = Custom("Scheduler", armada_logo)

# Lookout Parts
lookout_api = Custom("Lookout API", armada_logo)
lookoutUI = Custom("Lookout UI", armada_logo)

# Ingesters
lookout_ingester = Custom("Lookout Ingester", armada_logo)
scheduler_ingester = Custom("Scheduler Ingester", armada_logo)
event_ingerster = Custom("Event Ingester", armada_logo)

with Cluster("Executor Cluster", graph_attr=cluster_attr_server):
executor = Custom("Executor", armada_logo)
k8s_api = API("K8s API")
binoculars = Custom("Binoculars", armada_logo)

with Cluster("Executor Cluster 2", graph_attr=cluster_attr_server):
executor2 = Custom("Executor 2", armada_logo)
k8s_api2 = API("K8s API 2")
binoculars2 = Custom("Binoculars", armada_logo)

# Relationships

# client sends requests to the server
client >> Edge(color="black") >> server

# submit api talks to pulsar
server >> Edge(color="red") >> pulsar

# pulsar talks to each of the ingesters
pulsar >> Edge(color="red") >> lookout_ingester
pulsar >> Edge(color="red") >> scheduler_ingester
pulsar >> Edge(color="red") >> event_ingerster

# make postgres blue, redis orange
# lookout and scheduler ingesters talk to postgres
# the other ingesters talk to redis
lookout_ingester >> Edge(color="blue") >> postgres_lookout
scheduler_ingester >> Edge(color="blue") >> postgres_scheduler

event_ingerster >> Edge(color="orange") >> redis_events

# the postgres scheduler talks to the scheduler and executor api
postgres_scheduler >> Edge(color="blue") >> scheduler

# the scheduler talks to pulsar
scheduler >> Edge(color="red") >> pulsar

executor >> Edge(color="blue") >> k8s_api
k8s_api >> Edge(color="blue") >> executor

executor2 >> Edge(color="blue") >> k8s_api2
k8s_api2 >> Edge(color="blue") >> executor2

# The binoculars in every cluster talks to k8s, and
# then talks directly to the lookout UI
k8s_api >> Edge(color="blue") >> binoculars
binoculars >> Edge(color="black") >> lookoutUI

k8s_api2 >> Edge(color="blue") >> binoculars2
binoculars2 >> Edge(color="black") >> lookoutUI

# Lookout API gets its data from postgres
# and passes it to the lookout UI
postgres_lookout >> Edge(color="blue") >> lookout_api
lookout_api >> Edge(color="black") >> lookoutUI

# The scheduler talks to the executor api
scheduler >> Edge(color="blue") >> executor
scheduler >> Edge(color="blue") >> executor2

# pulsar talks to the server
pulsar >> Edge(color="red") >> server

# redis events are given back to the server
redis_events >> Edge(color="orange") >> server

# and passed to the client
server >> Edge(color="black") >> client
if __name__ == "__main__":
run_scripts()
Loading

0 comments on commit 371ec54

Please sign in to comment.