mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
create devcloud base image from veewee
This commit is contained in:
parent
9b4c578e0d
commit
4c6e547e70
5
tools/devcloud/veewee/README
Normal file
5
tools/devcloud/veewee/README
Normal file
@ -0,0 +1,5 @@
|
||||
Install DevCloud Base system:
|
||||
1. get code from https://github.com/jedi4ever/veewee, and install
|
||||
2. veewee vbox define devcloud ubuntu-12.04-server-i386
|
||||
3. put these two files(definition.rb and preseed.cfg) under ./definition/devcloud/
|
||||
3. veewee vbox build devcloud
|
||||
56
tools/devcloud/veewee/definition.rb
Normal file
56
tools/devcloud/veewee/definition.rb
Normal file
@ -0,0 +1,56 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you 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.
|
||||
|
||||
|
||||
Veewee::Session.declare({
|
||||
:cpu_count => '1',
|
||||
:memory_size=> '2048',
|
||||
:disk_size => '20000',
|
||||
:disk_format => 'VMDK',
|
||||
:hostiocache => 'off',
|
||||
:os_type_id => 'Ubuntu',
|
||||
:iso_file => "ubuntu-12.04-server-i386.iso",
|
||||
:iso_src => "http://releases.ubuntu.com/12.04/ubuntu-12.04-server-i386.iso",
|
||||
:iso_md5 => '32184a83c8b5e6031e1264e5c499bc03',
|
||||
:iso_download_timeout => "1000",
|
||||
:boot_wait => "4",
|
||||
:ioapic => "on",
|
||||
:nestedpaging => "on",
|
||||
:hwvirtex => "on",
|
||||
:boot_cmd_sequence => [
|
||||
'<Esc><Esc><Enter>',
|
||||
'/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ',
|
||||
'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ',
|
||||
'hostname=%NAME% ',
|
||||
'fb=false debconf/frontend=noninteractive ',
|
||||
'keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false ',
|
||||
'initrd=/install/initrd.gz -- <Enter>'
|
||||
],
|
||||
:kickstart_port => "7122",
|
||||
:kickstart_timeout => "10000",
|
||||
:kickstart_file => "preseed.cfg",
|
||||
:ssh_login_timeout => "10000",
|
||||
:ssh_user => "devcloud",
|
||||
:ssh_password => "devcloud",
|
||||
:ssh_key => "",
|
||||
:ssh_host_port => "2222",
|
||||
:ssh_guest_port => "22",
|
||||
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
|
||||
:shutdown_cmd => "shutdown -P now",
|
||||
:postinstall_files => [ "postinstall.sh"],
|
||||
:postinstall_timeout => "10000"
|
||||
})
|
||||
122
tools/devcloud/veewee/preseed.cfg
Normal file
122
tools/devcloud/veewee/preseed.cfg
Normal file
@ -0,0 +1,122 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you 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.
|
||||
|
||||
## Options to set on the command line
|
||||
d-i debian-installer/locale string en_US.utf8
|
||||
d-i console-setup/ask_detect boolean false
|
||||
d-i console-setup/layout string USA
|
||||
|
||||
#d-i netcfg/get_hostname string dummy
|
||||
d-i netcfg/get_hostname string devcloud
|
||||
d-i netcfg/get_domain string cloudstack.org
|
||||
|
||||
# Continue without a default route
|
||||
# Not working , specify a dummy in the DHCP
|
||||
#d-i netcfg/no_default_route boolean
|
||||
|
||||
d-i time/zone string UTC
|
||||
d-i clock-setup/utc-auto boolean true
|
||||
d-i clock-setup/utc boolean true
|
||||
|
||||
d-i kbd-chooser/method select American English
|
||||
|
||||
d-i netcfg/wireless_wep string
|
||||
|
||||
d-i base-installer/kernel/override-image string linux-server
|
||||
#d-i base-installer/kernel/override-image string linux-image-2.6.32-21-generic
|
||||
|
||||
# Choices: Dialog, Readline, Gnome, Kde, Editor, Noninteractive
|
||||
d-i debconf debconf/frontend select Noninteractive
|
||||
|
||||
d-i pkgsel/install-language-support boolean false
|
||||
tasksel tasksel/first multiselect standard, ubuntu-server
|
||||
|
||||
#d-i partman-auto/method string regular
|
||||
d-i partman-auto/method string lvm
|
||||
d-i partman-auto-lvm/no_boot boolean true
|
||||
d-i partman-auto/disk string /dev/sda
|
||||
d-i partman-auto-lvm/new_vg_name string devcloud
|
||||
d-i partman-auto/purge_lvm_from_device boolean true
|
||||
d-i partman-basicfilesystems/no_swap boolean false
|
||||
|
||||
d-i partman-lvm/confirm boolean true
|
||||
d-i partman-lvm/device_remove_lvm boolean true
|
||||
d-i partman-auto/choose_recipe select devcloud
|
||||
|
||||
d-i partman/confirm_write_new_label boolean true
|
||||
d-i partman/confirm_nooverwrite boolean true
|
||||
d-i partman/choose_partition select finish
|
||||
d-i partman/confirm boolean true
|
||||
d-i partman-auto/expert_recipe string \
|
||||
devcloud :: \
|
||||
4000 4500 4500 ext4 method{ lvm } \
|
||||
$lvmok{ } mountpoint{ / } lv_name{ root } \
|
||||
format{ } use_filesystem{ } filesystem{ ext4 } \
|
||||
.\
|
||||
15000 15000 15000 ext4 method{ lvm } \
|
||||
$lvmok{ } mountpoint{ /opt } lv_name{ data } \
|
||||
format{ } use_filesystem{ } filesystem{ ext4 } \
|
||||
.
|
||||
|
||||
#http://ubuntu-virginia.ubuntuforums.org/showthread.php?p=9626883
|
||||
#Message: "write the changes to disk and configure lvm preseed"
|
||||
#http://serverfault.com/questions/189328/ubuntu-kickstart-installation-using-lvm-waits-for-input
|
||||
#preseed partman-lvm/confirm_nooverwrite boolean true
|
||||
|
||||
# Write the changes to disks and configure LVM?
|
||||
d-i partman-lvm/confirm boolean true
|
||||
d-i partman-lvm/confirm_nooverwrite boolean true
|
||||
d-i partman-partitioning/confirm_write_new_label boolean true
|
||||
d-i partman/choose_partition select Finish
|
||||
d-i partman/confirm_nooverwrite boolean true
|
||||
d-i partman/confirm boolean true
|
||||
d-i partman-auto-lvm/guided_size string max
|
||||
|
||||
## Default user, we can get away with a recipe to change this
|
||||
d-i passwd/user-fullname string devcloud
|
||||
d-i passwd/username string devcloud
|
||||
d-i passwd/user-password password devcloud
|
||||
d-i passwd/user-password-again password devcloud
|
||||
d-i user-setup/encrypt-home boolean false
|
||||
d-i user-setup/allow-password-weak boolean true
|
||||
|
||||
## minimum is puppet and ssh and ntp
|
||||
# Individual additional packages to install
|
||||
d-i pkgsel/include string openssh-server ntp
|
||||
|
||||
# Whether to upgrade packages after debootstrap.
|
||||
# Allowed values: none, safe-upgrade, full-upgrade
|
||||
d-i pkgsel/upgrade select full-upgrade
|
||||
|
||||
d-i grub-installer/only_debian boolean true
|
||||
d-i grub-installer/with_other_os boolean true
|
||||
d-i finish-install/reboot_in_progress note
|
||||
|
||||
#For the update
|
||||
d-i pkgsel/update-policy select none
|
||||
|
||||
# debconf-get-selections --install
|
||||
#Use mirror
|
||||
#d-i apt-setup/use_mirror boolean true
|
||||
#d-i mirror/country string manual
|
||||
#choose-mirror-bin mirror/protocol string http
|
||||
#choose-mirror-bin mirror/http/hostname string 192.168.4.150
|
||||
#choose-mirror-bin mirror/http/directory string /ubuntu
|
||||
#choose-mirror-bin mirror/suite select maverick
|
||||
#d-i debian-installer/allow_unauthenticated string true
|
||||
|
||||
choose-mirror-bin mirror/http/proxy string
|
||||
Loading…
x
Reference in New Issue
Block a user