Create install-packages as a binary.
Only supports Debian family distribution so far. Change-Id: I9fa0b833c34a614fe498c6c6ae599733a69c1309
This commit is contained in:
parent
8997ec6d0b
commit
11b4a5501d
38
elements/base/bin/install-packages
Normal file
38
elements/base/bin/install-packages
Normal file
@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copyright 2012 Hewlett-Packard Development Company, L.P.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
set -e
|
||||
|
||||
# install-packages package [package ...]
|
||||
install_deb_packages() {
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
http_proxy=$http_proxy https_proxy=$https_proxy \
|
||||
no_proxy=$no_proxy \
|
||||
apt-get --option "Dpkg::Options::=--force-confold" --assume-yes install "$@"
|
||||
}
|
||||
|
||||
DISTRO=`lsb_release -si`
|
||||
|
||||
case $DISTRO in
|
||||
'Ubuntu'|'Debian')
|
||||
install_deb_packages $@
|
||||
;;
|
||||
*)
|
||||
echo "Distribution not supported"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
@ -3,4 +3,4 @@
|
||||
|
||||
set -e
|
||||
|
||||
apt-get -y install linux-image-generic vlan open-iscsi
|
||||
install-packages linux-image-generic vlan open-iscsi
|
||||
|
3
elements/base/pre-install.d/01-install-bin
Executable file
3
elements/base/pre-install.d/01-install-bin
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
install -m 0755 -o root -g root $(dirname $0)/../bin/* /usr/local/bin
|
@ -4,5 +4,5 @@
|
||||
set -e
|
||||
|
||||
apt-get -y update
|
||||
apt-get -y install python-software-properties
|
||||
install-packages python-software-properties
|
||||
add-apt-repository -y ppa:tripleo/demo
|
@ -6,7 +6,7 @@
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
apt-get -y install git
|
||||
install-packages git
|
||||
if [ -n "$http_proxy" ]; then
|
||||
sudo -Hiu stack git config --global http.proxy $http_proxy
|
||||
fi
|
||||
|
@ -4,7 +4,7 @@
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
apt-get -y install git
|
||||
install-packages git
|
||||
if [ -n "$http_proxy" ]; then
|
||||
sudo -Hiu stack git config --global http.proxy $http_proxy
|
||||
fi
|
||||
|
@ -4,4 +4,4 @@
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
apt-get -y install haveged
|
||||
install-packages haveged
|
||||
|
@ -5,7 +5,7 @@
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install \
|
||||
install-packages \
|
||||
python-pip git-core python-setuptools python-dev python-lxml python-netaddr \
|
||||
python-pastescript python-pastedeploy python-paste python-sqlalchemy \
|
||||
python-greenlet python-routes python-simplejson python-webob rabbitmq-server
|
||||
@ -30,4 +30,3 @@ cp $GLANCE_ROOT/etc/glance-api.conf /etc/glance
|
||||
cp $GLANCE_ROOT/etc/policy.json /etc/glance
|
||||
cp $GLANCE_ROOT/etc/glance-api-paste.ini /etc/glance
|
||||
cp $GLANCE_ROOT/etc/logging.cnf.sample /etc/glance/logging.conf
|
||||
|
||||
|
@ -9,7 +9,7 @@ HEAT_API_SOURCE=https://github.com/heat-api/heat-jeos.git
|
||||
OS_ROOT=/opt/stack
|
||||
JEOS_ROOT=$OS_ROOT/heat-jeos
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install git-core python-psutil
|
||||
install-packages git-core python-psutil
|
||||
|
||||
mkdir -p $OS_ROOT
|
||||
git clone $HEAT_API_SOURCE $JEOS_ROOT
|
||||
|
@ -23,4 +23,4 @@ Pin: release o=LP-PPA-tripleo-demo
|
||||
Pin-Priority: 900
|
||||
EOF
|
||||
# Should pull from demo PPA if cloud-init exists there.
|
||||
apt-get -y install cloud-init
|
||||
install-packages cloud-init
|
||||
|
@ -4,4 +4,4 @@
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
apt-get -y install hwinfo
|
||||
install-packages hwinfo
|
||||
|
@ -5,4 +5,4 @@
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install icinga-core
|
||||
install-packages icinga-core
|
||||
|
@ -5,5 +5,5 @@
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install icinga-web icinga-cgi
|
||||
install-packages icinga-web icinga-cgi
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
apt-get -y install jenkins
|
||||
install-packages jenkins
|
||||
|
||||
# jenkins installs into /var/lib/jenkins which is rather restrictive.
|
||||
# jenkins installs into /var/lib/jenkins which is rather restrictive.
|
||||
mv /var/lib/jenkins /mnt/
|
||||
ln -s /mnt/jenkins /var/lib/jenkins
|
||||
|
@ -5,7 +5,7 @@
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install \
|
||||
install-packages \
|
||||
python-pip git-core python-setuptools python-dev python-lxml python-netaddr \
|
||||
python-pastescript python-pastedeploy python-paste python-sqlalchemy \
|
||||
python-greenlet python-routes python-simplejson python-webob
|
||||
|
@ -5,5 +5,5 @@
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
#DEBIAN_FRONTEND=noninteractive apt-get -y install sysstat mytop percona-toolkit percona-server-server-5.5 percona-server-client-5.5
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install sysstat mytop percona-toolkit mysql-server-5.5 mysql-client-5.5
|
||||
#install-packages sysstat mytop percona-toolkit percona-server-server-5.5 percona-server-client-5.5
|
||||
install-packages sysstat mytop percona-toolkit mysql-server-5.5 mysql-client-5.5
|
||||
|
@ -4,4 +4,4 @@
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
apt-get -y install haveged
|
||||
install-packages haveged
|
||||
|
@ -3,7 +3,7 @@ set -eux
|
||||
|
||||
useradd -G admin -m nova -s /bin/false
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install \
|
||||
install-packages \
|
||||
python-pip git-core python-setuptools python-dev python-lxml python-netaddr \
|
||||
python-pastescript python-pastedeploy python-paste python-sqlalchemy \
|
||||
python-greenlet python-routes python-simplejson python-webob rabbitmq-server
|
||||
|
@ -5,4 +5,4 @@
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install haproxy rabbitmq-server mysql-server ntp dkms
|
||||
install-packages haproxy rabbitmq-server mysql-server ntp dkms
|
||||
|
@ -5,5 +5,5 @@
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
apt-get -y install keystone glance nova-api nova-cert nova-common nova-scheduler python-nova python-novaclient nova-consoleauth novnc nova-novncproxy cinder-api cinder-scheduler cinder-volume iscsitarget open-iscsi iscsitarget-dkms python-cinderclient nova-network
|
||||
install-packages keystone glance nova-api nova-cert nova-common nova-scheduler python-nova python-novaclient nova-consoleauth novnc nova-novncproxy cinder-api cinder-scheduler cinder-volume iscsitarget open-iscsi iscsitarget-dkms python-cinderclient nova-network
|
||||
|
||||
|
@ -4,7 +4,7 @@ set -o xtrace
|
||||
|
||||
useradd -G admin -m quantum -s /bin/false
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y install \
|
||||
install-packages \
|
||||
python-pip git-core python-setuptools python-dev python-lxml python-netaddr \
|
||||
python-pastescript python-pastedeploy python-paste python-sqlalchemy \
|
||||
python-greenlet python-routes python-simplejson python-webob rabbitmq-server
|
||||
|
@ -3,5 +3,5 @@
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
apt-get -y install salt-master
|
||||
install-packages salt-master
|
||||
|
||||
|
@ -3,5 +3,5 @@
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
apt-get -y install salt-minion
|
||||
install-packages salt-minion
|
||||
|
||||
|
@ -5,5 +5,5 @@
|
||||
set -e
|
||||
set -o xtrace
|
||||
|
||||
apt-get -y install swift rsync memcached python-netifaces python-xattr python-memcache
|
||||
install-packages swift rsync memcached python-netifaces python-xattr python-memcache
|
||||
|
||||
|
@ -235,6 +235,11 @@ function do_install () {
|
||||
function do_extra_package_install () {
|
||||
# Install any packages that were requested with the -p command line option
|
||||
if [ "$INSTALL_PACKAGES" != "" ]; then
|
||||
run_in_target apt-get -y install ${INSTALL_PACKAGES[@]}
|
||||
run_in_target install-packages ${INSTALL_PACKAGES[@]}
|
||||
fi
|
||||
}
|
||||
|
||||
function copy_elements_lib () {
|
||||
sudo mkdir -p $TMP_MOUNT_PATH/lib/diskimage-builder
|
||||
sudo cp -t $TMP_MOUNT_PATH/lib/diskimage-builder $_LIB/elements-functions
|
||||
}
|
Loading…
Reference in New Issue
Block a user