Giter VIP home page Giter VIP logo

debootstrap-formula's Introduction

debootstrap

This formula makes it easy to create chroots of various Debian-based distributions with debootstrap/cdebootstrap.

Available states

debootstrap

Create chroots described in pillar data within the debootstrap:chroots dictionnary. Here's a small pillar data sample:

debootstrap:
  basedir: /srv/chroots
  implementation: cdebootstrap
  chroots:
    unstable:  # the chroot identifier
      vendor: debian
      dist: sid

Here's the full list of parameters that are supported in such chroot descriptions:

  • id: a chroot identifier, it defaults to the name of the key in the debootstrap:chroots pillar dictionnary.
  • dist: the codename of the "distribution" (release) to bootstrap. Defaults to the same value as id.
  • vendor: the name of the vendor associated to dist. Only required when the same codename is used by multiple vendors. Best to be explicit when you're not sure.
  • basedir: parent directory of where the chroot will be created. Defaults to debootstrap:basedir pillar or /srv/chroots when the former does not exist.
  • directory: the directory where the chroot will be created. Defaults to <basedir>/<id>.
  • arch: the architecture to bootstrap in the chroot. Defaults to the current architecture.
  • components (alist): the repository components to enable in APT's configuration (aka sources.list). The default value varies for each vendor (and can be overriden via pillar data debootstrap:vendor:<vendor>:components).
  • extra_dists (a list): supplementary APT repositories to enable in APT's configuration. Defaults to the empty list.
  • with_source (boolean): if True then add "deb-src" lines for all repositories enabled in APT's sources.list file.

debootstrap.prereq

Ensure that the selected debootstrap implementation is installed and that the base directory hosting the chroots exists. In general, there's no reason to use this state directly (except possibly when you extend this formula). The fact that it is separated from debootstrap is only due to an implementation detail.

Configuration

See the pillar.example file to have an idea of everything that can be customized in this formula.

Extending

You can build your own debootstrap-based formula by importing the debootstrap_state macro from debootstrap/state.jinja:

include:
  - debootstrap.pkg

{% from 'debootstrap/state.jinja' import debootstrap_state %}

{% set data = {
    'id': 'my_chroot_identifier',
    'directory': '/srv/chroots/jessie',
    'vendor': 'debian',
    'dist': 'jessie',
} %}
{{ debootstrap_state(data, apt_update=False) }}

You can rely on the fact that this will also create a file.managed state named debootstrap_<id>_sources_list to update the sources.list file in the chroot.

debootstrap-formula's People

Contributors

kiniou avatar mbehrle avatar myii avatar rhertzog avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.