pub enum Step {
Show 23 variants
WriteFile(GeneratedFile),
Symlink {
link: PathBuf,
target: PathBuf,
},
DaemonReload,
StartService {
unit: String,
},
EnableService {
unit: String,
},
DisableService {
unit: String,
},
StopService {
unit: String,
},
RestartService {
unit: String,
},
ReloadCaddy,
PullImage {
image: String,
},
RemoveFile(PathBuf),
RemoveDir(PathBuf),
RemoveVolume {
name: String,
},
RemoveNetwork {
name: String,
},
CreateDir(PathBuf),
WaitForFile {
path: PathBuf,
timeout_secs: u32,
},
WaitForHttpHealthy {
url: String,
expect_status: u16,
timeout_secs: u32,
},
CopyFile {
src: PathBuf,
dst: PathBuf,
},
Build {
dir: PathBuf,
command: String,
},
SyncDir {
src: PathBuf,
dst: PathBuf,
},
TailscaleSetup,
TailscaleEnable {
svc_name: String,
ports: Vec<TailscalePort>,
},
TailscaleDisable {
svc_name: String,
},
}Expand description
A discrete operation that the CLI executes.
Variants§
WriteFile(GeneratedFile)
Write a file.
Symlink
Create a symlink at link pointing to target. Idempotent: if
link already exists (whether as a file, dir, or symlink), it’s
removed first. Used to satisfy systemd’s fixed quadlet path
(~/.config/containers/systemd/<svc>.container) while keeping
the real file alongside the rest of the service’s data in
~/.local/share/services/<svc>/.
DaemonReload
Reload systemd for the current user.
StartService
Start a service under the current user’s systemd.
EnableService
Enable a service so it auto-starts on boot (creates the
default.target.wants symlink). Needed for native .service units;
quadlet containers get this from the podman generator via [Install].
DisableService
Disable a service’s boot autostart (drops the default.target.wants
symlink). The dual of Step::EnableService on teardown, so removing a
native service doesn’t leave a dangling enable symlink behind.
StopService
Stop a service under the current user’s systemd.
RestartService
Restart a service under the current user’s systemd.
ReloadCaddy
Reload Caddy’s config without restarting the container.
PullImage
Pull a container image.
RemoveFile(PathBuf)
Remove a file.
RemoveDir(PathBuf)
Remove a directory tree.
RemoveVolume
Remove a podman named volume.
RemoveNetwork
Remove a podman network. Best-effort: skipped when the network is
still in use by another service (which is the correct outcome) or
already gone. ryra remove emits this after stopping a service’s
<svc>-network unit, because stopping a RemainAfterExit network
oneshot leaves the podman network behind — and that leak makes the
next install fail (its regenerated network unit’s podman network create hits the existing network).
CreateDir(PathBuf)
Create a directory (with parents).
WaitForFile
Wait for a file to appear (with timeout).
WaitForHttpHealthy
Poll an HTTP endpoint until it answers with expect_status, or time
out. The readiness gate for a blue/green deploy: ryra won’t swap the
Caddy upstream onto a freshly started instance until its health endpoint
says it’s actually serving (DB up, migrations run). A timeout aborts the
deploy with the old instance still live and serving.
CopyFile
Copy a file from the registry (or similar source) to a destination.
Used for vendored binary files (e.g. Jellyfin’s SSO plugin DLLs)
that don’t fit the templated configs/ pipeline.
Build
Run a build/prepare command in dir (e.g. cargo build --release,
bun install) for a runtime = "native" service. Runs at apply time
in the service’s source dir, before the unit is (re)started.
SyncDir
Mirror a source tree into dst (clearing dst first), skipping
VCS/build/dependency dirs. The language-agnostic primitive behind native
blue/green: each color slot gets its own isolated working copy, so a
rebuild of the idle slot can’t mutate source files the live slot is
still reading (critical for interpreted runtimes like Python/Node).
TailscaleSetup
First-time Tailscale Services setup on this tailnet: ensure ACL
has tag:ryra-host + tag:ryra-service tagOwners and the
services autoApprover entry, then apply tag:ryra-host to the
local node so it’s allowed to advertise services. Idempotent:
reads current state via API and only writes diffs.
TailscaleEnable
Define a Tailscale Service via the admin API and advertise it
from the host: sudo tailscale serve --service=svc:<svc_name> --https=443 http://127.0.0.1:<host_port>. The service gets
tag:ryra-service (matches the autoApprover) so the host’s
advertisement auto-approves with no manual UI clicks.
svc_name is the part after svc: — already host-scoped at
planning time (<service>-<host>) so two ryra hosts on the
same tailnet can run independent copies of a service without
colliding on the global Tailscale Service namespace.
TailscaleDisable
Stop advertising a Tailscale Service on this host and delete
its definition via the admin API. Used in ryra remove --purge
and ryra reset for tailscale-enabled services. svc_name
matches the value used at install time (recovered from the
stored Tailscale URL so a hostname change post-install doesn’t
break teardown).