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

B9.DiskImageBuilder

Description

Effectful functions that create and convert disk image files.

Synopsis

# Documentation

materializeImageSource :: IsB9 e => ImageSource -> Image -> Eff e () Source #

Create an image from an image source. The destination image must have a compatible image type and filesystem. The directory of the image MUST be present and the image file itself MUST NOT alredy exist.

Replace \$... variables inside an ImageTarget

Return all valid image types sorted by preference.

Return all supported source ImageTypes compatible to a ImageDestinaion in the preferred order.

Resolve an ImageSource to an Image. The ImageSource might not exist, as is the case for EmptyImage.

Convert some Image, e.g. a temporary image used during the build phase to the final destination.

resizeImage :: IsB9 e => ImageResize -> Image -> Eff e () Source #

Resize an image, including the file system inside the image.

importImage :: IsB9 e => Image -> Image -> Eff e () Source #

Import a disk image from some external source into the build directory if necessary convert the image.

exportImage :: IsB9 e => Image -> Image -> Eff e () Source #

Export a disk image from the build directory; if necessary convert the image.

exportAndRemoveImage :: IsB9 e => Image -> Image -> Eff e () Source #

Export a disk image from the build directory; if necessary convert the image.

convertImage :: IsB9 e => Image -> Image -> Eff e () Source #

Convert an image in the build directory to another format and return the new image.

Publish an sharedImage made from an image and image meta data to the configured repository

Create the parent directories for the file that contains the Image. If the path to the image file is relative, prepend _projectRoot from the B9Config.

Publish the latest version of a shared image identified by name to the selected repository from the cache.

lookupSharedImages :: IsB9 e => (Repository -> Bool) -> (SharedImage -> Bool) -> Eff e [(Repository, SharedImage)] Source #

Find shared images and the associated repos from two predicates. The result is the concatenated result of the sorted shared images satisfying imgPred.

getSharedImages :: IsB9 e => Eff e [(Repository, [SharedImage])] Source #

Return a list of all existing sharedImages from cached repositories.

Return the path to the sub directory in the cache that contains files of shared images.

getSelectedRepos :: IsB9 e => Eff e [RemoteRepo] Source #

Return either all remote repos or just the single selected repo.

pullRemoteRepos :: IsB9 e => Eff e () Source #

Pull metadata files from all remote repositories.