vieter/docs/content/installation.md

115 lines
3.5 KiB
Markdown
Raw Normal View History

2022-04-30 23:24:07 +02:00
---
weight: 10
---
# Installation
2022-06-08 22:16:46 +02:00
Vieter consists of a single binary, akin to busybox. The binary's behavior is
determined by its CLI arguments, e.g. `vieter server` starts the repository
server.
All installation solutions can be configured the same way,
as described [here](/configuration).
2022-04-30 23:24:07 +02:00
## Docker
2022-06-08 22:16:46 +02:00
Docker images are published to the
[`chewingbever/vieter`](https://hub.docker.com/r/chewingbever/vieter) Docker
Hub repository. You can either pull a release tag (e.g.
`chewingbever/vieter:0.1.0-rc1`), or pull the `chewingbever/vieter:dev` tag.
The latter is updated every time a new commit is pushed to the development
branch. This branch will be the most up to date, but does not give any
guarantees about stability, so beware!
Thanks to the single-binary design of Vieter, this image can be used both for
the repository server, the cron daemon and the agent.
2022-06-08 22:16:46 +02:00
2022-12-17 20:23:25 +01:00
Below is a minimal compose file to set up both the repository server & a build
agent:
2022-06-08 22:16:46 +02:00
```yaml
version: '3'
services:
server:
2022-12-17 20:23:25 +01:00
image: 'chewingbever/vieter:0.5.0-rc.1'
2022-06-08 22:16:46 +02:00
restart: 'always'
environment:
- 'VIETER_API_KEY=secret'
- 'VIETER_DEFAULT_ARCH=x86_64'
volumes:
- 'data:/data'
cron:
2022-12-17 20:23:25 +01:00
image: 'chewingbever/vieter:0.5.0-rc.1'
2022-06-08 22:16:46 +02:00
restart: 'always'
2022-12-17 20:23:25 +01:00
# Required to connect to the Docker daemon
2022-06-08 22:16:46 +02:00
user: root
2022-12-17 20:23:25 +01:00
command: 'vieter agent'
2022-06-08 22:16:46 +02:00
environment:
- 'VIETER_API_KEY=secret'
# MUST be public URL of Vieter repository
- 'VIETER_ADDRESS=https://example.com'
2022-12-17 20:23:25 +01:00
# Architecture for which the agent builds
- 'VIETER_ARCH=x86_64'
2022-06-08 22:16:46 +02:00
- 'VIETER_MAX_CONCURRENT_BUILDS=2'
2022-06-09 09:32:41 +02:00
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
2022-06-08 22:16:46 +02:00
volumes:
data:
2022-04-30 23:24:07 +02:00
```
2022-06-09 09:32:41 +02:00
If you do not require the build system, the repository server can be used
independently as well.
2022-12-17 20:23:25 +01:00
Of course, Vieter allows a lot more configuration than this. This compose file
is meant as a starting point for setting up your installation.
2022-06-09 09:32:41 +02:00
{{< hint info >}}
**Note**
2022-12-17 20:23:25 +01:00
Builds are executed on the agent's system using the host's Docker daemon. An
agent for a specific `arch` will only build packages for that specific
architecture. Therefore, if you wish to build packages for both `x86_64` &
`aarch64`, you'll have to deploy two agents, one on each architecture.
Afterwards, any Git repositories enabled for those two architectures will build
on both.
2022-06-09 09:32:41 +02:00
{{< /hint >}}
2022-06-08 22:16:46 +02:00
## Binary
2022-04-30 23:24:07 +02:00
2022-06-08 22:16:46 +02:00
On the
[releases](https://git.rustybever.be/vieter-v/vieter/releases)
2022-06-08 22:16:46 +02:00
page, you can find statically compiled binaries for all
released versions. This is the same binary as used inside
the Docker images.
2022-04-30 23:24:07 +02:00
2022-06-08 22:16:46 +02:00
## Arch
2022-04-30 23:24:07 +02:00
2022-06-08 22:16:46 +02:00
I publish both development & release versions of Vieter to my personal
repository, https://arch.r8r.be. Packages are available for `x86_64` &
`aarch64`. To use the repository, add the following to your `pacman.conf`:
2022-04-30 23:24:07 +02:00
2022-06-08 22:16:46 +02:00
```
[vieter]
Server = https://arch.r8r.be/$repo/$arch
SigLevel = Optional
```
2022-04-30 23:24:07 +02:00
2022-06-08 22:16:46 +02:00
Afterwards, you can update your system & install the `vieter` package for the
latest official release or `vieter-git` for the latest development release.
2022-04-30 23:24:07 +02:00
2022-06-22 20:43:14 +02:00
### AUR
If you prefer building the packages locally (or on your own Vieter instance),
2022-12-17 20:23:25 +01:00
there's the [`vieter`](https://aur.archlinux.org/packages/vieter) &
[`vieter-git`](https://aur.archlinux.org/packages/vieter-git) packages on the
AUR. These packages build using the `vlang` compiler package, so I can't
2022-06-22 20:43:14 +02:00
guarantee that a compiler update won't temporarily break them.
2022-04-30 23:24:07 +02:00
## Building from source
The project [README](https://git.rustybever.be/vieter-v/vieter#building)
contains instructions for building Vieter from source.