container

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2019 License: BSD-3-Clause Imports: 17 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// KeyPassphrase is the name of the environment variable used to specify the passphrase of the key to be used to sign images
	KeyPassphrase = "SY_KEY_PASSPHRASE"

	// KeyIndex is the index of the key to use to sign images
	KeyIndexEnvVar = "SY_KEY_INDEX"

	// HybridModel is the identifier used to identify the hybrid model
	HybridModel = "hybrid"

	// BindModel is the identifier used to identify the bind-mount model
	BindModel = "bind"
)

Variables

This section is empty.

Functions

func Create

func Create(container *Config, sysCfg *sys.Config) error

Create builds a container based on a MPI configuration

func GetContainerDefaultName

func GetContainerDefaultName(distro string, mpiID string, mpiVersion string, appName string, model string) string

GetContainerDefaultName returns the default name for any container based on the configuration details

func GetExecArgs

func GetExecArgs(myHostMPICfg *implem.Info, hostBuildEnv *buildenv.Info, syContainer *Config, sysCfg *sys.Config) []string

GetExecArgs figures out the singularity exec arguments to be used for executing a container

func Pull

func Pull(containerInfo *Config, sysCfg *sys.Config) error

Pull retieves an image from the registry

func PullContainerImage

func PullContainerImage(cfg *Config, mpiImplm *implem.Info, sysCfg *sys.Config, syConfig *sy.MPIToolConfig) error

PullContainerImage pulls from a registry the appropriate image

func Sign

func Sign(container *Config, sysCfg *sys.Config) error

Sign signs a given image

func Upload

func Upload(containerInfo *Config, sysCfg *sys.Config) error

Upload uploads an image to a registry

Types

type Config

type Config struct {
	// Name of the container
	Name string

	// Path to the container's image
	Path string

	// BuildDir is the path to the directory from where the image must be built
	BuildDir string

	// InstallDir is the directory where the container needs to be stored
	InstallDir string

	// DefFile is the path to the definition file associated to the container
	DefFile string

	// Distro is the ID of the Linux distribution to use in the container
	Distro string

	// URL is the URL of the container image to use when pulling the image from a registry
	URL string

	// Model specifies the model to follow for MPI inside the container
	Model string

	// AppExe is the command to start the application in the container
	AppExe string

	// MPIDir is the directory in the container where MPI is supposed to be installed or mounted
	MPIDir string

	// Binds is the set of bind options to use while starting the container
	Binds []string
}

Config is a structure representing a container

func GetMetadata

func GetMetadata(imgPath string, sysCfg *sys.Config) (Config, implem.Info, error)

GetMetadata inspects the container's image and gathers all the available metadata

Jump to

Keyboard shortcuts

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