@@ -17,104 +17,27 @@ under the License.
1717
1818===========================================================
1919
20- # Setting up Tools and Environment
21-
22- - Install latest VirtualBox (5.0+)
23- - Install tools for exporting appliances: qemu-img, vboxmanage, vhd-util, ovftool
24- - Install [RVM](https://rvm.io/rvm/install)
25- - Install dependencies (tested on Ubuntu 16.04):
26- apt-get install sharutils libxslt1-dev libxml2-dev zlib1g-dev build-essential ruby ruby-bundler ruby-dev qemu-utils blktap-utils faketime
27- - Setup paths:
28- export PATH=~/.rvm/bin:$PATH
29- - Install Ruby 2.3.0, if it installed some other version:
30- rvm install 2.3.0
31- - Set rvm to use that 2.3.0
32- rvm use ruby-2.3.0
33- - Install bundler: (if you get any openssl issue see https://rvm.io/packages/openssl)
34- gem install bundler
35-
36- All the dependencies will be fetched automatically.
37-
38- To save some time if you've downloaded iso of your distro, put the isos in:
39- tools/appliance/iso/
20+ # Introduction
4021
41- # Setting up jenkins (CI) builds
22+ This is used to build appliances for use with CloudStack. Currently two
23+ build profiles are available for building systemvmtemplate (Debian based) and
24+ CentOS based built-in user VM template.
4225
43- All the tools listed above are expected to be available. If you follow
44-
45- http://rvm.io/integration/jenkins
46-
47- then you'll need to do a bit of logic to load RVM in jenkins. In the
48- build script you put into jenkins, start it with
49- ```
50- #!/bin/bash -l
51- ```
26+ # Setting up Tools and Environment
5227
53- to ensure a login shell, then add something like
54- ```
55- # inspired by https://github.com/CloudBees-community/rubyci-clickstart/blob/master/bin/run-ci
56- # also see https://rvm.io/integration/jenkins
57- # .rvmrc won't get trusted/auto-loaded by jenkins by default
58- export VAGRANT_HOME=$HOME/.vagrant.d-release-cloudstack
59- rvm use ruby-1.9.3@vagrant-release-cloudstack --create
60- # do not use --deployment since that requires Gemfile.lock...and we prefer an up-to-date veewee
61- bundle_args="--path vendor/bundle"
62- ```
28+ - Install packer and latest KVM, qemu on a Linux machine
29+ - Install tools for exporting appliances: qemu-img, ovftool, faketime
30+ - Build and install ` vhd-util ` as described in build.sh or use pre-built
31+ binaries at:
6332
33+ http://packages.shapeblue.com/systemvmtemplate/vhd-util
34+ http://packages.shapeblue.com/systemvmtemplate/libvhd.so.1.0
6435
65- # How to build SystemVMs automatically
36+ # How to build appliances
6637
6738Just run build.sh, it will export archived appliances for KVM, XenServer,
6839VMWare and HyperV in ` dist ` directory:
6940
70- bundle install
71- bash build.sh systemvm64template
72-
73- # Building SystemVM template appliance manually
74-
75- List available appliances one can build:
76-
77- veewee vbox list
78-
79- Modify scripts in definitions/* appliance* / as per needs.
80- Build systemvm template appliance:
81-
82- veewee vbox build 'systemvmtemplate'
83-
84- Start the box:
85-
86- veewee vbox up 'systemvmtemplate'
87-
88- Halt the box:
89-
90- veewee vbox halt 'systemvmtemplate'
91-
92- Now VirtualBox can be used to export appliance.
93-
94- To build the systemvm64template by hand using veewee, set VM_ARCH=amd64 and use
95- the systemvmtemplate:
96-
97- export VM_ARCH=amd64
98- cp -r definitions/systemvmtemplate definitions/systemvm64template
99- veewee vbox build 'systemvm64template'
100-
101- Troubleshooting
102- ===============
103- If you see following line in the screen, then veewee is failing
104- extracting vboxmanage version.
105-
106- Downloading vbox guest additions iso v - http://download.virtualbox.org/vi
107-
108- You would be able to check it manually by typing:
109-
110- vboxmanage --version
111-
112- If you're using Fedora for example, you'll need to install ` kernel-devel `
113- package and run ` /etc/init.d/vboxdrv setup ` to get veewee working.
114-
115- Testing
116- =======
117- The ./test.sh script tries out a few different default ways to invoke build.sh.
41+ bash build.sh systemvmtemplate
42+ bash build.sh builtin
11843
119- See ../vagrant/systemvm for a test setup that uses vagrant+serverspec to
120- provide actual integration tests that verify the built systemvm is up to spec.
0 commit comments