From 012116cad66eed0706a6381834152623df8272a0 Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Fri, 14 Dec 2012 13:25:18 +1300 Subject: [PATCH] Move everything 'common' into base, making it avoidable for tests. Change-Id: I87edd00f6e0edcd609856192c2c98604ef3274f0 --- elements/base/install.d/00-baseline-environment | 6 ++++++ elements/base/pre-install.d/00-baseline-tools | 8 ++++++++ elements/base/pre-install.d/99-apt-get-update | 6 ++++++ elements/tripleo-staging/README.md | 4 ++++ elements/tripleo-staging/pre-install.d/01-bleeding-edge | 6 ++++++ lib/img-functions | 9 --------- 6 files changed, 30 insertions(+), 9 deletions(-) create mode 100755 elements/base/install.d/00-baseline-environment create mode 100755 elements/base/pre-install.d/00-baseline-tools create mode 100755 elements/base/pre-install.d/99-apt-get-update create mode 100644 elements/tripleo-staging/README.md create mode 100755 elements/tripleo-staging/pre-install.d/01-bleeding-edge diff --git a/elements/base/install.d/00-baseline-environment b/elements/base/install.d/00-baseline-environment new file mode 100755 index 00000000..85c249ec --- /dev/null +++ b/elements/base/install.d/00-baseline-environment @@ -0,0 +1,6 @@ +#!/bin/bash +# These are useful, or at worst not harmful, for all imges we build. + +set -e + +apt-get -y install linux-image-generic vlan open-iscsi diff --git a/elements/base/pre-install.d/00-baseline-tools b/elements/base/pre-install.d/00-baseline-tools new file mode 100755 index 00000000..d5b428a8 --- /dev/null +++ b/elements/base/pre-install.d/00-baseline-tools @@ -0,0 +1,8 @@ +#!/bin/bash +# Install baseline packages and tools. + +set -e + +apt-get -y update +apt-get -y install python-software-properties +add-apt-repository -y ppa:tripleo/demo diff --git a/elements/base/pre-install.d/99-apt-get-update b/elements/base/pre-install.d/99-apt-get-update new file mode 100755 index 00000000..21238678 --- /dev/null +++ b/elements/base/pre-install.d/99-apt-get-update @@ -0,0 +1,6 @@ +#!/bin/bash +# Do an apt-get update, so that packages can be installed. + +set -e + +apt-get -y update diff --git a/elements/tripleo-staging/README.md b/elements/tripleo-staging/README.md new file mode 100644 index 00000000..a2c68f2f --- /dev/null +++ b/elements/tripleo-staging/README.md @@ -0,0 +1,4 @@ +Adds the tripleo demo staging repository. + +This is used when testing builds of new plumbing (such as qemu-kvm). Most folk +should not need it. diff --git a/elements/tripleo-staging/pre-install.d/01-bleeding-edge b/elements/tripleo-staging/pre-install.d/01-bleeding-edge new file mode 100755 index 00000000..449446f3 --- /dev/null +++ b/elements/tripleo-staging/pre-install.d/01-bleeding-edge @@ -0,0 +1,6 @@ +#!/bin/bash +# Install bleeding edge tools instead of stable ones. + +set -e + +add-apt-repository -y ppa:tripleo/demo-staging diff --git a/lib/img-functions b/lib/img-functions index e2362da5..111d92d6 100644 --- a/lib/img-functions +++ b/lib/img-functions @@ -216,20 +216,11 @@ function unblock_daemons () { function do_pre_install () { block_daemons block_apt_translations - # Install baseline packages and tools - run_in_target apt-get -y update - run_in_target apt-get -y install python-software-properties - run_in_target add-apt-repository -y ppa:tripleo/demo - # Uncomment to get the bleeding edge - this should be an element thing. - # run_in_target add-apt-repository -y ppa:tripleo/demo-staging # Run pre-install scripts. These do things that prepare the chroot for package installs run_d_in_target pre-install - run_in_target apt-get -y update } function do_install () { - # These are useful, or at worst not harmful, for all imges we build. - run_in_target apt-get -y install linux-image-generic vlan open-iscsi # Call install scripts to pull in the software users want. run_d_in_target install unblock_daemons