cmd

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: BSD-3-Clause Imports: 32 Imported by: 9

Documentation

Index

Constants

View Source
const (
	VOLUMES_DIR           string = "volumes"
	VOLUME_FORMAT_DEFAULT string = "raw"
)

Variables

This section is empty.

Functions

func Build

func Build(r *util.Repo, image *core.Image, template *core.Template, verbose bool, mem string) error

func BuildPackage

func BuildPackage(packageDir string) (string, error)

func CollectDirectoryContents

func CollectDirectoryContents(packageDir string) (map[string]string, error)

func CollectPackage

func CollectPackage(repo *util.Repo, packageDir string, extraDependencies []string, pullMissing, remote, verbose bool) error

CollectPackage will try to resolve all of the dependencies of the given package and collect the content in the $CWD/mpm-pkg directory.

func CollectPathContents

func CollectPathContents(path string) (map[string]string, error)

func Compose

func Compose(r *util.Repo, loaderImage string, imageSize int64, filesystem string, uploadPath string, appName string, commandLine string, verbose bool) error

func ComposePackage

func ComposePackage(repo *util.Repo, extraDependencies []string, imageSize int64, updatePackage, verbose, pullMissing bool,
	packageDir, appName string, bootOpts *BootOptions, filesystem string, loaderImage string) error

ComposePackage uses the contents of the specified package directory and create a (QEMU) virtual machine image. The image consists of all of the required packages. If updatePackage is set, ComposePackage tries to update an existing image by comparing previous MD5 hashes to the ones in the current package directory. Only modified files are uploaded and no file deletions are possible at this time.

func ComposePackageAndUploadToRemoteInstance

func ComposePackageAndUploadToRemoteInstance(repo *util.Repo, extraDependencies []string, verbose, pullMissing bool,
	packageDir, remoteHostInstance string) error

func ConfigPrint

func ConfigPrint(c *cli.Context) error

ConfigPrint prints current capstan configuration to console.

func CopyFile

func CopyFile(conn net.Conn, src string, dst string) error

func CreateVolume

func CreateVolume(packagePath string, volume Volume) error

CreateVolume creates volume with given specifications.

func Delete

func Delete(name string) error

func DeleteVolume

func DeleteVolume(packagePath, name string, verbose bool) error

DeleteVolume deletes volume and its metadata with given name.

func DescribePackage

func DescribePackage(repo *util.Repo, packageName string, showContent bool) (string, error)

DescribePackage describes package with given name without extracting it.

func ImportPackage

func ImportPackage(repo *util.Repo, packageDir string) error

func Info

func Info(path string) error

func InitPackage

func InitPackage(packagePath string, p *core.Package) error

func Instances

func Instances() error

func IsReg

func IsReg(m os.FileMode) bool

func OpenStackPush

func OpenStackPush(c *cli.Context) error

OpenStackPush picks best flavor, composes package, builds .qcow2 image and uploads it to OpenStack.

func OpenStackRun

func OpenStackRun(c *cli.Context) error

OpenStackRun picks best flavor for image and runs instacne(s) on OpenStack.

func Pull

func Pull(r *util.Repo, hypervisor string, image string) error

func PullPackage

func PullPackage(r *util.Repo, packageName string) error

PullPackage looks for the package in remote repository and tries to import it into local repository.

func RunInstance

func RunInstance(repo *util.Repo, config *runtime.RunConfig) error

func RuntimeInit

func RuntimeInit(runtimeName string, plain bool, force bool) error

func RuntimeList

func RuntimeList() string

func RuntimePreview

func RuntimePreview(runtimeName string, plain bool) error

func SetArgs

func SetArgs(r *util.Repo, hypervisor, image string, args string) error

func Stop

func Stop(name string) error

func UpdatePackages

func UpdatePackages(repo *util.Repo, search string, compareCreated, verbose bool) error

func UploadFiles

func UploadFiles(r *util.Repo, hypervisor string, image string, t *core.Template, verbose bool, mem string) error

func UploadPackageContents

func UploadPackageContents(r *util.Repo, appImage string, uploadPaths map[string]string, imageCache core.HashCache, verbose bool, zfsBuilderPath string) (core.HashCache, error)

func UploadPackageContentsToRemoteGuest

func UploadPackageContentsToRemoteGuest(uploadPaths map[string]string, remoteHostNameOrIpAddress string, verbose bool) error

func UploadRPM

func UploadRPM(r *util.Repo, hypervisor string, image string, template *core.Template, verbose bool, mem string) error

Types

type BootOptions

type BootOptions struct {
	Cmd        string
	Boot       []string
	EnvList    []string
	PackageDir string
}

func (*BootOptions) GetCmd

func (b *BootOptions) GetCmd() (string, error)

GetCmd builds final bootcmd based on three parameters (in this order): * --run <commandLine> * --boot <customBoot> * config_set_default: <> (read from meta/run.yaml within packageDir)

type Volume

type Volume struct {
	hypervisor.Volume
	SizeMB int64
	Name   string
}

Volume is an extended version of hypervisor.Volume with volume creation data.

Jump to

Keyboard shortcuts

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