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
684 changes: 504 additions & 180 deletions bun.lock

Large diffs are not rendered by default.

File renamed without changes.
24 changes: 24 additions & 0 deletions docs/02-Getting started/01-Requirements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Hardware

### Minimal Requirements
- **Disk**: 50GB
- **RAM**: 4GB
- **CPU**: 2 Cores, ARM64 or AMD64 Architecture

### Recommended Requirements
- **Disk**: 100GB
- **RAM**: 8GB
- **CPU**: 4 Cores, ARM64 or AMD64 Architecture

## Operating System
Any Linux distribution capable of running Docker.

:::warning

Testing is conducted exclusively on **NixOS** for **x86_64** and **arm64** architectures.

:::

## Dependencies
- [Docker](https://docs.docker.com/engine/install/) (installed)
- [Docker Compose](https://docs.docker.com/compose/install/) (installed)
153 changes: 153 additions & 0 deletions docs/02-Getting started/02-Quick_start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# Quick Start

:::warning
This project is currently in development. Please report issues [here](https://github.com/iglu-sh/controller/issues/new).
:::

The recommended method for deploying Iglu is [docker-compose](https://docs.docker.com/compose). Installation instructions for Compose can be found [here](https://docs.docker.com/compose/install).

:::important
It is essential to use the provided PostgreSQL Docker image, as it includes the following custom extensions:
- cron plugin
- http plugin
:::

## 1) Prepare Files
Create a directory named `iglu` on your system and copy the `compose.yml` and `.env` files into this directory.

```yaml title="compose.yml"
version: 3
services:
redis:
image: redis:8
restart: unless-stopped
ports:
- 6379:6379

postgres:
image: ghcr.io/iglu-sh/postgres:latest
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: cache
volumes:
- ./dev/postgres:/var/lib/postgresql/data

cache:
image: ghcr.io/iglu-sh/iglu-cache:latest
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_HOST: postgres
POSTGRES_DB: cache
POSTGRES_PORT: 5432
LOG_LEVEL: ${LOG_LEVEL}
PROM_ENABLE: ${PROM_ENABLE}
CACHE_ROOT_DOMAIN: ${CACHE_ROOT_DOMAIN}
CACHE_FILESYSTEM_DIR: /tmp/cache
ports:
- 3000:3000
- 9464:9464
volumes:
- ./dev/cache:/tmp/cache
depends_on:
- postgres

controller:
image: ghcr.io/iglu-sh/iglu-controller:latest
restart: unless-stopped
environment:
NEXT_PUBLIC_URL: ${CONTROLLER_URL}
NEXT_PUBLIC_CACHE_URL: ${CACHE_ROOT_DOMAIN}
NODE_PSK: ${NODE_PSK} #Required for a builder scheduler to connect to this controller
PORT: ${PORT}
LOG_LEVEL: ${LOG_LEVEL}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_HOST: postgres
AUTH_SECRET: ${AUTH_SECRET}
AUTH_TRUST_HOST: true #Instruct Auth.js to trust the x-forwarded-host header
REDIS_HOST: redis
ports:
- 3001:3001
depends_on:
- postgres
- cache
- redis

scheduler:
image: ghcr.io/iglu-sh/iglu-scheduler:latest
restart: unless-stopped
environment:
INTERFACE: 0.0.0.0
NODE_NAME: ${NODE_NAME}
MAX_BUILDS: 10
CONTROLLER_REGISTRATION_KEY: ${NODE_PSK}
LOG_LEVEL: ${LOG_LEVEL}
CONTROLLER_URL: http://controller:3001
REDIS_HOST: redis
REDIS_PASSWORD: default
DOCKER_SOCKET: /var/run/docker.sock
AUTO_PULL_IMG: ${AUTO_PULL_IMG}
CROSS_COMPILE: ${ENABLE_CROSS_COMPILE}
DOCKER_IMAGE: ghcr.io/iglu-sh/iglu-builder:latest
volumes:
- /var/run/user/1000/podman/podman.sock:/var/run/docker.sock
depends_on:
- controller
```

```bash title=".env"
# DATABASE
POSTGRES_USER=iglu
POSTGRES_PASSWORD=changeme

# CACHE
CACHE_ROOT_DOMAIN=http://localhost:3000 #Externally accessible URL of the Cache
PROM_ENABLE=true

# LOGGING
LOG_LEVEL=INFO

# CONTROLLER
CONTROLLER_URL=http://localhost:3001 #Externally accessible URL of the Controller
PORT=3001
AUTH_SECRET=changeme #Random string for authentication
NODE_PSK=changeme #Random string for Scheduler to join Controller

# SCHEDULER
NODE_NAME=examplenode
ENABLE_CROSS_COMPILE=false
AUTO_PULL_IMG=true
```

## 2) Configure Environment Variables
Adjust the environment variables in the `.env` file and the volume paths in the `compose.yml` according to your requirements. Additional information about environment variables can be found on the [Components](/docs/Components/Iglu%20Builder) page.

:::warning
Do not modify the environment variables in the `compose.yml` file unless you have a thorough understanding of the configuration.
:::

## 3) Start the Containers
Navigate to the directory using `cd iglu` and start the containers with the following command:

```bash
docker compose up -d
```

Verify the deployment by executing:

```bash
foo@bar:~$ docker ps

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
64df5d9715f9 docker.io/library/redis:8 redis-server 24 minutes ago Up 24 minutes 0.0.0.0:6379->6379/tcp iglu-redis-1
4aad9e73a530 ghcr.io/iglu-sh/postgres:latest postgres 24 minutes ago Up 24 minutes 5432/tcp iglu-postgres-1
e894e57fe3ed ghcr.io/iglu-sh/iglu-cache:latest /bin/iglu-cache 24 minutes ago Up 24 minutes 0.0.0.0:3000->3000/tcp, 0.0.0.0:9464->9464/tcp iglu-cache-1
0a525e2f4ae2 ghcr.io/iglu-sh/iglu-controller:latest /bin/iglu-control... 24 minutes ago Up 24 minutes 0.0.0.0:3001->3001/tcp, 3000/tcp iglu-controller-1
5265714c9325 ghcr.io/iglu-sh/iglu-scheduler:latest /bin/iglu-schedul... 24 minutes ago Up 19 minutes 3008/tcp iglu-scheduler-1
```

If your output matches the example above, your basic Iglu setup is now operational.
31 changes: 31 additions & 0 deletions docs/02-Getting started/03-First_launch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# First Launch
Upon initial launch, several configuration steps are required to establish a basic setup.

## Retrieve Your First API-Key
During the first startup (**and only during the first startup**), the cache
generates an **API-Key**. This key is essential for authentication against the cache.

Retrieve this key by examining the cache logs using the following command:

```bash
foo@bar:~$ docker logs $(docker ps | grep iglu-cache | awk '{print $1}') | grep "Initial Key"

cache 2025-11-30T21:27:48.359Z INFO Initial Key for cache default: 019ad6aa-2d87-7000-aea3-e417b13229a5
```

In this example, the key is *"019ad6aa-2d87-7000-aea3-e417b13229a5"*. Store this key securely, such as in a password manager.

## Initial Login
When accessing the controller (as configured in the [Quick Start](./02-Quick start.md) guide: http://localhost:3001), you will be prompted for authentication credentials. The default values are:
- **Username**: admin
- **Password**: admin

## Claiming the Default Cache
Since the [Cache](/docs/03-Components/Iglu%20Cache.md) can operate as a standalone component, it creates a cache named "default" upon initialization. To manage this cache through the controller, you must claim it.

![claim-caches](/img/docs/02-Getting_started/03-First_launch/claim-caches.png)

## Changing the Default Password
After claiming the caches, you will be redirected to the "Reset Password" page. Here, you must set a new password for the "admin" user.

![change-password](/img/docs/02-Getting_started/03-First_launch/change-password.png)
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useColorMode } from '@docusaurus/theme-common';
export const Image = () => {
const { colorMode } = useColorMode(); // 'light' oder 'dark'

const imagePath = "/img/docs/Components/Archtecture/communication_" + colorMode + ".excalidraw.svg"
const imagePath = "/img/docs/03-Components/Archtecture/communication_" + colorMode + ".excalidraw.svg"

return <img src={imagePath}/>

Expand Down
File renamed without changes.
File renamed without changes.
9 changes: 0 additions & 9 deletions docs/Getting started/Configure first Cache.md

This file was deleted.

67 changes: 0 additions & 67 deletions docs/Getting started/Install with Docker compose.md

This file was deleted.

27 changes: 0 additions & 27 deletions docs/Getting started/Requirements.md

This file was deleted.

3 changes: 1 addition & 2 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ const config: Config = {
copyright: `Copyright © ${new Date().getFullYear()} Iglu. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['yaml', 'python', 'typescript', 'javascript', 'docker', 'bash'],
},
} satisfies Preset.ThemeConfig,
};
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "3.8.0",
"@docusaurus/preset-classic": "3.8.0",
"@docusaurus/core": "^3.9.2",
"@docusaurus/preset-classic": "^3.9.2",
"@easyops-cn/docusaurus-search-local": "^0.50.0",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"docusaurus-plugin-openapi-docs": "^4.4.0",
"docusaurus-theme-openapi-docs": "^4.4.0",
"prism-react-renderer": "^2.3.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
"@mdx-js/react": "^3.1.1",
"clsx": "^2.1.1",
"docusaurus-plugin-openapi-docs": "^4.5.1",
"docusaurus-theme-openapi-docs": "^4.5.1",
"prism-react-renderer": "^2.4.1",
"react": "^19.2.0",
"react-dom": "^19.2.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.8.0",
"@docusaurus/tsconfig": "3.8.0",
"@docusaurus/types": "3.8.0",
"@docusaurus/module-type-aliases": "^3.9.2",
"@docusaurus/tsconfig": "^3.9.2",
"@docusaurus/types": "^3.9.2",
"typescript": "~5.6.3"
},
"browserslist": {
Expand Down
Loading