docs: updated the docs

pull/318/head
Jef Roosens 2022-12-17 20:23:25 +01:00 committed by Chewing_Bever
parent a9ad3088bb
commit 09c61143b0
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
3 changed files with 72 additions and 16 deletions

View File

@ -0,0 +1,51 @@
# Jobs
<aside class="notice">
All routes in this section require authentication.
</aside>
## Manually schedule a job
```shell
curl \
-H 'X-Api-Key: secret' \
https://example.com/api/v1/jobs/queue?target=10&force&arch=x86_64
```
Manually schedule a job on the server.
### HTTP Request
`POST /api/v1/jobs/queue`
### Query Parameters
Parameter | Description
--------- | -----------
target | Id of target to schedule build for
arch | Architecture to build on
force | Whether it's a forced build (true if present)
## Poll for new jobs
<aside class="warning">
This endpoint is used by the agents and should not be used manually. It's just
here for completeness.
</aside>
Poll the server for new builds.
### HTTP Request
`GET /api/v1/jobs/poll`
### Query Parameters
Parameter | Description
--------- | -----------
arch | For which architecture to receive jobs
max | How many jobs to receive at most

View File

@ -11,6 +11,7 @@ includes:
- repository - repository
- targets - targets
- logs - logs
- jobs
search: true search: true

View File

@ -23,15 +23,15 @@ guarantees about stability, so beware!
Thanks to the single-binary design of Vieter, this image can be used both for Thanks to the single-binary design of Vieter, this image can be used both for
the repository server, the cron daemon and the agent. the repository server, the cron daemon and the agent.
Below is an example compose file to set up both the repository server & the Below is a minimal compose file to set up both the repository server & a build
cron daemon: agent:
```yaml ```yaml
version: '3' version: '3'
services: services:
server: server:
image: 'chewingbever/vieter:dev' image: 'chewingbever/vieter:0.5.0-rc.1'
restart: 'always' restart: 'always'
environment: environment:
@ -41,18 +41,19 @@ services:
- 'data:/data' - 'data:/data'
cron: cron:
image: 'chewingbever/vieter:dev' image: 'chewingbever/vieter:0.5.0-rc.1'
restart: 'always' restart: 'always'
# Required to connect to the Docker daemon
user: root user: root
command: 'vieter cron' command: 'vieter agent'
environment: environment:
- 'VIETER_API_KEY=secret' - 'VIETER_API_KEY=secret'
# MUST be public URL of Vieter repository # MUST be public URL of Vieter repository
- 'VIETER_ADDRESS=https://example.com' - 'VIETER_ADDRESS=https://example.com'
- 'VIETER_DEFAULT_ARCH=x86_64' # Architecture for which the agent builds
- 'VIETER_ARCH=x86_64'
- 'VIETER_MAX_CONCURRENT_BUILDS=2' - 'VIETER_MAX_CONCURRENT_BUILDS=2'
- 'VIETER_GLOBAL_SCHEDULE=0 3'
volumes: volumes:
- '/var/run/docker.sock:/var/run/docker.sock' - '/var/run/docker.sock:/var/run/docker.sock'
@ -63,14 +64,17 @@ volumes:
If you do not require the build system, the repository server can be used If you do not require the build system, the repository server can be used
independently as well. independently as well.
Of course, Vieter allows a lot more configuration than this. This compose file
is meant as a starting point for setting up your installation.
{{< hint info >}} {{< hint info >}}
**Note** **Note**
Builds are executed on the cron daemon's system using the host's Docker daemon. Builds are executed on the agent's system using the host's Docker daemon. An
A cron daemon on a specific architecture will only build packages for that agent for a specific `arch` will only build packages for that specific
specific architecture. Therefore, if you wish to build packages for both architecture. Therefore, if you wish to build packages for both `x86_64` &
`x86_64` & `aarch64`, you'll have to deploy two cron daemons, one on each `aarch64`, you'll have to deploy two agents, one on each architecture.
architecture. Afterwards, any Git repositories enabled for those two Afterwards, any Git repositories enabled for those two architectures will build
architectures will build on both. on both.
{{< /hint >}} {{< /hint >}}
## Binary ## Binary
@ -99,9 +103,9 @@ latest official release or `vieter-git` for the latest development release.
### AUR ### AUR
If you prefer building the packages locally (or on your own Vieter instance), If you prefer building the packages locally (or on your own Vieter instance),
there's the `[vieter](https://aur.archlinux.org/packages/vieter)` & there's the [`vieter`](https://aur.archlinux.org/packages/vieter) &
`[vieter-git](https://aur.archlinux.org/packages/vieter-git)` packages on the [`vieter-git`](https://aur.archlinux.org/packages/vieter-git) packages on the
AUR. These packages build using the `vlang-git` compiler package, so I can't AUR. These packages build using the `vlang` compiler package, so I can't
guarantee that a compiler update won't temporarily break them. guarantee that a compiler update won't temporarily break them.
## Building from source ## Building from source