Giter VIP home page Giter VIP logo

charm's Introduction

Juju charms

This package parses juju charms.

Anatomy of a charm

A bare minimum charm consists of a directory containing a series of files and directories that inform Juju how to correctly handle and execute a charm.

The charming docs provide more advanced information and tutorials. The following is a very simple basic configuration guide.

metadata.yaml

The metadata.yaml is a required charm configuration yaml. It is expected that every charm contains a metadata.yaml.

An example of a very basic metadata.yaml:

name: example
summary: Example charm
description: |
    A contrived descriptive example of a charm
    description that has multiple line.
tags:
    - example
    - misc
series:
    - focal
    - bionic

config.yaml

config.yaml is an optional configuration yaml for a charm. The configuration allows the author to express a series of options for the user to configure the modelled charm software.

An example of a config.yaml:

options:
    name:
        default:
        description: The name of the example software
        type: string

It is expected that for every configuration option, there is a name and a type. All the other fields are optional.

The type can be either a string, int, float or boolean. Everything else will cause Juju to error out when reading the charm.

metrics.yaml

metrics.yaml represents an optional metrics gathering configuration yaml. For more information about metrics, read up on Metric collecting charms

revision

The revision is used to indicate the revision of a charm. It expects that only an integer exists in that file.

lxd-profile.yaml

The lxd-profile.yaml is an optional configuration yaml. It allows the author of the charm to configure a series of LXD containers directly from the charm.

An example of a lxd-profile.yaml:

config:
  security.nesting: "true"
  security.privileged: "true"
  linux.kernel_modules: openvswitch,nbd,ip_tables,ip6_tables
devices:
  kvm:
    path: /dev/kvm
    type: unix-char
  mem:
    path: /dev/mem
    type: unix-char
  tun:
    path: /dev/net/tun
    type: unix-char

version

The version file is used to indicate the exact version of a charm. Useful for identifying the exact revision of a charm.

charm's People

Contributors

jujubot avatar rogpeppe avatar ericsnowcurrently avatar wallyworld avatar frankban avatar niemeyer avatar fwereade avatar binary132 avatar achilleasa avatar simonrichardson avatar hmlanigan avatar tasdomas avatar vinu2003 avatar ycliuhw avatar jameinel avatar wwitzel3 avatar mattyw avatar axw avatar hpidcock avatar alesstimec avatar natefinch avatar jrwren avatar themue avatar cderici avatar kat-co avatar adriangprado avatar babbageclunk avatar manadart avatar abentley avatar davecheney 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.