Skip to content

Commit 5861beb

Browse files
authored
Merge branch 'main' into configure-minio
2 parents b6a8a6c + 2f75fbf commit 5861beb

9 files changed

Lines changed: 631 additions & 0 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build and deploy docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
- name: Install dependencies
28+
working-directory: ./docs
29+
run: pip install -r requirements.txt
30+
- name: Build docs
31+
working-directory: ./docs
32+
run: mkdocs build
33+
- name: Upload artifact
34+
if: github.event_name != 'pull_request'
35+
uses: actions/upload-pages-artifact@v3
36+
with:
37+
path: ./docs/site/
38+
name: site
39+
deploy:
40+
needs: build
41+
if: github.event_name != 'pull_request' && github.ref_name == 'main'
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Deploy to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v4

docs/LICENSE

Lines changed: 395 additions & 0 deletions
Large diffs are not rendered by default.

docs/docs/deploy_infrastructure.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Deploy Infrastructure

docs/docs/deploy_services.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Deploy Services
2+
3+
This page explains how to deploy the FRIDGE services to a Kubernetes cluster.
4+
This process includes configuring for various components such as Argo Workflows, MinIO, network policies, and other infrastructure settings.
5+
It does not deploy the Kubernetes cluster itself; instead, it assumes that a Kubernetes cluster is already available.
6+
7+
!!! note
8+
To read about deploying the Kubernetes cluster see [Deploy Infrastructure](deploy_infrastructure.md).
9+
10+
!!! warning
11+
Container-based Kubernetes environments such as K3d or Kind are not supported, as Longhorn is not compatible with those environments.
12+
13+
## Deployment
14+
15+
### Pulumi Backend
16+
17+
You can use any backend you like for Pulumi.
18+
The [Pulumi documentation](https://www.pulumi.com/docs/iac/concepts/state-and-backends/) details how to use various backends.
19+
For local development and testing, you can use the local backend:
20+
21+
```console
22+
pulumi login --local
23+
```
24+
25+
### Virtual Environment
26+
27+
First, set up a virtual environment for this project.
28+
You can use the following commands:
29+
30+
```console
31+
python3 -m venv .venv
32+
source .venv/bin/activate
33+
pip install -r requirements.txt
34+
```
35+
36+
### Creating a stack
37+
38+
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.
39+
The `Pulumi.yaml` file defines the project name and a schema for the configurations for individual stacks.
40+
41+
To create a new stack, you can use the following command:
42+
43+
```console
44+
pulumi stack init <stack-name>
45+
```
46+
47+
!!! note
48+
You will be asked to provide a passphrase for the stack, which is used to encrypt secrets within the stack's configuration settings.
49+
50+
### Configuring your stack
51+
52+
Each stack has its own configuration settings, defined in the `Pulumi.<stack-name>.yaml` files.
53+
The configuration can be manually edited, or you can use the Pulumi CLI to set configuration values.
54+
You can set individual configuration values for the stack using the following command:
55+
56+
```console
57+
pulumi config set <key> <value>
58+
```
59+
60+
Some of the configuration keys must be set as secrets, such as the MinIO access key and secret key.
61+
Those *must* be set using the Pulumi CLI using the `--secret` flag:
62+
63+
```console
64+
pulumi config set --secret minio_root_password <your-minio-secret-key>
65+
```
66+
67+
For a complete list of configuration keys, see the `Pulumi.yaml` file.
68+
69+
### Kubernetes context
70+
71+
Pulumi requires that the Kubernetes context is set for the stack.
72+
For example, to set the Kubernetes context for the `dawn` stack, you can use:
73+
74+
```console
75+
pulumi config set kubernetes:context dawn
76+
```
77+
78+
This must match one of the contexts in your local `kubeconfig`.
79+
You can check the available contexts with `kubectl`:
80+
81+
```console
82+
kubectl config get-contexts
83+
```
84+
85+
### Deploying with Pulumi
86+
87+
Once you have set up the stack and its configuration, you can deploy the stack using the following command:
88+
89+
```console
90+
pulumi up
91+
```
92+
93+
## FRIDGE deployment targets
94+
95+
Currently, FRIDGE is configured to support deployment on Azure Kubernetes Service (AKS) and on DAWN AI.
96+
FRIDGE uses Cilium for networking, and thus requires a Kubernetes cluster with Cilium installed.
97+
98+
In the table below, you can see the components need to be deployed to each target.
99+
Some components are pre-installed on DAWN.
100+
101+
| Component | AKS | DAWN | Local |
102+
| ----------------- | ----- | ----- | ----- |
103+
| argo-workflows ||||
104+
| cert-manager.io || ||
105+
| cilium | | ||
106+
| fridge-api ||||
107+
| harbor ||||
108+
| hubble || ||
109+
| ingress-nginx || ||
110+
| longhorn | |||
111+
| minio ||||
112+
| prometheus || ||

docs/docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# FRIDGE

docs/docs/prerequisites.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Prerequisites
2+
3+
You will need the following tools installed to deploy FRIDGE:
4+
5+
- [Python](https://www.python.org/downloads/) 3.11 or later
6+
- [Pulumi](https://www.pulumi.com/docs/get-started/install/)
7+
- [kubectl](https://kubernetes.io/docs/tasks/tools/)
8+
9+
Additionally, if deploying to Azure:
10+
11+
- [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)

docs/mkdocs.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
site_name: FRIDGE
3+
repo_url: https://github.com/alan-turing-institute/fridge
4+
edit_uri: blob/main/docs/docs/
5+
site_url: https://alan-turing-institute.github.io/fridge
6+
copyright: >-
7+
© The contributors.
8+
9+
<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>.
10+
nav:
11+
- Home: 'index.md'
12+
- Prerequisites: 'prerequisites.md'
13+
- Deploy Infrastructure: 'deploy_infrastructure.md'
14+
- Deploy Services: 'deploy_services.md'
15+
markdown_extensions:
16+
- admonition

docs/requirements.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mkdocs>=1.6.1

docs/requirements.txt

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.13
3+
# by the following command:
4+
#
5+
# pip-compile
6+
#
7+
click==8.3.0
8+
# via mkdocs
9+
ghp-import==2.1.0
10+
# via mkdocs
11+
jinja2==3.1.6
12+
# via mkdocs
13+
markdown==3.9
14+
# via mkdocs
15+
markupsafe==3.0.3
16+
# via
17+
# jinja2
18+
# mkdocs
19+
mergedeep==1.3.4
20+
# via
21+
# mkdocs
22+
# mkdocs-get-deps
23+
mkdocs==1.6.1
24+
# via -r requirements.in
25+
mkdocs-get-deps==0.2.0
26+
# via mkdocs
27+
packaging==25.0
28+
# via mkdocs
29+
pathspec==0.12.1
30+
# via mkdocs
31+
platformdirs==4.5.0
32+
# via mkdocs-get-deps
33+
python-dateutil==2.9.0.post0
34+
# via ghp-import
35+
pyyaml==6.0.3
36+
# via
37+
# mkdocs
38+
# mkdocs-get-deps
39+
# pyyaml-env-tag
40+
pyyaml-env-tag==1.1
41+
# via mkdocs
42+
six==1.17.0
43+
# via python-dateutil
44+
watchdog==6.0.0
45+
# via mkdocs

0 commit comments

Comments
 (0)