https://github.com/freshleafmedia/satis-build-worker
A Satis instance that builds packages from a queue
https://github.com/freshleafmedia/satis-build-worker
docker k8s kubernetes package package-builder packagist queue queue-workers satis
Last synced: about 1 month ago
JSON representation
A Satis instance that builds packages from a queue
- Host: GitHub
- URL: https://github.com/freshleafmedia/satis-build-worker
- Owner: freshleafmedia
- Created: 2020-05-21T13:09:47.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-21T16:56:10.000Z (almost 5 years ago)
- Last Synced: 2025-03-15T02:18:39.074Z (about 1 month ago)
- Topics: docker, k8s, kubernetes, package, package-builder, packagist, queue, queue-workers, satis
- Language: Shell
- Homepage: https://www.freshleafmedia.co.uk/blog/satis-queue-worker
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Satis Package Build Worker
A Satis instance that will build packages from a queue.
## How It Works
- The queue is simply a directory
- Every file in the queue is a job
- The file contains the repository URL of the package to be built## Example
The following example will read all job files inside the host directory `/host/queue` and build them, outputting the
packages to `/host/builtPackages`. It will read any config from the `/host/satis.json` file.```
docker run -it --rm \
--user $(id -u):$(id -g) \
--volume /host/queue:/packageQueue \
--volume /host/builtPackages:/build \
--volume /host/satis.json:/satis.json \
freshleafmedia/satis-build-worker
```If you also want to take advantage of Composers caching (you do) then you can also add `--volume /host/composer:/composer`
### Adding to the queue
- Each file in the queue must contain only the URL of the package to be built, eg `[email protected]:vendor/package.git` or `[email protected]:vendor/package.git`.
- The filename can be set to anything you like, it isn't used.
- The jobs are processed in the order they are added## Kubernetes Deployment
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: Satis
spec:
selector:
matchLabels:
app: Satis
replicas: 2
template:
metadata:
labels:
app: Satis
spec:
containers:
- name: satis
image: "freshleafmedia/satis-build-worker:latest"
imagePullPolicy: "Always"
volumeMounts:
- name: volume
mountPath: /builds
subPath: web/public
- name: volume
mountPath: /packageQueue
subPath: packageQueue
- name: volume
mountPath: /composer
subPath: composer
- name: satis-config
mountPath: /satis.json
subPath: satis.json
- name: ssh
mountPath: /root/.ssh/id_rsa
subPath: id_rsa
readOnly: true
- name: ssh
mountPath: /root/.ssh/id_rsa.pub
subPath: id_rsa.pub
readOnly: true
volumes:
- name: volume
persistentVolumeClaim:
claimName: pvc
- name: satis-config
configMap:
name: satis
optional: false
- name: ssh
secret:
secretName: ssh
optional: false
defaultMode: 0600
```## Private Packages
This is primarily designed to work with private packages as such SSH auth is supported simply by mounting an SSH key to
the usual directory: `--volume: /host/.ssh/id_rsa.pub:id_rsa.pub:ro --volume: /host/.ssh/id_rsa:id_rsa:ro`