b9-0.5.49: A tool and library for building virtual machine images.

Safe HaskellNone
LanguageHaskell2010

B9

Description

B9 is a library and build tool with primitive operations to rmrun a build script inside a virtual machine and to create and convert virtual machine image files as well as related ISO and VFAT disk images for e.g. cloud-init configuration sources.

This module re-exports the modules needed to build a tool around the library, e.g. see src/cli/Main.hs as an example.

B9.ArtifactGenerator is the module containing the basic data structure used to describe a B9 build.

Synopsis

Documentation

b9Version :: Version Source #

Return the cabal package version of the B9 library.

b9VersionString :: String Source #

Return the cabal package version of the B9 library, formatted using showVersion.

runShowVersion :: MonadIO m => m () Source #

Just print the b9VersionString

runBuildArtifacts :: MonadIO m => [FilePath] -> B9ConfigAction m String Source #

Execute the artifact generators defined in a list of text files. Read the text files in the list and parse them as ArtifactGenerators then mappend them and apply buildArtifacts to them.

runFormatBuildFiles :: MonadIO m => [FilePath] -> m () Source #

Read all text files and parse them as ArtifactGenerators. Then overwrite the files with their contents but _pretty printed_ (i.e. formatted).

runPush :: MonadIO m => SharedImageName -> B9ConfigAction m () Source #

Upload a SharedImageName to the default remote repository. Note: The remote repository is specified in the B9Config.

runPull :: MonadIO m => Maybe SharedImageName -> B9ConfigAction m () Source #

Either pull a list of available SharedImageNames from the remote repository if Nothing is passed as parameter, or pull the latest version of the image from the remote repository. Note: The remote repository is specified in the B9Config.

runRun :: MonadIO m => SharedImageName -> [String] -> B9ConfigAction m String Source #

Execute an interactive root shell in a running container from a SharedImageName.

runGcLocalRepoCache :: MonadIO m => B9ConfigAction m () Source #

Delete all obsolete versions of all SharedImageNames.

runGcRemoteRepoCache :: MonadIO m => B9ConfigAction m () Source #

Clear the shared image cache for a remote. Note: The remote repository is specified in the B9Config.

runListSharedImages :: MonadIO m => B9ConfigAction m [SharedImage] Source #

Print a list of shared images cached locally or remotely, if a remote repository was selected. Note: The remote repository is specified in the B9Config.

runAddRepo :: MonadIO m => RemoteRepo -> B9ConfigAction m () Source #

Check the SSH settings for a remote repository and add it to the user wide B9 configuration file.

runLookupLocalSharedImage :: MonadIO m => SharedImageName -> B9ConfigAction m (Maybe SharedImageBuildId) Source #

Find the most recent version of a SharedImageName in the local image cache.