Cedana
Cedana Daemon
Cedana
Cedana Daemon
  • Cedana Daemon
  • Get started
    • Installation
    • Authentication
    • Configuration
    • Health checks
    • Plugins
    • Feature matrix
  • Guides
    • Managed process/container
    • Checkpoint/restore basics
    • Checkpoint/restore with GPUs
    • Checkpoint/restore runc
    • Checkpoint/restore containerd
    • Checkpoint/restore streamer
    • Checkpoint/restore kata
      • how-to-create-custom-busybox-image
      • how-to-install-criu-in-guest
      • how-to-install-on-aws
      • how-to-make-kernel-criu-compatible
      • how-to-make-rootfs-criu-compatible
      • Checkpoint/Restore kata containers
  • Developer guides
    • Architecture
    • Profiling
    • Testing
    • Writing plugins
  • References
    • CLI
      • cedana
      • cedana attach
      • cedana checkpoint
      • cedana checkpoints
      • cedana completion
      • cedana completion bash
      • cedana completion fish
      • cedana completion powershell
      • cedana completion zsh
      • cedana daemon
      • cedana daemon check
      • cedana daemon start
      • cedana delete
      • cedana dump
      • cedana dump containerd
      • cedana dump job
      • cedana dump process
      • cedana dump runc
      • cedana exec
      • cedana features
      • cedana inspect
      • cedana job
      • cedana job attach
      • cedana job checkpoint
      • cedana job checkpoint inspect
      • cedana job checkpoint list
      • cedana job checkpoints
      • cedana job delete
      • cedana job inspect
      • cedana job kill
      • cedana job list
      • cedana jobs
      • cedana k8s-helper
      • cedana k8s-helper destroy
      • cedana kill
      • cedana manage
      • cedana manage containerd
      • cedana manage process
      • cedana manage runc
      • cedana plugin
      • cedana plugin features
      • cedana plugin install
      • cedana plugin list
      • cedana plugin remove
      • cedana plugins
      • cedana ps
      • cedana query
      • cedana query k8s
      • cedana query runc
      • cedana restore
      • cedana restore job
      • cedana restore process
      • cedana restore runc
      • cedana run
      • cedana run containerd
      • cedana run process
      • cedana run runc
    • API
    • GitHub
Powered by GitBook
On this page
  • Config
  • CRIU
  • Checkpoint
  • Client
  • Connection
  • DB
  • GPU
  • Metrics
  • Plugins
  • Profiling

Was this helpful?

Edit on GitHub
  1. Get started

Configuration

PreviousAuthenticationNextHealth checks

Last updated 3 days ago

Was this helpful?

Cedana configuration lives in your home directory, specifically in ~/.cedana/config.json. This file is automatically created the first time you use a Cedana command. You can also create it manually.

You may also override the configuration using environment variables. The environment variables are prefixed with CEDANA_ and are in uppercase. For example, Metrics.ASR can be set with CEDANA_METRICS_ASR. Similarly, Connection.URL can be set with CEDANA_CONNECTION_URL, or its alias CEDANA_URL.

Each of the below fields can also be set through an environment variable with the same name, prefixed, and in uppercase. E.g. Metrics.ASR can be set with CEDANA_METRICS_ASR. The env_aliases tag below specifies alternative (alias) environment variable names (comma-separated).

