mirror of https://github.com/apache/cloudstack.git
devcloud: Move build scripts to src/, fix README and rm Gemfile.lock
- Move build scripts to src/ - Fix README.md - Remove and ignore Gemfile.lock - Fix tabs in boxer.sh - Move to src/ Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
e46aa61068
commit
eddb3dfc92
|
|
@ -73,3 +73,4 @@ docs/tmp
|
|||
docs/publish
|
||||
docs/runbook/tmp
|
||||
docs/runbook/publish
|
||||
Gemfile.lock
|
||||
|
|
|
|||
|
|
@ -21,52 +21,82 @@ NOTE - This folder is a work in progress. The project has not determined
|
|||
how to best establish a nightly DevCloud build process, or how to distribute
|
||||
the image.
|
||||
|
||||
|
||||
===========================================================
|
||||
# How to use devcloud
|
||||
|
||||
Install RVM with the latest ruby 1.9.3 patch set (not documented)
|
||||
# Setting up Tools and Environment
|
||||
|
||||
- Install [RVM](https://rvm.io/rvm/install)
|
||||
- Setup paths:
|
||||
export PATH=~/.rvm/bin:$PATH
|
||||
- Install Ruby 1.9.3, if it installed some other version:
|
||||
rvm install 1.9.3
|
||||
|
||||
cd deps
|
||||
All the dependencies will be fetched automatically.
|
||||
|
||||
cd deps/
|
||||
#cleans up any old stuff
|
||||
./boxer.sh -c all
|
||||
#builds the dependent vms
|
||||
./boxer.sh -b all
|
||||
Vagrant: https://github.com/chipchilders/vagrant.git
|
||||
Veewee: https://github.com/jedi4ever/veewee.git
|
||||
|
||||
devcloudbase/Ubuntu: http://releases.ubuntu.com/12.04/ubuntu-12.04.1-server-i386.iso
|
||||
|
||||
After that is complete
|
||||
To save some time if you've downloaded iso of your distro, put the isos in:
|
||||
tools/devcloud/deps/boxes/basebox-build/iso/
|
||||
|
||||
#go back to the devcloud homedir
|
||||
cd ../
|
||||
#bring up the devcloud vm
|
||||
vagrant up
|
||||
Note, gem would require gcc-4.2, make sure link exists:
|
||||
|
||||
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
|
||||
|
||||
# How to build DevCloud
|
||||
|
||||
DevCloud build scripts are in src/
|
||||
Move to src/deps/ to start the build process:
|
||||
|
||||
cd src/deps/
|
||||
|
||||
Clean up any old stuff:
|
||||
|
||||
./boxer.sh -c all
|
||||
|
||||
Build the dependent vms:
|
||||
|
||||
./boxer.sh -b all
|
||||
|
||||
Now, start DevCloud:
|
||||
|
||||
# Go back to the devcloud homedir
|
||||
cd ../
|
||||
# Bring up the devcloud vm
|
||||
vagrant up
|
||||
|
||||
If you get a vagrant error, at that point, try:
|
||||
|
||||
source .rvmrc
|
||||
vagrant up
|
||||
source .rvmrc
|
||||
vagrant up
|
||||
|
||||
# CloudStack Build Automation in DevCloud
|
||||
|
||||
If you want to compile cloudstack in the devcloud vm:
|
||||
|
||||
vim puppet/modules/devcloud/manifests/params.pp
|
||||
vim puppet/modules/devcloud/manifests/params.pp
|
||||
|
||||
and set
|
||||
|
||||
$build_cloudstack = true
|
||||
$build_cloudstack = true
|
||||
|
||||
alternately, if you do not want to build cloudstack in the devcloud vm, set:
|
||||
|
||||
$build_cloudstack = false
|
||||
$build_cloudstack = false
|
||||
|
||||
|
||||
It will now bring up the devcloud vm for this first time. Note that it will attempt to download the SSVM and CPVM templates so it will take a long time to launch initially. It will also git clone the cloudstack repository and attempt to build an launch it.
|
||||
It will now bring up the devcloud vm for this first time. Note that it will
|
||||
attempt to download the SSVM and CPVM templates so it will take a long time to
|
||||
launch initially. It will also git clone the cloudstack repository and attempt
|
||||
to build an launch it.
|
||||
|
||||
You can optionally speed things up by packaging a successful devcloud instance build. This will make subsequent launches must faster since it won't have to re-downoad the SSVM and CPVM. Once it has successfully been built, you can run:
|
||||
You can optionally speed things up by packaging a successful devcloud instance
|
||||
build. This will make subsequent launches must faster since it won't have to
|
||||
re-downoad the SSVM and CPVM. Once it has successfully been built, you can run:
|
||||
|
||||
#exports the devcloud vagrant instance and adds it as "devcloud" to vagrant boxlist
|
||||
./boxit.sh
|
||||
#modifies the Vagrant file to use this newly added instance
|
||||
sed -i 's,devcloudbase-xen,devcloud,g' Vagrantfile
|
||||
./boxit.sh
|
||||
#modifies the Vagrant file to use this newly added instance
|
||||
sed -i 's,devcloudbase-xen,devcloud,g' Vagrantfile
|
||||
|
|
|
|||
|
|
@ -1,176 +0,0 @@
|
|||
#! /bin/bash
|
||||
|
||||
|
||||
# Load RVM into a shell session *as a function*
|
||||
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
|
||||
# First try to load from a user install
|
||||
source "$HOME/.rvm/scripts/rvm"
|
||||
|
||||
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
|
||||
|
||||
# Then try to load from a root install
|
||||
source "/usr/local/rvm/scripts/rvm"
|
||||
|
||||
else
|
||||
|
||||
printf "ERROR: An RVM installation was not found.\n"
|
||||
|
||||
fi
|
||||
|
||||
BASEDIR=$PWD/boxes
|
||||
DEVCLOUD_BASEBUILD_DIR=$BASEDIR/basebox-build
|
||||
echo $DEVCLOUD_BASEBUILD_DIR
|
||||
DEVCLOUD_XEN_BASEBUILD_DIR=$BASEDIR/xenbox-build
|
||||
DEVCLOUD_BASE_NAME='devcloudbase'
|
||||
DEVCLOUD_XEN_BASE_NAME='devcloudbase-xen'
|
||||
OS='ubuntu-12.04.1-server-i386'
|
||||
|
||||
|
||||
basebox() {
|
||||
set +x
|
||||
rvm rvmrc trust $DEVCLOUD_BASEBUILD_DIR/
|
||||
case "$1" in
|
||||
build)
|
||||
cd $DEVCLOUD_BASEBUILD_DIR/
|
||||
set -ex
|
||||
vagrant basebox define $DEVCLOUD_BASE_NAME $OS
|
||||
cp definition.rb postinstall.sh preseed.cfg definitions/$DEVCLOUD_BASE_NAME/
|
||||
vagrant basebox build $DEVCLOUD_BASE_NAME -f -a -n -r
|
||||
vagrant basebox export $DEVCLOUD_BASE_NAME -f
|
||||
set +ex
|
||||
cd $DEVCLOUD_XEN_BASEBUILD_DIR
|
||||
set -ex
|
||||
vagrant box add $DEVCLOUD_BASE_NAME $DEVCLOUD_BASEBUILD_DIR/${DEVCLOUD_BASE_NAME}.box -f
|
||||
;;
|
||||
clean)
|
||||
cd $DEVCLOUD_BASEBUILD_DIR/
|
||||
set -x
|
||||
rm -f iso/*.iso
|
||||
vagrant -f basebox destroy $DEVCLOUD_BASE_NAME #-f
|
||||
vagrant basebox undefine $DEVCLOUD_BASE_NAME
|
||||
#hackery to inherit the proper rvmrc for the hacked vagrant
|
||||
set +x
|
||||
cd $BAS$DEVCLOUD_XEN_BASEBUILD_DIR
|
||||
set -x
|
||||
vagrant -f box remove $DEVCLOUD_BASE_NAME virtualbox
|
||||
set +x
|
||||
cd $DEVCLOUD_BASEBUILD_DIR
|
||||
set -x
|
||||
rm -f ${DEVCLOUD_BASE_NAME}.box
|
||||
set +x
|
||||
cd $BASEDIR
|
||||
#rvm --force gemset delete vagrant-release-cloudstack
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
xenbox() {
|
||||
|
||||
set +x
|
||||
rvm rvmrc trust $DEVCLOUD_XEN_BASEBUILD_DIR/
|
||||
case "$1" in
|
||||
build)
|
||||
cd $DEVCLOUD_XEN_BASEBUILD_DIR
|
||||
|
||||
#adding it here because it needs to be added into the $VAGRANT_HOME of
|
||||
#the hacked vagrant
|
||||
set -ex
|
||||
vagrant up
|
||||
vagrant halt
|
||||
vagrant package default --output ${DEVCLOUD_XEN_BASE_NAME}.box
|
||||
vagrant box add $DEVCLOUD_XEN_BASE_NAME ${DEVCLOUD_XEN_BASE_NAME}.box -f
|
||||
;;
|
||||
clean)
|
||||
cd $DEVCLOUD_XEN_BASEBUILD_DIR
|
||||
set -x
|
||||
vagrant -f box remove $DEVCLOUD_XEN_BASE_NAME virtualbox
|
||||
vagrant destroy -f
|
||||
rm -f ${DEVCLOUD_XEN_BASE_NAME}.box
|
||||
set +x
|
||||
#rvm --force gemset delete vagrant-xen-cloudstack
|
||||
set -x
|
||||
;;
|
||||
esac
|
||||
}
|
||||
usage() {
|
||||
|
||||
cat <<EOF
|
||||
$(basename $0) [-h] [-b] [c] (basebox|xenbox) | all
|
||||
Builds / cleans boxes used to build the devcloud box
|
||||
|
||||
where:
|
||||
-h show this help text
|
||||
-b builds the box(es)
|
||||
-c cleans the box(es)
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
while getopts 'hbc' option; do
|
||||
case "$option" in
|
||||
h) usage
|
||||
exit
|
||||
;;
|
||||
b) action="build"
|
||||
;;
|
||||
c) action="clean"
|
||||
;;
|
||||
?) printf "illegal option: '%s'\n" "$OPTARG" >&2
|
||||
echo "$usage" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
posargs=$@
|
||||
|
||||
#removes duplicate positionals
|
||||
|
||||
posargs=$(echo "$posargs" | tr ' ' '\n' | nl | sort -u -k2 | sort -n | cut -f2-)
|
||||
|
||||
|
||||
|
||||
for arg in $posargs; do
|
||||
|
||||
case "$arg" in
|
||||
basebox)
|
||||
true
|
||||
;;
|
||||
xenbox)
|
||||
true
|
||||
;;
|
||||
all)
|
||||
true
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
|
||||
cd $BASEDIR
|
||||
|
||||
|
||||
for arg in $posargs; do
|
||||
case "$1" in
|
||||
"all")
|
||||
case "$action" in
|
||||
clean)
|
||||
xenbox $action
|
||||
basebox $action
|
||||
;;
|
||||
build)
|
||||
basebox $action
|
||||
xenbox $action
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
$arg)
|
||||
$arg $action
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
|
@ -1,148 +0,0 @@
|
|||
GIT
|
||||
remote: https://github.com/jedi4ever/veewee.git
|
||||
revision: b766b90aa1903b4bf7f28f0ea4922dce4471cd03
|
||||
specs:
|
||||
veewee (0.3.1)
|
||||
ansi (~> 1.3.0)
|
||||
childprocess
|
||||
cucumber (>= 1.0.0)
|
||||
fission (= 0.4.0)
|
||||
fog (~> 1.4)
|
||||
grit
|
||||
highline
|
||||
i18n
|
||||
net-ssh (~> 2.2.0)
|
||||
popen4 (~> 0.1.2)
|
||||
progressbar
|
||||
rspec (~> 2.5)
|
||||
ruby-vnc (~> 1.0.0)
|
||||
thor (~> 0.15)
|
||||
vagrant (>= 0.9)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
CFPropertyList (2.0.17)
|
||||
libxml-ruby (>= 1.1.0)
|
||||
rake (>= 0.7.0)
|
||||
Platform (0.4.0)
|
||||
akami (1.2.0)
|
||||
gyoku (>= 0.4.0)
|
||||
nokogiri (>= 1.4.0)
|
||||
ansi (1.3.0)
|
||||
archive-tar-minitar (0.5.2)
|
||||
builder (3.1.4)
|
||||
childprocess (0.3.6)
|
||||
ffi (~> 1.0, >= 1.0.6)
|
||||
cucumber (1.2.1)
|
||||
builder (>= 2.1.2)
|
||||
diff-lcs (>= 1.1.3)
|
||||
gherkin (~> 2.11.0)
|
||||
json (>= 1.4.6)
|
||||
diff-lcs (1.1.3)
|
||||
em-winrm (0.5.4)
|
||||
eventmachine (= 1.0.0.beta.3)
|
||||
mixlib-log (>= 1.3.0)
|
||||
uuidtools (~> 2.1.1)
|
||||
winrm (~> 1.1.0)
|
||||
erubis (2.7.0)
|
||||
eventmachine (1.0.0.beta.3)
|
||||
excon (0.16.10)
|
||||
ffi (1.2.0)
|
||||
fission (0.4.0)
|
||||
CFPropertyList (~> 2.0.17)
|
||||
fog (1.7.0)
|
||||
builder
|
||||
excon (~> 0.14)
|
||||
formatador (~> 0.2.0)
|
||||
mime-types
|
||||
multi_json (~> 1.0)
|
||||
net-scp (~> 1.0.4)
|
||||
net-ssh (>= 2.1.3)
|
||||
nokogiri (~> 1.5.0)
|
||||
ruby-hmac
|
||||
formatador (0.2.4)
|
||||
gherkin (2.11.5)
|
||||
json (>= 1.4.6)
|
||||
grit (2.5.0)
|
||||
diff-lcs (~> 1.1)
|
||||
mime-types (~> 1.15)
|
||||
posix-spawn (~> 0.3.6)
|
||||
gssapi (1.0.3)
|
||||
ffi (>= 1.0.1)
|
||||
gyoku (0.4.6)
|
||||
builder (>= 2.1.2)
|
||||
highline (1.6.15)
|
||||
httpclient (2.2.0.2)
|
||||
httpi (0.9.7)
|
||||
rack
|
||||
i18n (0.6.1)
|
||||
json (1.5.4)
|
||||
libxml-ruby (2.3.3)
|
||||
little-plugger (1.1.3)
|
||||
log4r (1.1.10)
|
||||
logging (1.6.2)
|
||||
little-plugger (>= 1.1.3)
|
||||
mime-types (1.19)
|
||||
mixlib-log (1.4.1)
|
||||
multi_json (1.3.7)
|
||||
net-scp (1.0.4)
|
||||
net-ssh (>= 1.99.1)
|
||||
net-ssh (2.2.2)
|
||||
nokogiri (1.5.5)
|
||||
nori (1.1.3)
|
||||
open4 (1.3.0)
|
||||
popen4 (0.1.2)
|
||||
Platform (>= 0.4.0)
|
||||
open4 (>= 0.4.0)
|
||||
posix-spawn (0.3.6)
|
||||
progressbar (0.11.0)
|
||||
rack (1.4.1)
|
||||
rake (10.0.2)
|
||||
rspec (2.12.0)
|
||||
rspec-core (~> 2.12.0)
|
||||
rspec-expectations (~> 2.12.0)
|
||||
rspec-mocks (~> 2.12.0)
|
||||
rspec-core (2.12.0)
|
||||
rspec-expectations (2.12.0)
|
||||
diff-lcs (~> 1.1.3)
|
||||
rspec-mocks (2.12.0)
|
||||
ruby-hmac (0.4.0)
|
||||
ruby-vnc (1.0.1)
|
||||
rubyntlm (0.1.1)
|
||||
savon (0.9.5)
|
||||
akami (~> 1.0)
|
||||
builder (>= 2.1.2)
|
||||
gyoku (>= 0.4.0)
|
||||
httpi (~> 0.9)
|
||||
nokogiri (>= 1.4.0)
|
||||
nori (~> 1.0)
|
||||
wasabi (~> 1.0)
|
||||
thor (0.16.0)
|
||||
uuidtools (2.1.3)
|
||||
vagrant (1.0.5)
|
||||
archive-tar-minitar (= 0.5.2)
|
||||
childprocess (~> 0.3.1)
|
||||
erubis (~> 2.7.0)
|
||||
i18n (~> 0.6.0)
|
||||
json (~> 1.5.1)
|
||||
log4r (~> 1.1.9)
|
||||
net-scp (~> 1.0.4)
|
||||
net-ssh (~> 2.2.2)
|
||||
wasabi (1.0.0)
|
||||
nokogiri (>= 1.4.0)
|
||||
winrm (1.1.2)
|
||||
gssapi (~> 1.0.0)
|
||||
httpclient (~> 2.2.0.2)
|
||||
logging (~> 1.6.1)
|
||||
nokogiri (~> 1.5.0)
|
||||
rubyntlm (~> 0.1.1)
|
||||
savon (= 0.9.5)
|
||||
uuidtools (~> 2.1.2)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
em-winrm
|
||||
veewee!
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
GIT
|
||||
remote: https://github.com/chipchilders/vagrant
|
||||
revision: 781b2d974108a5421765883034fc27dd9857e9c0
|
||||
specs:
|
||||
vagrant (1.1.0.dev)
|
||||
archive-tar-minitar (= 0.5.2)
|
||||
childprocess (~> 0.3.1)
|
||||
erubis (~> 2.7.0)
|
||||
i18n (~> 0.6.0)
|
||||
json (~> 1.6.6)
|
||||
log4r (~> 1.1.9)
|
||||
net-scp (~> 1.0.4)
|
||||
net-ssh (~> 2.2.2)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
archive-tar-minitar (0.5.2)
|
||||
childprocess (0.3.6)
|
||||
ffi (~> 1.0, >= 1.0.6)
|
||||
erubis (2.7.0)
|
||||
ffi (1.2.0)
|
||||
i18n (0.6.1)
|
||||
json (1.6.7)
|
||||
log4r (1.1.10)
|
||||
net-scp (1.0.4)
|
||||
net-ssh (>= 1.99.1)
|
||||
net-ssh (2.2.2)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
vagrant!
|
||||
|
|
@ -0,0 +1,168 @@
|
|||
#! /bin/bash
|
||||
|
||||
# Load RVM into a shell session *as a function*
|
||||
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
|
||||
# First try to load from a user install
|
||||
source "$HOME/.rvm/scripts/rvm"
|
||||
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
|
||||
# Then try to load from a root install
|
||||
source "/usr/local/rvm/scripts/rvm"
|
||||
else
|
||||
printf "ERROR: An RVM installation was not found.\n"
|
||||
fi
|
||||
|
||||
BASEDIR=$PWD/boxes
|
||||
DEVCLOUD_BASEBUILD_DIR=$BASEDIR/basebox-build
|
||||
echo $DEVCLOUD_BASEBUILD_DIR
|
||||
DEVCLOUD_XEN_BASEBUILD_DIR=$BASEDIR/xenbox-build
|
||||
DEVCLOUD_BASE_NAME='devcloudbase'
|
||||
DEVCLOUD_XEN_BASE_NAME='devcloudbase-xen'
|
||||
OS='ubuntu-12.04.1-server-i386'
|
||||
|
||||
|
||||
basebox() {
|
||||
set +x
|
||||
rvm rvmrc trust $DEVCLOUD_BASEBUILD_DIR/
|
||||
case "$1" in
|
||||
build)
|
||||
cd $DEVCLOUD_BASEBUILD_DIR/
|
||||
set -ex
|
||||
vagrant basebox define $DEVCLOUD_BASE_NAME $OS
|
||||
cp definition.rb postinstall.sh preseed.cfg definitions/$DEVCLOUD_BASE_NAME/
|
||||
vagrant basebox build $DEVCLOUD_BASE_NAME -f -a -n -r
|
||||
vagrant basebox export $DEVCLOUD_BASE_NAME -f
|
||||
set +ex
|
||||
cd $DEVCLOUD_XEN_BASEBUILD_DIR
|
||||
set -ex
|
||||
vagrant box add $DEVCLOUD_BASE_NAME $DEVCLOUD_BASEBUILD_DIR/${DEVCLOUD_BASE_NAME}.box -f
|
||||
;;
|
||||
clean)
|
||||
cd $DEVCLOUD_BASEBUILD_DIR/
|
||||
set -x
|
||||
rm -f iso/*.iso
|
||||
vagrant -f basebox destroy $DEVCLOUD_BASE_NAME #-f
|
||||
vagrant basebox undefine $DEVCLOUD_BASE_NAME
|
||||
#hackery to inherit the proper rvmrc for the hacked vagrant
|
||||
set +x
|
||||
cd $BAS$DEVCLOUD_XEN_BASEBUILD_DIR
|
||||
set -x
|
||||
vagrant -f box remove $DEVCLOUD_BASE_NAME virtualbox
|
||||
set +x
|
||||
cd $DEVCLOUD_BASEBUILD_DIR
|
||||
set -x
|
||||
rm -f ${DEVCLOUD_BASE_NAME}.box
|
||||
set +x
|
||||
cd $BASEDIR
|
||||
#rvm --force gemset delete vagrant-release-cloudstack
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
xenbox() {
|
||||
|
||||
set +x
|
||||
rvm rvmrc trust $DEVCLOUD_XEN_BASEBUILD_DIR/
|
||||
case "$1" in
|
||||
build)
|
||||
cd $DEVCLOUD_XEN_BASEBUILD_DIR
|
||||
|
||||
#adding it here because it needs to be added into the $VAGRANT_HOME of
|
||||
#the hacked vagrant
|
||||
set -ex
|
||||
vagrant up
|
||||
vagrant halt
|
||||
vagrant package default --output ${DEVCLOUD_XEN_BASE_NAME}.box
|
||||
vagrant box add $DEVCLOUD_XEN_BASE_NAME ${DEVCLOUD_XEN_BASE_NAME}.box -f
|
||||
;;
|
||||
clean)
|
||||
cd $DEVCLOUD_XEN_BASEBUILD_DIR
|
||||
set -x
|
||||
vagrant -f box remove $DEVCLOUD_XEN_BASE_NAME virtualbox
|
||||
vagrant destroy -f
|
||||
rm -f ${DEVCLOUD_XEN_BASE_NAME}.box
|
||||
set +x
|
||||
#rvm --force gemset delete vagrant-xen-cloudstack
|
||||
set -x
|
||||
;;
|
||||
esac
|
||||
}
|
||||
usage() {
|
||||
|
||||
cat <<EOF
|
||||
$(basename $0) [-h] [-b] [c] (basebox|xenbox) | all
|
||||
Builds / cleans boxes used to build the devcloud box
|
||||
|
||||
where:
|
||||
-h show this help text
|
||||
-b builds the box(es)
|
||||
-c cleans the box(es)
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
while getopts 'hbc' option; do
|
||||
case "$option" in
|
||||
h) usage
|
||||
exit
|
||||
;;
|
||||
b) action="build"
|
||||
;;
|
||||
c) action="clean"
|
||||
;;
|
||||
?) printf "illegal option: '%s'\n" "$OPTARG" >&2
|
||||
echo "$usage" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
posargs=$@
|
||||
|
||||
#removes duplicate positionals
|
||||
|
||||
posargs=$(echo "$posargs" | tr ' ' '\n' | nl | sort -u -k2 | sort -n | cut -f2-)
|
||||
|
||||
|
||||
|
||||
for arg in $posargs; do
|
||||
|
||||
case "$arg" in
|
||||
basebox)
|
||||
true
|
||||
;;
|
||||
xenbox)
|
||||
true
|
||||
;;
|
||||
all)
|
||||
true
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
cd $BASEDIR
|
||||
|
||||
for arg in $posargs; do
|
||||
case "$1" in
|
||||
"all")
|
||||
case "$action" in
|
||||
clean)
|
||||
xenbox $action
|
||||
basebox $action
|
||||
;;
|
||||
build)
|
||||
basebox $action
|
||||
xenbox $action
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
$arg)
|
||||
$arg $action
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
|
@ -10,9 +10,6 @@
|
|||
#
|
||||
class devcloud::params {
|
||||
|
||||
|
||||
|
||||
|
||||
$cs_dir = '/opt/cloudstack'
|
||||
$storage_dir = '/opt/storage'
|
||||
$tomcat_version = '6.0.32'
|
||||
Loading…
Reference in New Issue