Skip to main content

Step

Enum Step 

Source
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.

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>/.

Fields

§link: PathBuf
§target: PathBuf
§

DaemonReload

Reload systemd for the current user.

§

StartService

Start a service under the current user’s systemd.

Fields

§unit: String
§

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].

Fields

§unit: String
§

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.

Fields

§unit: String
§

StopService

Stop a service under the current user’s systemd.

Fields

§unit: String
§

RestartService

Restart a service under the current user’s systemd.

Fields

§unit: String
§

ReloadCaddy

Reload Caddy’s config without restarting the container.

§

PullImage

Pull a container image.

Fields

§image: String
§

RemoveFile(PathBuf)

Remove a file.

§

RemoveDir(PathBuf)

Remove a directory tree.

§

RemoveVolume

Remove a podman named volume.

Fields

§name: String
§

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).

Fields

§name: String
§

CreateDir(PathBuf)

Create a directory (with parents).

§

WaitForFile

Wait for a file to appear (with timeout).

Fields

§path: PathBuf
§timeout_secs: u32
§

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.

Fields

§expect_status: u16
§timeout_secs: u32
§

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.

Fields

§

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.

Fields

§command: String
§

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).

Fields

§

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.

Fields

§svc_name: String
§

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).

Fields

§svc_name: String

Implementations§

Source§

impl Step

Source

pub fn to_command(&self) -> String

Render this step as a shell command (for dry-run display).

Auto Trait Implementations§

§

impl Freeze for Step

§

impl RefUnwindSafe for Step

§

impl Send for Step

§

impl Sync for Step

§

impl Unpin for Step

§

impl UnsafeUnpin for Step

§

impl UnwindSafe for Step

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V