demux

package
v0.0.0-...-6b2d232 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

README

snapshotter

Building an esgz Formatted Image

The demux snapshotter uses a publicly available eStargz formatted image in its integration testing pipeline. This image has the reference ghcr.io/firecracker-microvm/firecracker-containerd/amazonlinux:latest-esgz.

Optimize an Amazon Linux Container Image for esgz

The ctr-remote binary is needed to optimize an image for the esgz image format. Building the stargz-snapshotter submodule provides ctr-remote, a ctr wrapper, in _submodules/stargz-snapshotter/out/ctr-remote. Refer to the containerd stargz-snapshotter documentation on ctr-remote for additional details.

The root level Makefile provides make esgz-test-image for pulling the latest Amazon Linux image locally and optimizing it for eStargz using ctr-remote into an image ghcr.io/firecracker-microvm/firecracker-containerd/amazonlinux:latest-esgz. Code owners of firecracker-containerd then push the eStargz optimized image as this publicly available reference using make push-esgz-test-image with proper credential environment variables GH_USER and GH_PERSONAL_ACCESS_TOKEN set.

Example optimization and push to GHCR

Using default base and esgz images:

$ make esgz-test-image
$ GH_USER=xxx
# set GH_PERSONAL_ACCESS_TOKEN with command substitution such that it does not show in shell history
$ make \
    GH_USER=$GH_USER \
    GH_PERSONAL_ACCESS_TOKEN=`cat`
    push-esgz-test-image
# enter personal access token and CTRL^D

To pull, convert, and push to a repo where the user has permissions with custom base and esgz images:

$ DEFAULT_BASE_IMAGE=public.ecr.aws/amazonlinux/amazonlinux:2022
$ DEFAULT_ESGZ_IMAGE=ghcr.io/$DESTINATION_REPO/amazonlinux:2022-esgz
$ make \
    DEFAULT_BASE_IMAGE=$DEFAULT_BASE_IMAGE \
    DEFAULT_ESGZ_IMAGE=$DEFAULT_ESGZ_IMAGE \
    esgz-test-image
$ GH_USER=xxx
# set GH_PERSONAL_ACCESS_TOKEN with command substitution such that it does not show in shell history
$ make \
    GH_USER=$GH_USER \
    GH_PERSONAL_ACCESS_TOKEN=`cat`
    DEFAULT_ESGZ_IMAGE=$DEFAULT_ESGZ_IMAGE \
    push-esgz-test-image
# enter personal access token and CTRL^D

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSnapshotter

func NewSnapshotter(cache *cache.RemoteSnapshotterCache) snapshots.Snapshotter

NewSnapshotter creates instance of Snapshotter with provided cache.

Types

type Snapshotter

type Snapshotter struct {
	// contains filtered or unexported fields
}

Snapshotter routes snapshotter requests to their destined remote snapshotter via their snapshotter namespace.

Remote snapshotters are cached for subsequent snapshotter requests.

func (*Snapshotter) Cleanup

func (s *Snapshotter) Cleanup(ctx context.Context) error

Cleanup proxies remote snapshotter cleanup request.

See https://github.com/containerd/containerd/blob/v1.6.4/snapshots/snapshotter.go

func (*Snapshotter) Close

func (s *Snapshotter) Close() error

Close calls close on all cached remote snapshotters.

See https://github.com/containerd/containerd/blob/v1.6.4/snapshots/snapshotter.go

func (*Snapshotter) Commit

func (s *Snapshotter) Commit(ctx context.Context, name string, key string, opts ...snapshots.Opt) error

Commit proxies remote snapshotter commit request.

See https://github.com/containerd/containerd/blob/v1.6.4/snapshots/snapshotter.go

func (*Snapshotter) Mounts

func (s *Snapshotter) Mounts(ctx context.Context, key string) ([]mount.Mount, error)

Mounts proxies remote snapshotter mounts request.

See https://github.com/containerd/containerd/blob/v1.6.4/snapshots/snapshotter.go

func (*Snapshotter) Prepare

func (s *Snapshotter) Prepare(ctx context.Context, key string, parent string, opts ...snapshots.Opt) ([]mount.Mount, error)

Prepare proxies remote snapshotter prepare request.

See https://github.com/containerd/containerd/blob/v1.6.4/snapshots/snapshotter.go

func (*Snapshotter) Remove

func (s *Snapshotter) Remove(ctx context.Context, key string) error

Remove proxies remote snapshotter remove request.

See https://github.com/containerd/containerd/blob/v1.6.4/snapshots/snapshotter.go

func (*Snapshotter) Stat

func (s *Snapshotter) Stat(ctx context.Context, key string) (snapshots.Info, error)

Stat proxies remote snapshotter stat request.

See https://github.com/containerd/containerd/blob/v1.6.4/snapshots/snapshotter.go

func (*Snapshotter) Update

func (s *Snapshotter) Update(ctx context.Context, info snapshots.Info, fieldpaths ...string) (snapshots.Info, error)

Update proxies remote snapshotter update request.

See https://github.com/containerd/containerd/blob/v1.6.4/snapshots/snapshotter.go

func (*Snapshotter) Usage

func (s *Snapshotter) Usage(ctx context.Context, key string) (snapshots.Usage, error)

Usage proxies remote snapshotter usage request.

See https://github.com/containerd/containerd/blob/v1.6.4/snapshots/snapshotter.go

func (*Snapshotter) View

func (s *Snapshotter) View(ctx context.Context, key string, parent string, opts ...snapshots.Opt) ([]mount.Mount, error)

View proxies remote snapshotter view request.

See https://github.com/containerd/containerd/blob/v1.6.4/snapshots/snapshotter.go

func (*Snapshotter) Walk

func (s *Snapshotter) Walk(ctx context.Context, fn snapshots.WalkFunc, filters ...string) error

Walk proxies remote snapshotter walk request.

See https://github.com/containerd/containerd/blob/v1.6.4/snapshots/snapshotter.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL