Merge "bug 988550: devstack installer for xenserver to support user-defined ubuntu mirror"
This commit is contained in:
commit
368bfa2252
@ -174,13 +174,16 @@ fi
|
||||
templateuuid=$(xe template-list name-label="$TNAME")
|
||||
if [ -n "$templateuuid" ]
|
||||
then
|
||||
vm_uuid=$(xe vm-install template="$TNAME" new-name-label="$GUEST_NAME")
|
||||
vm_uuid=$(xe vm-install template="$TNAME" new-name-label="$GUEST_NAME")
|
||||
else
|
||||
template=$(xe_min template-list name-label="Ubuntu 11.10 (64-bit)")
|
||||
if [ -z "$template" ]
|
||||
then
|
||||
cp $TOP_DIR/devstackubuntupreseed.cfg /opt/xensource/www/
|
||||
$TOP_DIR/scripts/xenoneirictemplate.sh "${HOST_IP}/devstackubuntupreseed.cfg"
|
||||
MIRROR=${MIRROR:-archive.ubuntu.com}
|
||||
sed -e "s,d-i mirror/http/hostname string .*,d-i mirror/http/hostname string $MIRROR," \
|
||||
-i /opt/xensource/www/devstackubuntupreseed.cfg
|
||||
fi
|
||||
$TOP_DIR/scripts/install-os-vpx.sh -t "Ubuntu 11.10 (64-bit)" -v $VM_BR -m $MGT_BR -p $PUB_BR -l $GUEST_NAME -r $OSDOMU_MEM_MB -k "flat_network_bridge=${VM_BR}"
|
||||
|
||||
|
@ -1,41 +0,0 @@
|
||||
#i!/bin/sh
|
||||
set -o xtrace
|
||||
set -o errexit
|
||||
|
||||
# Install basics for vi and git
|
||||
yum -y --enablerepo=base install gcc make vim-enhanced zlib-devel openssl-devel curl-devel.i386
|
||||
|
||||
# Simple but usable vimrc
|
||||
if [ ! -e /root/.vimrc ]; then
|
||||
cat > /root/.vimrc <<EOF
|
||||
syntax on
|
||||
se ts=4
|
||||
se expandtab
|
||||
se shiftwidth=4
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Use the pretty vim
|
||||
if [ -e /usr/bin/vim ]; then
|
||||
rm /bin/vi
|
||||
ln -s /usr/bin/vim /bin/vi
|
||||
fi
|
||||
|
||||
# Install git
|
||||
if ! which git; then
|
||||
DEST=/tmp/
|
||||
GITDIR=$DEST/git-1.7.7
|
||||
cd $DEST
|
||||
rm -rf $GITDIR*
|
||||
wget http://git-core.googlecode.com/files/git-1.7.7.tar.gz
|
||||
tar xfv git-1.7.7.tar.gz
|
||||
cd $GITDIR
|
||||
./configure --with-curl --with-expat
|
||||
make install
|
||||
fi
|
||||
|
||||
# Clone devstack
|
||||
DEVSTACK=${DEVSTACKROOT:-"/root/devstack"}
|
||||
if [ ! -d $DEVSTACK ]; then
|
||||
git clone git://github.com/openstack-dev/devstack.git $DEVSTACK
|
||||
fi
|
@ -7,18 +7,6 @@ GUEST_PASSWORD=${GUEST_PASSWORD:-secrete}
|
||||
STAGING_DIR=${STAGING_DIR:-stage}
|
||||
DO_TGZ=${DO_TGZ:-1}
|
||||
|
||||
# Sources.list
|
||||
cat <<EOF >$STAGING_DIR/etc/apt/sources.list
|
||||
deb http://us.archive.ubuntu.com/ubuntu/ oneiric main restricted
|
||||
deb-src http://us.archive.ubuntu.com/ubuntu/ oneiric main restricted
|
||||
deb http://us.archive.ubuntu.com/ubuntu/ oneiric-updates main restricted
|
||||
deb-src http://us.archive.ubuntu.com/ubuntu/ oneiric-updates main restricted
|
||||
deb http://us.archive.ubuntu.com/ubuntu/ oneiric universe
|
||||
deb http://us.archive.ubuntu.com/ubuntu/ oneiric-updates universe
|
||||
deb http://us.archive.ubuntu.com/ubuntu/ oneiric multiverse
|
||||
deb http://us.archive.ubuntu.com/ubuntu/ oneiric-updates multiverse
|
||||
EOF
|
||||
|
||||
# Install basics
|
||||
chroot $STAGING_DIR apt-get update
|
||||
chroot $STAGING_DIR apt-get install -y cracklib-runtime curl wget ssh openssh-server tcpdump ethtool
|
||||
|
Loading…
Reference in New Issue
Block a user