Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build and deploy docs

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
working-directory: ./docs
run: pip install -r requirements.txt
- name: Build docs
working-directory: ./docs
run: mkdocs build
- name: Upload artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/site/
name: site
deploy:
needs: build
if: github.event_name != 'pull_request' && github.ref_name == 'main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
395 changes: 395 additions & 0 deletions docs/LICENSE

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/docs/deploy_infrastructure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Deploy Infrastructure
112 changes: 112 additions & 0 deletions docs/docs/deploy_services.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Deploy Services

This page explains how to deploy the FRIDGE services to a Kubernetes cluster.
This process includes configuring for various components such as Argo Workflows, MinIO, network policies, and other infrastructure settings.
It does not deploy the Kubernetes cluster itself; instead, it assumes that a Kubernetes cluster is already available.

!!! note
To read about deploying the Kubernetes cluster see [Deploy Infrastructure](deploy_infrastructure.md).

!!! warning
Container-based Kubernetes environments such as K3d or Kind are not supported, as Longhorn is not compatible with those environments.

## Deployment

### Pulumi Backend

You can use any backend you like for Pulumi.
The [Pulumi documentation](https://www.pulumi.com/docs/iac/concepts/state-and-backends/) details how to use various backends.
For local development and testing, you can use the local backend:

```console
pulumi login --local
```

### Virtual Environment

First, set up a virtual environment for this project.
You can use the following commands:

```console
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
```

### Creating a stack

The `infra/fridge/` folder already contains a Pulumi project configuration file (`Pulumi.yaml`), so you do not need to run `pulumi new` to create a new project.
The `Pulumi.yaml` file defines the project name and a schema for the configurations for individual stacks.

To create a new stack, you can use the following command:

```console
pulumi stack init <stack-name>
```

!!! note
You will be asked to provide a passphrase for the stack, which is used to encrypt secrets within the stack's configuration settings.

### Configuring your stack

Each stack has its own configuration settings, defined in the `Pulumi.<stack-name>.yaml` files.
The configuration can be manually edited, or you can use the Pulumi CLI to set configuration values.
You can set individual configuration values for the stack using the following command:

```console
pulumi config set <key> <value>
```

Some of the configuration keys must be set as secrets, such as the MinIO access key and secret key.
Those *must* be set using the Pulumi CLI using the `--secret` flag:

```console
pulumi config set --secret minio_root_password <your-minio-secret-key>
```

For a complete list of configuration keys, see the `Pulumi.yaml` file.

### Kubernetes context

Pulumi requires that the Kubernetes context is set for the stack.
For example, to set the Kubernetes context for the `dawn` stack, you can use:

```console
pulumi config set kubernetes:context dawn
```

This must match one of the contexts in your local `kubeconfig`.
You can check the available contexts with `kubectl`:

```console
kubectl config get-contexts
```

### Deploying with Pulumi

Once you have set up the stack and its configuration, you can deploy the stack using the following command:

```console
pulumi up
```

## FRIDGE deployment targets

Currently, FRIDGE is configured to support deployment on Azure Kubernetes Service (AKS) and on DAWN AI.
FRIDGE uses Cilium for networking, and thus requires a Kubernetes cluster with Cilium installed.

In the table below, you can see the components need to be deployed to each target.
Some components are pre-installed on DAWN.

| Component | AKS | DAWN | Local |
| ----------------- | ----- | ----- | ----- |
| argo-workflows | ✅ | ✅ | ✅ |
| cert-manager.io | ✅ | | ✅ |
| cilium | | | ✅ |
| fridge-api | ✅ | ✅ | ✅ |
| harbor | ✅ | ✅ | ✅ |
| hubble | ✅ | | ✅ |
| ingress-nginx | ✅ | | ✅ |
| longhorn | | ✅ | ✅ |
| minio | ✅ | ✅ | ✅ |
| prometheus | ✅ | | ✅ |
1 change: 1 addition & 0 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# FRIDGE
11 changes: 11 additions & 0 deletions docs/docs/prerequisites.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Prerequisites

You will need the following tools installed to deploy FRIDGE:

- [Python](https://www.python.org/downloads/) 3.11 or later
- [Pulumi](https://www.pulumi.com/docs/get-started/install/)
- [kubectl](https://kubernetes.io/docs/tasks/tools/)

Additionally, if deploying to Azure:

- [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)
16 changes: 16 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
site_name: FRIDGE
repo_url: https://github.com/alan-turing-institute/fridge
edit_uri: blob/main/docs/docs/
site_url: https://alan-turing-institute.github.io/fridge
copyright: >-
© The contributors.

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
nav:
- Home: 'index.md'
- Prerequisites: 'prerequisites.md'
- Deploy Infrastructure: 'deploy_infrastructure.md'
- Deploy Services: 'deploy_services.md'
markdown_extensions:
- admonition
1 change: 1 addition & 0 deletions docs/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mkdocs>=1.6.1
45 changes: 45 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# This file is autogenerated by pip-compile with Python 3.13
# by the following command:
#
# pip-compile
#
click==8.3.0
# via mkdocs
ghp-import==2.1.0
# via mkdocs
jinja2==3.1.6
# via mkdocs
markdown==3.9
# via mkdocs
markupsafe==3.0.3
# via
# jinja2
# mkdocs
mergedeep==1.3.4
# via
# mkdocs
# mkdocs-get-deps
mkdocs==1.6.1
# via -r requirements.in
mkdocs-get-deps==0.2.0
# via mkdocs
packaging==25.0
# via mkdocs
pathspec==0.12.1
# via mkdocs
platformdirs==4.5.0
# via mkdocs-get-deps
python-dateutil==2.9.0.post0
# via ghp-import
pyyaml==6.0.3
# via
# mkdocs
# mkdocs-get-deps
# pyyaml-env-tag
pyyaml-env-tag==1.1
# via mkdocs
six==1.17.0
# via python-dateutil
watchdog==6.0.0
# via mkdocs
Loading