Skip to content

Commit

Permalink
Odin (#49)
Browse files Browse the repository at this point in the history
* fix(enki): allow problem to be published iff the sum of its tests scores is 100

* refactor(enki): use more conventional REST paths for endpoints and remove unused projs

* feat(odin): add http rerouting using envoy proxy

* feat(odin): add ssl termination

- add SSL termination for a newly exposed port and reroute traffic directly to services
- keep the HTTP listener which redirects traffic to Dapr Sidecars
- bug: quetzalcoatl app id not found for now using Dapr
- bug: HTTPS certificate not verified despite being added to CA Certs

* feat(odin): restrict access to eval-metadata

- deny access to enki eval-metadata endpoint using lua filter

* build: add github actions for publishing

* perf(odin): add support for env vars for cluster ports

* perf(odin): replace hard-coded clusters with dapr cluster

refactor: extract ancillary services to compose.override file

* fix: use proper paths for fixtures in seeder

* fix(mssql): pin docker image version based on ubuntu 22.04
  • Loading branch information
WarriorsSami authored Nov 2, 2024
1 parent ef5220f commit 0ed2921
Show file tree
Hide file tree
Showing 28 changed files with 1,593 additions and 759 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/build/anubis-eval.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build Docker image and publish to GitHub Packages

on:
push:
branches:
- develop

paths:
- "anubis-eval/**"
- ".github/workflows/anubis-eval.yaml"

pull_request:
branches:
- develop

paths:
- "anubis-eval/**"
- ".github/workflows/anubis-eval.yaml"

env:
REGISTRY: ghcr.io
IMAGE_NAME: anubis-eval

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/pantheonix/asgard/${{ env.IMAGE_NAME }}:latest

- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: anubis-eval
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
55 changes: 55 additions & 0 deletions .github/workflows/build/dapr-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build Docker image and publish to GitHub Packages

on:
push:
branches:
- develop

paths:
- "dapr/**"
- ".github/workflows/dapr-config.yaml"

pull_request:
branches:
- develop

paths:
- "dapr-config/**"
- ".github/workflows/dapr-config.yaml"

env:
REGISTRY: ghcr.io
IMAGE_NAME: dapr-config

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/pantheonix/asgard/${{ env.IMAGE_NAME }}:latest

- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: dapr-config
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
55 changes: 55 additions & 0 deletions .github/workflows/build/enki-problems.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build Docker image and publish to GitHub Packages

on:
push:
branches:
- develop

paths:
- "enki-problems/**"
- ".github/workflows/enki-problems.yaml"

pull_request:
branches:
- develop

paths:
- "enki-problems/**"
- ".github/workflows/enki-problems.yaml"

env:
REGISTRY: ghcr.io
IMAGE_NAME: enki-problems

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/pantheonix/asgard/${{ env.IMAGE_NAME }}:latest

- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: enki-problems
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
55 changes: 55 additions & 0 deletions .github/workflows/build/hermes-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build Docker image and publish to GitHub Packages

on:
push:
branches:
- develop

paths:
- "hermes-tests/**"
- ".github/workflows/hermes-tests.yaml"

pull_request:
branches:
- develop

paths:
- "hermes-tests/**"
- ".github/workflows/hermes-tests.yaml"

env:
REGISTRY: ghcr.io
IMAGE_NAME: hermes-tests

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/pantheonix/asgard/${{ env.IMAGE_NAME }}:latest

- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: hermes-tests
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
55 changes: 55 additions & 0 deletions .github/workflows/build/odin-gateway.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build Docker image and publish to GitHub Packages

on:
push:
branches:
- develop

paths:
- "odin-gateway/**"
- ".github/workflows/odin-gateway.yaml"

pull_request:
branches:
- develop

paths:
- "odin-gateway/**"
- ".github/workflows/odin-gateway.yaml"

env:
REGISTRY: ghcr.io
IMAGE_NAME: odin-gateway

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/pantheonix/asgard/${{ env.IMAGE_NAME }}:latest

- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: odin-gateway
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
55 changes: 55 additions & 0 deletions .github/workflows/build/quetzalcoatl-auth.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build Docker image and publish to GitHub Packages

on:
push:
branches:
- develop

paths:
- "quetzalcoatl-auth/**"
- ".github/workflows/quetzalcoatl-auth.yaml"

pull_request:
branches:
- develop

paths:
- "quetzalcoatl-auth/**"
- ".github/workflows/quetzalcoatl-auth.yaml"

env:
REGISTRY: ghcr.io
IMAGE_NAME: quetzalcoatl-auth

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/pantheonix/asgard/${{ env.IMAGE_NAME }}:latest

- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: quetzalcoatl-auth
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion anubis-eval/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM chef AS planner
COPY . .
RUN cargo chef prepare --recipe-path recipe.json

FROM chef as builder
FROM chef AS builder
LABEL stage=builder
ENV CARGO_TERM_COLOR always
RUN apt-get update && apt-get install -y libpq-dev libsqlite3-dev libmariadbclient-dev-compat pkg-config libssl1.1 libssl-dev && apt-get clean && rm -rf /var/lib/apt/lists/*
Expand Down
Loading

0 comments on commit 0ed2921

Please sign in to comment.