From 195053108b97005304f3708c6449b269a90a7c91 Mon Sep 17 00:00:00 2001 From: Derek Higgins Date: Tue, 9 Jul 2013 10:46:00 +0100 Subject: [PATCH] Adding docs for the source-repositories element Change-Id: I57244a5cc2f563b2e69eb49388c3c6b49202c9eb --- README.md | 18 +++++++++++++----- elements/source-repositories/README.md | 7 +++++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 14339cb2f..32d20d334 100644 --- a/README.md +++ b/README.md @@ -199,14 +199,15 @@ possible approach to this would be to label elements as either a "driver", - An element that installs and configures Nova might be a bit more complex: elements/ service-nova/ + source-repository-nova - register a source repository pre-install.d/ - 50-my-ppa - add a PPA + 50-my-ppa - add a PPA install.d/ - 10-user - common Nova user accts - 50-my-pack - install packages from my PPA - 60-nova - install nova and some dependencies + 10-user - common Nova user accts + 50-my-pack - install packages from my PPA + 60-nova - install nova and some dependencies first-boot.d/ - 60-nova - do some post-install config for nova + 60-nova - do some post-install config for nova - In the general case, configuration should probably be handled either by the meta-data service (eg, during first-boot.d) or via normal CM tools @@ -233,6 +234,13 @@ It should be noted that this is merely a naming convention to assist in managing elements. Diskimage-builder is not, and should not be, functionally dependent upon specific element names. +- diskimage-builder has the ability to retrieve source code for an element and + place it into a directory on the target image during the extra-data phase. The + default location/branch can then be overridden by the process running + diskimage-builder, making it possible to use the same element to track more + then one branch of a git repository or to get source for a local cache. See + elements/source-repositories/README.md for more information. + Debugging elements ------------------ diff --git a/elements/source-repositories/README.md b/elements/source-repositories/README.md index 00916100f..fefa1bfef 100644 --- a/elements/source-repositories/README.md +++ b/elements/source-repositories/README.md @@ -26,8 +26,15 @@ diskimage-builder which can change the details registered by the element, these for example if you would like diskimage-builder to get ironic from a local mirror you could set DIB_REPOLOCATION_ironic=git://localgitserver/ironic.git +Alternatively if you would like to use the keystone element and build an image with +keystone from a stable branch then you would set DIB_REPOREF_keystone=stable/grizzly + Git sources will be cloned to \ Tarballs will be extracted to \. Tarballs should contain a single topleval directory, regardless of the name of this top level directory it will be renamed to \ + +If mulitple elements register a source location with the same +then source-repositories will exit with an error. Care should therefore be taken +to only use elements together that download source to different locations.