Skip to content
Marco Ceppi edited this page Feb 14, 2014 · 3 revisions

Description

juju-git-charm is a Juju plugin that enables a charm author to utilize the git version control system to install and keep up-to-date Juju Charms.

The most likely scenario where juju-git-charm is useful is during development of a Juju Charm, where the developer wishes to code on their host machine, deploy to a git repository (even allow others to contribute to the charm), and pull it down to the Juju environment.

Usage

Description (--description)

Describes the Juju plugin.

Help (--help)

Lists the available options.

Install (--install)

Installs the charm from the git repo.

Arguments:

[name of charm - required] [git repository - required] [Ubuntu Release Name - required] [Git Folder - optional]

Example:

juju git-charm --install metis [email protected]:StroblIndustries/Metis.git precise juju-charms/metis

This will:

  1. Create the folder juju-git-charms in ~/ and metis folder within ~/juju-git-charms

  2. Creates a config file called .metis in ~/juju-git-charms with ubuntuReleaseName=precise and gitFolder=juju-charms/metis

  3. Initialize git in the folder, add the repo as the origin remote, pull down the code.

  4. Make sure the ~/charms/precise/metis folder exists

  5. Copies the contents of the juju-charms/metis folder into ~/charms/precise/metis.

Update (--update)

Updates the charm.

Arguments:

[name of charm - required]

Example:

juju git-charm metis

This will:

  1. Read the config from ~/juju-git-charm/.metis

  2. Go to ~/juju-git-charm/metis directory, update the repo via "git pull origin master"

  3. Copy the contents of juju-charms/metis into the re-created ~/charms/precise/metis folder.