Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Common Ignite prefix IGNITE_PREFIX = "ignite" // Ignite data base directory DATA_DIR = "/var/lib/firecracker" // Permissions for the data directory and its subdirectories DATA_DIR_PERM = 0755 // Permissions for files in the data directory // TODO: Make all writes to DATA_DIR use this DATA_DIR_FILE_PERM = 644 // Filename for metadata files METADATA = "metadata.json" // DHCP infinite lease time DHCP_INFINITE_LEASE = "4294967295s" // TAP adapter prefix in the parent container TAP_PREFIX = "vm_" // Bridge device prefix in the parent container BRIDGE_PREFIX = "br_" // Timeout in seconds to wait for VM shutdown before SIGKILL STOP_TIMEOUT = 20 // Additional timeout in seconds for docker to wait for ignite to save and quit IGNITE_TIMEOUT = 10 // In-container file name for the firecracker socket FIRECRACKER_API_SOCKET = "firecracker.sock" // In-container file name for the firecracker log FIFO LOG_FIFO = "firecracker_log.fifo" // In-container file name for the firecracker metrics FIFO METRICS_FIFO = "firecracker_metrics.fifo" // Socket with a web server (with metrics for now) for the daemon DAEMON_SOCKET = "daemon.sock" // How many characters Ignite UIDs should have IGNITE_UID_LENGTH = 16 // How long to wait for SSH to come up by default SSH_DEFAULT_TIMEOUT_SECONDS = 30 // IGNITE_CONFIG_FILE is the default ignite configuration file path. IGNITE_CONFIG_FILE = "/etc/ignite/config.yaml" )
View Source
const ( // Some commonly used multipliers for data sizes MB = 1048576 GB = 1073741824 )
View Source
const ( // Path to directory containing a subdirectory for each image IMAGE_DIR = DATA_DIR + "/image" // Filename for the image file containing the image filesystem IMAGE_FS = "image.ext4" )
View Source
const ( // Path to directory containing a subdirectory for each kernel KERNEL_DIR = DATA_DIR + "/kernel" // Kernel filename KERNEL_FILE = "vmlinux" // Filename for the tar containing the kernel filesystem KERNEL_TAR = "kernel.tar" // The kernel image name to be used as the default DEFAULT_KERNEL_IMAGE_NAME = "weaveworks/ignite-kernel" // The kernel image tag to be used as the default DEFAULT_KERNEL_IMAGE_TAG = "5.10.51" )
View Source
const ( // Default maximum size for the pool (if using a physical device, it's size will be used instead) POOL_DATA_SIZE_BYTES = 100 * GB // 100 GB // Default allocation size for the pool, should be between // 128 (64KB) and 2097152 (1GB). 128 is recommended if // snapshotting a lot (like we do with layers). POOL_ALLOCATION_SIZE_SECTORS = 128 // Additional space for volumes to accommodate the ext4 partition POOL_VOLUME_EXTRA_SIZE = 100 * MB // Base directory for snapshotter data SNAPSHOTTER_DIR = DATA_DIR + "/snapshotter" // Paths to the default data and metadata backing files SNAPSHOTTER_METADATA_PATH = SNAPSHOTTER_DIR + "/metadata.dm" SNAPSHOTTER_DATA_PATH = SNAPSHOTTER_DIR + "/data.dm" )
View Source
const ( // Path to directory containing a subdirectory for each VM VM_DIR = DATA_DIR + "/vm" // Path where ignited stores its manifests MANIFEST_DIR = "/etc/firecracker/manifests" // Default values for VM options VM_DEFAULT_CPUS = 1 VM_DEFAULT_MEMORY = 512 * MB VM_DEFAULT_SIZE = 4 * GB VM_DEFAULT_KERNEL_ARGS = "console=ttyS0 reboot=k panic=1 pci=off ip=dhcp" // SSH key template for VMs VM_SSH_KEY_TEMPLATE = "id_%s" // TODO: remove this when the old dm code is removed OVERLAY_FILE = "overlay.dm" // Prometheus socket filename PROMETHEUS_SOCKET = "prometheus.sock" // Where the VM specification is located inside of the container IGNITE_SPAWN_VM_FILE_PATH = "/vm.json" // Where the vmlinux kernel is located inside of the container IGNITE_SPAWN_VMLINUX_FILE_PATH = "/vmlinux" // Subdirectory for volumes to be forwarded into the VM IGNITE_SPAWN_VOLUME_DIR = "/volumes" // DEFAULT_SANDBOX_IMAGE_NAME is the name of the default sandbox container // image to be used. DEFAULT_SANDBOX_IMAGE_NAME = "weaveworks/ignite" // DEFAULT_SANDBOX_IMAGE_NAME is the name of the default sandbox container // image to be used. DEFAULT_SANDBOX_IMAGE_TAG = "dev" // IGNITE_INTERFACE_ANNOTATION is the annotation prefix to store a list of extra interfaces IGNITE_INTERFACE_ANNOTATION = "ignite.weave.works/interface/" // IGNITE_SANDBOX_ENV_VAR is the annotation prefix to store a list of env variables IGNITE_SANDBOX_ENV_VAR = "ignite.weave.works/sanbox-env/" // IGNITE_SPAWN_TIMEOUT determines how long to wait for spawn to start up IGNITE_SPAWN_TIMEOUT = 2 * time.Minute )
Variables ¶
View Source
var BinaryDependencies = [...]string{
"mount",
"umount",
"tar",
"mkfs.ext4",
"e2fsck",
"resize2fs",
"strings",
"dmsetup",
"ssh",
"git",
}
View Source
var CNIDependencies = [...]string{
"/opt/cni/bin/loopback",
"/opt/cni/bin/bridge",
}
View Source
var PathDependencies = [...]string{
"/dev/mapper/control",
"/dev/net/tun",
"/dev/kvm",
}
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.