type Config struct {
    // Address to use for incoming/outgoing connections
    Address string `json:"address" key:"address" yaml:"address" mapstructure:"address"`
    // Protocol to use for incoming/outgoing connections (TCP, UNIX, VSOCK)
    Protocol string `json:"protocol" key:"protocol" yaml:"protocol" mapstructure:"protocol"`
    // LogLevel is the default log level used by the server
    LogLevel string `json:"log_level" key:"log_level" yaml:"log_level" mapstructure:"log_level"`

    // Connection settings
    Connection Connection `json:"connection" key:"connection" yaml:"connection" mapstructure:"connection"`
    // Checkpoint and storage settings
    Checkpoint Checkpoint `json:"checkpoint" key:"checkpoint" yaml:"checkpoint" mapstructure:"checkpoint"`
    // Database details
    DB  DB  `json:"db" key:"db" yaml:"db" mapstructure:"db"`
    // Profiling settings
    Profiling Profiling `json:"profiling" key:"profiling" yaml:"profiling" mapstructure:"profiling"`
    // Metrics settings
    Metrics Metrics `json:"metrics" key:"metrics" yaml:"metrics" mapstructure:"metrics"`
    // Client settings
    Client Client `json:"client" key:"client" yaml:"client" mapstructure:"client"`
    // CRIU settings and defaults
    CRIU CRIU `json:"criu" key:"criu" yaml:"criu" mapstructure:"criu"`
    // GPU is settings for the GPU plugin
    GPU GPU `json:"gpu" key:"gpu" yaml:"gpu" mapstructure:"gpu"`
    // Plugin settings
    Plugins Plugins `json:"plugins" key:"plugins" yaml:"plugins" mapstructure:"plugins"`
}
type CRIU struct {
    // BinaryPath is a custom path to the CRIU binary
    BinaryPath string `json:"binary_path" key:"binary_path" yaml:"binary_path" mapstructure:"binary_path"`
    // LeaveRunning sets whether to leave the process running after checkpoint
    LeaveRunning bool `json:"leave_running" key:"leave_running" yaml:"leave_running" mapstructure:"leave_running"`
}
type Checkpoint struct {
    // Dir is the default directory to store checkpoints
    Dir string `json:"dir" key:"dir" yaml:"dir" mapstructure:"dir"`
    // Compression is the default compression algorithm to use for checkpoints
    Compression string `json:"compression" key:"compression" yaml:"compression" mapstructure:"compression"`
    // Stream (for streaming checkpoints) specifies the number of parallel streams to use.
    // 0 means no streaming. n > 0 means n parallel streams (or number of pipes) to use.
    Stream int32 `json:"stream" key:"stream" yaml:"stream" mapstructure:"stream"`
}
type Client struct {
    // Wait for ready ensures client requests block if the daemon is not up yet
    WaitForReady bool `json:"wait_for_ready" key:"wait_for_ready" yaml:"wait_for_ready" mapstructure:"wait_for_ready" env_aliases:"CEDANA_WAIT_FOR_READY"`
}
type Connection struct {
    // URL is your unique Cedana endpoint URL
    URL string `json:"url" key:"url" yaml:"url" mapstructure:"url" env_aliases:"CEDANA_URL"`
    // AuthToken is your authentication token for the Cedana endpoint
    AuthToken string `json:"auth_token" key:"auth_token" yaml:"auth_token" mapstructure:"auth_token" env_aliases:"CEDANA_AUTH_TOKEN"`
}
type DB struct {
    // Remote sets whether to use a remote database
    Remote bool `json:"remote" key:"remote"  yaml:"remote" mapstructure:"remote" env_aliases:"CEDANA_REMOTE"`
    // Path is the local path to the database file. E.g. /tmp/cedana.db
    Path string `json:"path" key:"path" yaml:"path" mapstructure:"path"`
}
type GPU struct {
    // Number of warm GPU controllers to keep in pool
    PoolSize int `json:"pool_size" key:"pool_size" yaml:"pool_size" mapstructure:"pool_size"`
    // LogDir is the directory to write GPU logs to. By default, logs are written to daemon's stdout
    LogDir string `json:"log_dir" key:"log_dir" yaml:"log_dir" mapstructure:"log_dir"`
}
type Metrics struct {
    // ASR sets whether to enable ASR metrics
    ASR bool `json:"asr" key:"asr" yaml:"asr" mapstructure:"asr"`
    // Otel sets whether to enable OpenTelemetry metrics
    Otel bool `json:"otel" key:"otel" yaml:"otel" mapstructure:"otel" env_aliases:"CEDANA_OTEL_ENABLED"`
}
type Plugins struct {
    // BinDir is the directory where plugin binaries are stored
    BinDir string `json:"bin_dir" key:"bin_dir" yaml:"bin_dir" mapstructure:"bin_dir"`
    // LibDir is the directory where plugin libraries are stored
    LibDir string `json:"lib_dir" key:"lib_dir" yaml:"lib_dir" mapstructure:"lib_dir" env_aliases:"CEDANA_PLUGINS_LIB_DIR"`
		// Builds is the build versions to list/download for plugins (release, alpha)
		Builds string `json:"builds" key:"build" yaml:"builds" mapstructure:"builds"`
}
type Profiling struct {
    // Enabled sets whether to enable and show profiling information
    Enabled bool `json:"enabled" key:"enabled" yaml:"enabled" mapstructure:"enabled"`
    // Precision sets the time precision when printing profiling information (auto, ns, us, ms, s)
    Precision string `json:"precision" key:"precision" yaml:"precision" mapstructure:"precision"`
}

Config
CRIU
Checkpoint
Client
Connection
DB
GPU
Metrics
Plugins
Profiling