172 Commits

Author SHA1 Message Date
Leo Simons
a56392b5e4 CLOUDSTACK-7143: attempt at a reliable way to set up rvm/bundler on jenkins 2014-09-22 21:38:14 +02:00
Leo Simons
a7d07bf3df CLOUDSTACK-7143: fix a bug where a script file rename wasn't propagated to build.sh 2014-09-22 21:38:14 +02:00
Leo Simons
634560e381 CLOUDSTACK-7143: fix a bug in the debianbase template that was referencing deleted scripts 2014-09-22 21:38:14 +02:00
Leo Simons
dd34d10159 CLOUDSTACK-7143: add tests for the appliance build
Create a new minimal 'debianbase' definition which is a veewee template
that's a lot like the systemvmtemplate, but does not have any
systemvm-ness in it. Use it to create a new test.sh which tests a few
common invocations of build.sh work as desired.

This is mainly useful for debugging whether the appliance build process
is working / consistent; in order to test a systemvm itself it should
really first be merged with systemvm.iso.
2014-09-22 21:38:14 +02:00
Leo Simons
33fd6894a0 CLOUDSTACK-7143: use shar to inject cloud-scripts from working copy
The current build downloads its script from master by fetching a cloudstack
tarball. Besides being an unneeded load on the apache git server, this is a
problem when working on a branch and wanting to inject a different set of
scripts. It also makes it pretty likely that the injected copy of the script
will not match what a production release wants, so there is very little
chance of not needing to overwrite the scripts.

Ideally we would just rsync over some files. However, veewee does not provide
an option to do that. In order to keep a 'cleanly veewee-only' build possible,
and work with any recent veewee version, in this change we restor to using
shar (http://en.wikipedia.org/wiki/Shar) to produce an archive which can
execute as a script, which we feed to veewee to execute.
2014-09-22 21:38:14 +02:00
Leo Simons
35ba68444b CLOUDSTACK-7143: add the ability to inject a custom SSH key
When working on the systemvm in isolation, or using vagrant or similar tools,
it can be useful to inject a custom SSH key before merging a management server
systemvm.iso into it. This option allows that. It should _not_ have effect
on management-server-managed vms which always get their SSH keys injected.
2014-09-22 21:38:13 +02:00
Leo Simons
18364216d8 CLOUDSTACK-7143: improve build.sh failure handling and recovery
In particular, this refactoring allows the use of 'set -e' to exit early on
error. Previously the script would continue for a while when encountering a
problem, stuttering sometimes to (almost) completion, producing partial or
no results.

Added a bash on EXIT trap which runs add_on_exit cleanup code in the reverse
order it was specified. Resource cleanup is now co-located with resource
definition.

Added color-coded logging.

Made most of the hypervisor-specific exports optional. This script now
works on Mac OS X.
2014-09-22 21:38:13 +02:00
Leo Simons
2832bc47e1 CLOUDSTACK-7143: improve build.sh ergonomics
Added a bunch of possible arguments / environment variables, see the new usage
function for details (or run ./build.sh help).

Creates a new template with a unique name on every invocation, resulting in a
new virtualbox instance with a unique name. This makes it possible to build
multiple boxes at the same time, in parallel (including for example on a
multiuser box), and reduces the chance of failed build results conflicting
with each other.

Inject the version given on the command line (if any) into the created image.
2014-09-22 21:38:13 +02:00
Leo Simons
de68741f60 CLOUDSTACK-7143: license headers on all the systemvm scripts 2014-09-22 21:38:13 +02:00
Leo Simons
d3ecb0099c CLOUDSTACK-7143: cleanup configure_conntrack.sh code 2014-09-22 21:38:13 +02:00
Leo Simons
44ceeabb28 CLOUDSTACK-7143: cleanup zerodisk.sh code 2014-09-22 21:38:13 +02:00
Leo Simons
f67a379a46 CLOUDSTACK-7143: tune timeouts to expect about <=~60 min build 2014-09-22 21:38:12 +02:00
Leo Simons
654c871e75 CLOUDSTACK-7143: cleanup configure_systemvm_services.sh code 2014-09-22 21:38:12 +02:00
Leo Simons
7d9e46425f CLOUDSTACK-7143: rename postinstall.sh to represent what remains 2014-09-22 21:37:19 +02:00
Leo Simons
c7e6387752 CLOUDSTACK-7143: collapse apt-get install onto one line
In theory this _could_ have changed behavior (apt coming up with a different
solution, or one of the packages configuring a new apt repository), but in my
testing, the end result is the same.
2014-09-22 21:37:19 +02:00
Leo Simons
22617e9496 CLOUDSTACK-7143: reorg of install_systemvm_packages.sh (no logic changes, yet) 2014-09-22 21:37:18 +02:00
Leo Simons
3d4e4a6e09 CLOUDSTACK-7143: consider vhdutil a software package 2014-09-22 21:37:18 +02:00
Leo Simons
06c1c16dc3 CLOUDSTACK-7143: move install_packages from postinstall.sh to its own file 2014-09-22 21:37:18 +02:00
Leo Simons
71c913c658 CLOUDSTACK-7143: cleanup configure_networking.sh code 2014-09-22 21:34:47 +02:00
Leo Simons
a533de7593 CLOUDSTACK-7143: move networking logic from postinstall.sh to configure_networking.sh 2014-09-22 21:34:47 +02:00
Leo Simons
3574dcf543 CLOUDSTACK-7143: split connection tracking config into its own file 2014-09-22 21:31:36 +02:00
Leo Simons
ed53167547 CLOUDSTACK-7143: cleanup cleanup.sh code 2014-09-22 21:31:36 +02:00
Leo Simons
3c9f2c7227 CLOUDSTACK-7143: cleanup configure_acpid.sh code 2014-09-22 21:31:36 +02:00
Leo Simons
5627b67ff3 CLOUDSTACK-7143: move fix_acpid to its own file 2014-09-22 21:31:35 +02:00
Leo Simons
6a688a0337 CLOUDSTACK-7143: cleanup configure_locale.sh code 2014-09-22 21:31:35 +02:00
Leo Simons
aa14a619a6 CLOUDSTACK-7143: split locale config into its own file 2014-09-22 21:31:35 +02:00
Leo Simons
3f8c31b0da CLOUDSTACK-7143: cleanup configure_login.sh code
Had to change various things to make this code re-entrant. In particular,
the sed-based manipulation of /etc/sudoers is gone and replaced with a
simpler, minimal (but compatible) sudoers file.

Remove the sshd_config tuning since sshd_config is overwritten when we
apply the cloud_scripts overlay (from build.sh).
2014-09-22 21:31:35 +02:00
Leo Simons
e86121db7b CLOUDSTACK-7143: split login config out from postinstall.sh 2014-09-22 21:31:35 +02:00
Leo Simons
e5a2e67551 CLOUDSTACK-7143: cleanup configure_gruh.sh code
Adding a check whether GRUB_TIMEOUT has already been set, and if it has,
skip re-running update-grub.
2014-09-22 21:31:35 +02:00
Leo Simons
29c1f91aea CLOUDSTACK-7143: add vagrant_box_build_time file that's standard with current veewee templates 2014-09-22 21:31:34 +02:00
Leo Simons
58ca92ce52 CLOUDSTACK-7143: cleanup apt_upgrade.sh code 2014-09-22 21:31:34 +02:00
Leo Simons
6641fd3a76 CLOUDSTACK-7143: move add_backports to apt_upgrade.sh 2014-09-22 21:31:34 +02:00
Leo Simons
5f3caf6d01 CLOUDSTACK-7143: reformat definition.rb code. No other changes. 2014-09-22 21:31:34 +02:00
Leo Simons
2210f1b1da CLOUDSTACK-7143: remove 'manual' from preseed config. No other changes. 2014-09-22 21:31:34 +02:00
Leo Simons
3c0cdb595f CLOUDSTACK-7143: merge systemvm templates, step 2: only one template remains 2014-09-22 21:31:33 +02:00
Leo Simons
039a47bd5b CLOUDSTACK-7143: merge systemvm templates, step 1: remove differences 2014-09-22 21:30:39 +02:00
Leo Simons
262cde5fb7 CLOUDSTACK-7143: move network tuning from cleanup.sh to its own script. 2014-09-22 21:30:39 +02:00
Leo Simons
e2f1740de5 CLOUDSTACK-7143: split base.sh into its two functions. 2014-09-22 21:30:39 +02:00
Leo Simons
0f2012e842 CLOUDSTACK-7143: upgrade systemvm to latest debian stable, 7.6.0. 2014-09-22 21:30:39 +02:00
Rohit Yadav
ad8ad404fe systemvmtemplate: set next CLOUDSTACK_VERSION to 4.5.0
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-09-12 17:19:46 +02:00
Rohit Yadav
765659091a appliance: fix newer debian iso links and checksums for debian
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit ac5309b8b47ddb1e5588a2d5090f2bcce0e7c2a4)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-09-09 18:41:53 +02:00
Rohit Yadav
4217d157c5 appliance: box commands for dumb bash in cleaning branch name, in build.sh
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit edb5650c737d582595e134aab286e7304f299983)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-08 21:24:18 +02:00
Rohit Yadav
e71009a571 appliance: fix branch finding method from e16414e even Junio can be wrong
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit bbaefb8e5def610a654fba907c8ec3f868416bdf)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-08 20:30:42 +02:00
Rohit Yadav
ffe0f2f60f appliance: use the right way to get git branch name
Taken from Junio C Hamano's blog [1], git's maintainer, he must not be wrong :)

