propellor-5.13: property-based host configuration management in haskell

Safe Haskell | None
Language | Haskell2010

Propellor.Property.Bootstrap

Description

This module contains properties that configure how Propellor bootstraps to run itself on a Host.

Synopsis

- data Bootstrapper
  - = Robustly Builder
  - | OSOnly
- data Builder
  - = Cabal
  - | Stack
- bootstrapWith :: Bootstrapper -> Property (HasInfo + UnixLike)
- data RepoSource
  - = GitRepoUrl String
  - | GitRepoOutsideChroot
- bootstrappedFrom :: RepoSource -> Property Linux
- clonedFrom :: RepoSource -> Property Linux

# Documentation

data Bootstrapper Source #

Different ways that Propellor's dependencies can be installed, and propellor can be built. The default is `Robustly Cabal`

`Robustly Cabal` and `Robustly Stack` use the OS's native packages as much as possible to install Cabal, Stack, and propellor's build dependencies. When necessary, dependencies are built from source using Cabal or Stack rather than using the OS's native packages.

`OSOnly` uses the OS's native packages of Cabal and all of propellor's build dependencies. It may not work on all systems.

Constructors

Robustly Builder |
OSOnly |

#### Instances

Instances details

Show Bootstrapper Source # |
Instance details Defined in Propellor.Bootstrap Methods showsPrec :: Int -> Bootstrapper -> ShowS show :: Bootstrapper -> String showList :: [Bootstrapper] -> ShowS

data Builder Source #

Constructors

Cabal |
Stack |

#### Instances

Instances details

Show Builder Source # |
Instance details Defined in Propellor.Bootstrap Methods showsPrec :: Int -> Builder -> ShowS show :: Builder -> String showList :: [Builder] -> ShowS

bootstrapWith :: Bootstrapper -> Property (HasInfo + UnixLike) Source #

This property can be used to configure the `Bootstrapper` that is used to bootstrap propellor on a Host. For example, if you want to use stack:

    host "example.com" $ props
    	& bootstrapWith (Robustly Stack)

When `bootstrappedFrom` is used in a `Chroot` or other `Container`, this property can also be added to the chroot to configure it.

data RepoSource Source #

Where a propellor repository should be bootstrapped from.

Constructors

GitRepoUrl String |
GitRepoOutsideChroot | When used in a chroot, this copies the git repository from outside the chroot, including its configuration.

bootstrappedFrom :: RepoSource -> Property Linux Source #

Bootstraps a propellor installation into usrlocalpropellor

Normally, propellor is bootstrapped by eg, using propellor --spin, and so this property is not generally needed.

This property only does anything when used inside a Chroot or other Container. This is particularly useful inside a chroot used to build a disk image, to make the disk image have propellor installed.

The git repository is cloned (or pulled to update if it already exists).

All build dependencies are installed, using distribution packages or falling back to using cabal or stack.

clonedFrom :: RepoSource -> Property Linux Source #

Clones the propellor repository into usrlocalpropellor

If the propellor repo has already been cloned, pulls to get it up-to-date.