Repository navigation
Expand file tree
/
Copy pathapp.example.yaml
More file actions
111 lines (106 loc) · 4.37 KB
/
Copy pathapp.example.yaml
File metadata and controls
111 lines (106 loc) · 4.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Configuration for appctl. Copy this to app.yaml and edit it.
#
# Unknown keys are rejected rather than ignored, so a typo fails loudly here
# instead of silently changing nothing.
version: 1
defaults:
# The interpreter the guest's venv is built from. Must match the Python the
# lockfile was compiled for, or pip installs wheels for the wrong ABI.
python_version: "3.14"
# Stock Proxmox template. Pinned by exact filename: bumping it changes the
# apt candidate set in one step.
template: ubuntu-26.04-standard_26.04-1_amd64.tar.zst
storage: local
rootfs_gb: 16
cores: 2
memory_mb: 2048
swap_mb: 512
features: nesting=1,fuse=1,keyctl=1
onboot: 0
applications:
# The sample application from the quickstart.
#
# It is published on PyPI, so nothing is built: the wheel already exists.
example-app:
description: the quickstart sample
target:
kind: proxmox_lxc # the only implemented target
options:
hostname: example-app
vmid: 121 # optional; omit to let the role skip create
bind_host: 127.0.0.1 # 0.0.0.0 exposes the service to the network
source:
kind: package
# The package the role installs to serve the application. The
# application's own name is not the package name: `example-app` is what
# the guest calls the service, `bottle` is what gets installed. The role
# checks the two agree.
package: "bottle==0.13.3"
config:
target: "{{ app_state_dir }}/config.json"
files:
- apps/example-app/config.yml
mode: "0640"
vars:
app_port: 8080
secrets: [] # names of keys required in .env
# An application installed from a published release — an npm package, a
# tarball, anything the guest itself can fetch.
#
# `kind: package` means "nothing is built here": the artifact already exists,
# and the application's own role does the installing on the guest. The
# `package` value is the version pin, and it is the string the role reads.
#
# The key and the role directory have to match: `appctl install` selects the
# role with `--tags lxc,<key>`, and a key that is not a role name selects
# nothing. The key does NOT have to match the role's `app_name` — that is
# what the guest sees, and it is what derives the service account, the
# install root and the state directory. `apps/omniroute-release/` is a
# worked example of the two differing on purpose.
#
# omniroute-release:
# description: OmniRoute from a published npm release
# target:
# kind: proxmox_lxc
# options:
# hostname: omniroute
# vmid: 120
# bind_host: 0.0.0.0 # published on the LAN; secrets are required
# source:
# kind: package
# # `==` and the published package name, not `@` and the role's name.
# # `appctl` splits this into appctl_source_package and
# # appctl_source_version, which is what lets the role refuse a version
# # the manifest did not name. `omniroute-release` is not on npm.
# package: "omniroute==3.8.53"
# secrets:
# - omniroute_release_jwt_secret
# - omniroute_release_api_key_secret
# - omniroute_release_storage_encryption_key
# - omniroute_release_initial_password
# - omniroute_release_ws_bridge_secret
# A single-binary release, installed from a pinned archive rather than from
# PyPI or npm. Two things are worth copying even if you never run XERJ:
#
# `==` is load-bearing. `appctl` splits `name==version` and passes both into
# the play as `appctl_source_package` and `appctl_source_version`, which is
# what lets a role refuse to install something the manifest did not name. A
# `name@version` form carries no comparison and the role cannot check it.
#
# There is no `config:` block on purpose. `appctl render` emits exactly one
# JSON document; an application whose configuration is TOML, dotenv or
# anything else writes the file from its own role. There is also no secret:
# the node generates its own admin key on the guest.
#
# xerj:
# description: the XERJ search node, from a pinned release archive
# target:
# kind: proxmox_lxc
# options:
# hostname: xerj
# vmid: 124
# bind_host: 0.0.0.0 # LAN; the role adds a firewall rule for the port
# source:
# kind: package
# package: "xerj==1.0.0-rc.100"
# secrets: []