[1] http://git-blame.blogspot.ch/2013/06/checking-current-branch-programatically.html

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit e16414e56d8f398f8ddbbde89d3ee833582b8bb2)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-08-08 19:22:20 +02:00
Rohit Yadav
a0006a6990 appliance: change the way we find git branch in build.sh
(cherry picked from commit 493c0a68d2332cb9275902128c28f926a909f4ed)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	tools/appliance/build.sh
2014-08-08 15:44:33 +02:00
Joris van Lieshout
b8deb6ba3f volume /usr was sized to small and ends up being 100% full on SSVMs and CVMs. By juggling some partman-auto numbers the space gets devided more evenly. After this patch /usr should be around 80% full. I've also reduced the swap space because this makes no sense on virtual instances.
Signed-off-by: Daan Hoogland <daan@onecht.net>
2014-08-08 12:58:12 +02:00
Harikrishna Patnala
2dfd278625 CLOUDSTACK-7087: Latest OS X VPN client not working Downgrading openswan version to 1:2.6.37-3
Reviewed-by: Abhinandan

Signed-off-by: Sheng Yang
2014-08-05 16:06:00 +05:30
Hugo Trippaers
733a7ba8c1 Put in a note that will hopefully prevent a bunch of systemvm build failures 2014-07-18 10:18:19 +02:00
Daan Hoogland
fec52be20e Revert "raw immage for ovm"
This reverts commit 23b1f228a1a779cbc5ba2f2f1f5e555684af6468.
2014-06-24 10:21:05 +02:00
Daan Hoogland
23b1f228a1 raw immage for ovm 2014-06-23 14:54:07 +02:00