github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/core/lxdprofile/doc.go (about)

     1  // Copyright 2018 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  // Package lxdprofile defines a set of functions and constants that can
     5  // interact with LXD Profiles. LXD Profiles are key/value YAML configuration
     6  // files that the LXD provider and LXD container broker can consume and apply
     7  // to a container.
     8  //
     9  // More information about a type of LXD configuration profile can found
    10  // https://github.com/lxc/lxd/blob/master/doc/containers.md
    11  //
    12  // LXDProfile package defines core concepts that can be utilised from different
    13  // packages of the codebase, that want to work with a LXD profile. Not all
    14  // key/value configurations from the underlying LXD can be applied and some
    15  // key/values need to be applied using `--force`. To validate the LXD Profile
    16  // before attempting to apply it to a ubuntu LXD container, there are some
    17  // validation functions.
    18  //
    19  // Each LXDProfile is given a unique name when applied to the container. This
    20  // is for three reasons:
    21  //  1. readability - when an operator is attempting to debug if a LXD Profile
    22  //     has been applied for a given charm revision, it should be straightforward
    23  //     for the operator to read the output of `lxd profile list` to marry them.
    24  //  2. Collisions - to ensure that no other charm profile can't collide with in
    25  //     the LXC namespace for an existing LXD Profile, each profile
    26  //     namespaces in the following way `juju-<model>-<application>-<charm-revision>`
    27  //  3. Removability - juju needs to clean up LXD profiles that where applied to
    28  //     the LXD container, but are subsequently not required any more, either by
    29  //     an upgrade of the charm or the complete removal of the charm. Either way,
    30  //     the removal of the charms from the LXC profile list is to prevent orphan
    31  //     profiles from being left dangling.
    32  //
    33  package lxdprofile