-
Notifications
You must be signed in to change notification settings - Fork 2
metadata
Metadata is very useful for sharing information between deployments or for centralizing configurations to be used between deployments. Some Overlord parameters can take advantage of this and use the value of a metadata as their value.
For example, instead of relying on a third-party git hosting like GitHub or even deploying a self-hosted one like GitLab or Gitea to use a Makejail, we can create a metadata and use its contents as a Makejail.
-
Create a deployment file for the metadata.
metadata.yml:
kind: metadata datacenters: main: entrypoint: 'http://127.0.0.1:8888' access_token: '<access token>' deployIn: labels: - desktop metadata: filebrowser.makejail: | INCLUDE gh+DtxdF/efficient-makejail INCLUDE gh+AppJail-makejails/filebrowser
-
Create a deployment file for the project.
filebrowser.yml:
kind: directorProject datacenters: main: entrypoint: 'http://127.0.0.1:8888' access_token: '<access token>' deployIn: labels: - desktop projectName: filebrowser projectFile: | options: - alias: - ip4_inherit: services: filebrowser: makejail: !ENV '${OVERLORD_METADATA}/filebrowser.makejail' volumes: - db: filebrowser-db - log: filebrowser-log - www: filebrowser-www start-environment: - FB_NOAUTH: 1 default_volume_type: '<volumefs>' volumes: db: device: /var/appjail-volumes/filebrowser/db log: device: /var/appjail-volumes/filebrowser/log www: device: /var/appjail-volumes/filebrowser/www
-
Deploy.
overlord apply -f metadata.yml overlord apply -f filebrowser.yml
-
Check status.
$ overlord get-info -f filebrowser.yml -t projects --filter-per-project datacenter: http://127.0.0.1:8888 entrypoint: main chain: None labels: - all - desktop - vm-only projects: filebrowser: state: UNFINISHED last_log: 2025-03-05_18h10m46s locked: True services: - {'name': 'filebrowser', 'status': 66, 'jail': '058ecee7f2'} up: operation: RUNNING last_update: 26.33 seconds job_id: 1
Wait.
$ overlord get-info -f filebrowser.yml -t projects --filter-per-project datacenter: http://127.0.0.1:8888 entrypoint: main chain: None labels: - all - desktop - vm-only projects: filebrowser: state: DONE last_log: 2025-03-05_18h10m46s locked: False services: - {'name': 'filebrowser', 'status': 0, 'jail': '058ecee7f2'} up: operation: COMPLETED output: rc: 0 stdout: {'errlevel': 0, 'message': None, 'failed': []} last_update: 11 minutes and 10.81 seconds job_id: 1 labels: error: False message: None load-balancer: services: filebrowser: error: False message: None skydns: services: filebrowser: error: False message: None
-
Testing the service.
$ fetch -qo - http://127.0.0.1:8080 <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> ...
As mentioned above, the use of metadata depends on the parameters we use, so for example, instead of using projectFile we can choose projectFromMetadata.
metadata.yml (v2):
kind: metadata
datacenters:
main:
entrypoint: 'http://127.0.0.1:8888'
access_token: '<access token>'
deployIn:
labels:
- desktop
metadata:
filebrowser.makejail: |
INCLUDE gh+DtxdF/efficient-makejail
INCLUDE gh+AppJail-makejails/filebrowser
filebrowser.project: |
options:
- alias:
- ip4_inherit:
services:
filebrowser:
makejail: !ENV '${OVERLORD_METADATA}/filebrowser.makejail'
volumes:
- db: filebrowser-db
- log: filebrowser-log
- www: filebrowser-www
start-environment:
- FB_NOAUTH: 1
default_volume_type: '<volumefs>'
volumes:
db:
device: /var/appjail-volumes/filebrowser/db
log:
device: /var/appjail-volumes/filebrowser/log
www:
device: /var/appjail-volumes/filebrowser/wwwconsole:
$ overlord apply -f metadata.yml
$ overlord get-info -f metadata.yml -t metadata
datacenter: http://127.0.0.1:8888
entrypoint: main
chain: None
labels:
- all
- desktop
- vm-only
metadata:
filebrowser.makejail: |
INCLUDE gh+DtxdF/efficient-makejail
INCLUDE gh+AppJail-makejails/filebrowser
filebrowser.project: |
options:
- alias:
- ip4_inherit:
services:
filebrowser:
makejail: !ENV '${OVERLORD_METADATA}/filebrowser.makejail'
volumes:
- db: filebrowser-db
- log: filebrowser-log
- www: filebrowser-www
start-environment:
- FB_NOAUTH: 1
default_volume_type: '<volumefs>'
volumes:
db:
device: /var/appjail-volumes/filebrowser/db
log:
device: /var/appjail-volumes/filebrowser/log
www:
device: /var/appjail-volumes/filebrowser/wwwfilebrowser.yml (v2):
kind: directorProject
datacenters:
main:
entrypoint: 'http://127.0.0.1:8888'
access_token: '<access token>'
deployIn:
labels:
- desktop
projectName: filebrowser
projectFromMetadata: filebrowser.projectconsole:
$ overlord apply -f filebrowser.yml