kameleon-builder 2.1.3 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.editorconfig +0 -0
- data/.env +2 -6
- data/CHANGELOG.rst +74 -1
- data/Gemfile +20 -2
- data/README.rst +35 -25
- data/Thorfile +29 -0
- data/contrib/kameleon_bashrc.sh +61 -0
- data/contrib/polipo_env.sh +3 -2
- data/kameleon-builder.gemspec +3 -10
- data/lib/kameleon.rb +10 -14
- data/lib/kameleon/cli.rb +92 -105
- data/lib/kameleon/context.rb +76 -43
- data/lib/kameleon/engine.rb +147 -103
- data/lib/kameleon/environment.rb +10 -5
- data/lib/kameleon/error.rb +1 -32
- data/lib/kameleon/persistent_cache.rb +127 -29
- data/lib/kameleon/recipe.rb +63 -106
- data/lib/kameleon/shell.rb +32 -17
- data/lib/kameleon/step.rb +18 -1
- data/lib/kameleon/ui.rb +141 -0
- data/lib/kameleon/utils.rb +9 -0
- data/templates/{debian7-chroot.yaml → chroot/debian7-amd64.yaml} +29 -21
- data/templates/{docker-debian7.yaml → docker/debian7.yaml} +5 -5
- data/templates/extend.erb +2 -2
- data/templates/{debian7-g5k.yaml → grid5000/debian7.yaml} +1 -1
- data/templates/{archlinux-desktop.yaml → qemu/archlinux-desktop-i686.yaml} +2 -2
- data/templates/qemu/archlinux-desktop-x86_64.yaml +25 -0
- data/templates/qemu/archlinux-i686.yaml +25 -0
- data/templates/{archlinux.yaml → qemu/archlinux-x86_64.yaml} +37 -34
- data/templates/qemu/centos6.5-x86_64.yaml +113 -0
- data/templates/qemu/centos7-x86_64.yaml +119 -0
- data/templates/{debian7.yaml → qemu/debian7-amd64.yaml} +45 -40
- data/templates/{debian7-desktop.yaml → qemu/debian7-desktop-amd64.yaml} +2 -3
- data/templates/{debian7-kameleon.yaml → qemu/debian7-kameleon-amd64.yaml} +3 -6
- data/templates/{debian7-oar-dev.yaml → qemu/debian7-oar-amd64.yaml} +2 -2
- data/templates/qemu/debian8-amd64.yaml +25 -0
- data/templates/{fedora20-desktop.yaml → qemu/fedora20-desktop-x86_64.yaml} +2 -2
- data/templates/qemu/fedora20-x86_64.yaml +116 -0
- data/templates/{ubuntu-12.04.yaml → qemu/ubuntu-12.04-amd64.yaml} +42 -38
- data/templates/{ubuntu-12.04-desktop.yaml → qemu/ubuntu-12.04-desktop-amd64.yaml} +3 -3
- data/templates/{ubuntu-14.04.yaml → qemu/ubuntu-14.04-amd64.yaml} +2 -2
- data/templates/{ubuntu-14.04-desktop.yaml → qemu/ubuntu-14.04-desktop-amd64.yaml} +2 -2
- data/templates/steps/aliases/defaults.yaml +19 -13
- data/templates/steps/bootstrap/archlinux/arch_bootstrap.yaml +11 -19
- data/templates/steps/bootstrap/debian/debootstrap.yaml +10 -11
- data/templates/steps/bootstrap/debian/debootstrap_arm.yaml +11 -19
- data/templates/steps/bootstrap/fedora/init_pxeboot.yaml +13 -0
- data/templates/steps/bootstrap/fedora/yum_bootstrap.yaml +45 -0
- data/templates/steps/bootstrap/initialize_disk.yaml +16 -0
- data/templates/steps/bootstrap/initialize_disk_chroot.yaml +10 -14
- data/templates/steps/bootstrap/install_requirements.yaml +3 -0
- data/templates/steps/bootstrap/prepare_docker.yaml +7 -7
- data/templates/steps/bootstrap/prepare_qemu.yaml +20 -26
- data/templates/steps/bootstrap/prepare_virtualbox.yaml +63 -0
- data/templates/steps/bootstrap/start_chroot.yaml +2 -13
- data/templates/steps/bootstrap/start_qemu.yaml +50 -53
- data/templates/steps/bootstrap/start_virtualbox.yaml +37 -0
- data/templates/steps/bootstrap/switch_context_qemu.yaml +64 -0
- data/templates/steps/bootstrap/switch_context_virtualbox.yaml +66 -0
- data/templates/steps/breakpoint.yaml +2 -1
- data/templates/steps/checkpoints/docker.yaml +14 -11
- data/templates/steps/checkpoints/qcow2.yaml +26 -24
- data/templates/steps/checkpoints/qemu.yaml +30 -36
- data/templates/steps/checkpoints/virtualbox.yaml +21 -0
- data/templates/steps/disable_checkpoint.yaml +3 -0
- data/templates/steps/enable_checkpoint.yaml +5 -0
- data/templates/steps/export/qemu_save_appliance.yaml +52 -0
- data/templates/steps/export/virtualbox_save_appliance.yaml +67 -0
- data/templates/steps/setup/archlinux/install_bootloader.yaml +23 -0
- data/templates/steps/setup/centos/6.5/configure_network.yaml +31 -0
- data/templates/steps/setup/centos/6.5/configure_system.yaml +27 -0
- data/templates/steps/setup/debian/configure_apt.yaml +1 -6
- data/templates/steps/setup/debian/configure_kernel.yaml +0 -5
- data/templates/steps/setup/debian/install_bootloader.yaml +36 -0
- data/templates/steps/setup/debian/setup_vagrant_box.yaml +48 -18
- data/templates/steps/setup/debian/upgrade_system.yaml +2 -7
- data/templates/steps/setup/fedora/configure_kernel.yaml +9 -0
- data/templates/steps/setup/fedora/configure_keyboard.yaml +12 -0
- data/templates/steps/setup/fedora/configure_network.yaml +9 -1
- data/templates/steps/setup/fedora/configure_system.yaml +20 -45
- data/templates/steps/setup/fedora/install_bootloader.yaml +58 -0
- data/templates/steps/setup/fedora/minimal_install.yaml +3 -0
- data/templates/steps/setup/fedora/update_system.yaml +13 -5
- data/templates/steps/setup/ubuntu/configure_apt.yaml +4 -9
- data/templates/vagrant/debian7-amd64.yaml +130 -0
- data/templates/virtualbox/archlinux-desktop-i686.yaml +25 -0
- data/templates/virtualbox/archlinux-desktop-x86_64.yaml +28 -0
- data/templates/virtualbox/archlinux-i686.yaml +28 -0
- data/templates/virtualbox/archlinux-x86_64.yaml +109 -0
- data/templates/virtualbox/centos6.5-i386.yaml +39 -0
- data/templates/virtualbox/centos6.5-x86_64.yaml +111 -0
- data/templates/virtualbox/centos7-x86_64.yaml +116 -0
- data/{docs/source/debian7.yaml → templates/virtualbox/debian7-amd64.yaml} +53 -52
- data/templates/virtualbox/debian7-desktop-amd64.yaml +25 -0
- data/templates/{fedora-rawhide.yaml → virtualbox/debian7-i386.yaml} +12 -11
- data/templates/virtualbox/debian7-kameleon-amd64.yaml +38 -0
- data/templates/virtualbox/debian7-oar-amd64.yaml +51 -0
- data/templates/{debian-testing.yaml → virtualbox/debian8-amd64.yaml} +3 -3
- data/templates/virtualbox/debian8-i386.yaml +31 -0
- data/templates/virtualbox/fedora20-x86_64.yaml +116 -0
- data/templates/virtualbox/ubuntu-12.04-amd64.yaml +128 -0
- data/templates/virtualbox/ubuntu-12.04-desktop-amd64.yaml +25 -0
- data/templates/virtualbox/ubuntu-14.04-amd64.yaml +25 -0
- data/templates/virtualbox/ubuntu-14.04-desktop-amd64.yaml +27 -0
- data/version.txt +1 -1
- metadata +67 -212
- data/Rakefile +0 -24
- data/docs/.gitignore +0 -1
- data/docs/Makefile +0 -181
- data/docs/README.md +0 -17
- data/docs/make.bat +0 -242
- data/docs/source/_static/.gitignore +0 -0
- data/docs/source/_static/centos.png +0 -0
- data/docs/source/_static/debian.png +0 -0
- data/docs/source/_static/kameleon-logo.png +0 -0
- data/docs/source/_static/kameleon-logo.xcf +0 -0
- data/docs/source/_static/kameleon-long.png +0 -0
- data/docs/source/_static/ubuntu.png +0 -0
- data/docs/source/_themes/sphinx_rtd_theme/__init__.py +0 -17
- data/docs/source/_themes/sphinx_rtd_theme/breadcrumbs.html +0 -19
- data/docs/source/_themes/sphinx_rtd_theme/footer.html +0 -32
- data/docs/source/_themes/sphinx_rtd_theme/layout.html +0 -160
- data/docs/source/_themes/sphinx_rtd_theme/layout_old.html +0 -205
- data/docs/source/_themes/sphinx_rtd_theme/search.html +0 -50
- data/docs/source/_themes/sphinx_rtd_theme/searchbox.html +0 -7
- data/docs/source/_themes/sphinx_rtd_theme/static/css/badge_only.css +0 -1
- data/docs/source/_themes/sphinx_rtd_theme/static/css/theme.css +0 -4
- data/docs/source/_themes/sphinx_rtd_theme/static/fonts/FontAwesome.otf +0 -0
- data/docs/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot +0 -0
- data/docs/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.svg +0 -414
- data/docs/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf +0 -0
- data/docs/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff +0 -0
- data/docs/source/_themes/sphinx_rtd_theme/static/js/theme.js +0 -47
- data/docs/source/_themes/sphinx_rtd_theme/theme.conf +0 -8
- data/docs/source/_themes/sphinx_rtd_theme/versions.html +0 -37
- data/docs/source/aliases.rst +0 -31
- data/docs/source/atlas_debian_g5k.yaml +0 -36
- data/docs/source/checkpoint.rst +0 -30
- data/docs/source/commands.rst +0 -63
- data/docs/source/conf.py +0 -262
- data/docs/source/context.rst +0 -47
- data/docs/source/debian_customized.yaml +0 -28
- data/docs/source/debian_customized_g5k.yaml +0 -21
- data/docs/source/faq.rst +0 -43
- data/docs/source/getting_started.rst +0 -260
- data/docs/source/grid5000_tutorial.rst +0 -525
- data/docs/source/index.rst +0 -53
- data/docs/source/install_atlas.yaml +0 -25
- data/docs/source/install_hpl.yaml +0 -24
- data/docs/source/installation.rst +0 -51
- data/docs/source/persistent_cache.rst +0 -34
- data/docs/source/recipe.rst +0 -177
- data/docs/source/tau_install.yaml +0 -19
- data/docs/source/tau_install_g5k.yaml +0 -25
- data/docs/source/use_cases.rst +0 -93
- data/docs/source/workspace.rst +0 -13
- data/lib/kameleon/logger.rb +0 -56
- data/omnibus/.gitignore +0 -11
- data/omnibus/.kitchen.yml +0 -25
- data/omnibus/Berksfile +0 -9
- data/omnibus/Berksfile.lock +0 -25
- data/omnibus/Gemfile +0 -12
- data/omnibus/README.md +0 -94
- data/omnibus/config/projects/kameleon.rb +0 -23
- data/omnibus/config/software/kameleon.rb +0 -24
- data/omnibus/config/software/polipo.rb +0 -30
- data/omnibus/config/software/ruby.rb +0 -158
- data/omnibus/files/mac_dmg/Resources/background.png +0 -0
- data/omnibus/files/mac_dmg/Resources/icon.png +0 -0
- data/omnibus/files/mac_pkg/Resources/background.png +0 -0
- data/omnibus/files/mac_pkg/Resources/license.html +0 -1
- data/omnibus/files/mac_pkg/Resources/welcome.html +0 -9
- data/omnibus/omnibus.rb +0 -27
- data/omnibus/package-scripts/kameleon/makeselfinst +0 -27
- data/omnibus/package-scripts/kameleon/postrm +0 -9
- data/templates/fedora20.yaml +0 -105
- data/templates/steps/bootstrap/archlinux/install_bootloader.yaml +0 -46
- data/templates/steps/bootstrap/archlinux/populate_disk.yaml +0 -39
- data/templates/steps/bootstrap/fedora/liveos_bootstrap.yaml +0 -123
- data/templates/steps/bootstrap/initialize_disk_qemu.yaml +0 -72
- data/templates/steps/bootstrap/install_bootloader.yaml +0 -42
- data/templates/steps/bootstrap/ubuntu/debootstrap.yaml +0 -27
- data/templates/steps/export/save_appliance.yaml +0 -58
- data/templates/steps/export/save_vagrant_box.yaml +0 -29
- data/templates/vagrant-debian7.yaml +0 -31
@@ -2,15 +2,17 @@
|
|
2
2
|
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
|
3
3
|
#==============================================================================
|
4
4
|
#
|
5
|
-
# DESCRIPTION: Debian 7 (Wheezy) base system
|
5
|
+
# DESCRIPTION: Debian 7 (Wheezy) base system (amd64).
|
6
6
|
#
|
7
7
|
#==============================================================================
|
8
8
|
|
9
9
|
---
|
10
10
|
# Loads some helpful aliases
|
11
11
|
aliases: defaults.yaml
|
12
|
+
|
12
13
|
# Enables qemu checkpoint
|
13
14
|
checkpoint: qemu.yaml
|
15
|
+
|
14
16
|
#== Global variables use by Kameleon engine and the steps
|
15
17
|
global:
|
16
18
|
## User varibales : used by the recipe
|
@@ -21,24 +23,28 @@ global:
|
|
21
23
|
distrib: debian
|
22
24
|
release: wheezy
|
23
25
|
arch: amd64
|
26
|
+
kernel_arch: $$arch
|
27
|
+
hostname: kameleon-$$distrib
|
24
28
|
|
25
29
|
## QEMU options
|
26
|
-
qemu_enable_kvm: true
|
30
|
+
qemu_enable_kvm: "$(egrep '(vmx|svm)' /proc/cpuinfo > /dev/null && echo true)"
|
27
31
|
qemu_cpu: 2
|
28
|
-
qemu_memory_size:
|
29
|
-
|
32
|
+
qemu_memory_size: 768
|
33
|
+
qemu_monitor_socket: $$kameleon_cwd/qemu_monitor.socket
|
30
34
|
qemu_ssh_port: 55423
|
31
35
|
qemu_arch: x86_64
|
36
|
+
qemu_image_size: 10G
|
37
|
+
qemu_image_disk: $$kameleon_cwd/base_$$kameleon_recipe_name.qcow2
|
38
|
+
qemu_pidfile: $$kameleon_cwd/qemu.pid
|
32
39
|
|
33
|
-
##
|
34
|
-
|
35
|
-
|
36
|
-
image_size: 10G
|
37
|
-
filesystem_type: ext4
|
40
|
+
## Kameleon iso bootstrap
|
41
|
+
boot2kameleon_url: http://kameleon.imag.fr/iso/boot2debian/debian-jessie-$${qemu_arch}-insecure.iso
|
42
|
+
insecure_ssh_key_url: http://kameleon.imag.fr/iso/boot2debian/keys/insecure_id_rsa
|
38
43
|
|
39
44
|
# rootfs options
|
40
|
-
|
41
|
-
|
45
|
+
disk_device: /dev/vda
|
46
|
+
rootfs: /rootfs
|
47
|
+
filesystem_type: ext4
|
42
48
|
|
43
49
|
## System variables. Required by kameleon engine
|
44
50
|
# Include specific steps
|
@@ -52,53 +58,50 @@ global:
|
|
52
58
|
apt_enable_nonfree: true
|
53
59
|
apt_install_recommends: false
|
54
60
|
|
55
|
-
|
56
|
-
# local bash session, but it can be a remote shell on other machines or on
|
57
|
-
# any shell. (eg. bash, chroot, fakechroot, ssh, tmux, lxc...)
|
61
|
+
ssh_config_file: $$kameleon_cwd/ssh_config
|
58
62
|
out_context:
|
59
|
-
cmd: bash
|
60
|
-
workdir:
|
63
|
+
cmd: ssh -F $$ssh_config_file $${kameleon_recipe_name} -t /bin/bash
|
64
|
+
workdir: /root/kameleon_workdir
|
65
|
+
proxy_cache: 10.0.2.2
|
61
66
|
|
62
|
-
# Shell session that allows us to connect to the building machine in order to
|
63
|
-
# configure it and setup additional programs
|
64
|
-
ssh_config_file: $$kameleon_cwd/ssh_config
|
65
67
|
in_context:
|
66
|
-
cmd:
|
68
|
+
cmd: ssh -F $$ssh_config_file $${kameleon_recipe_name} -t /bin/bash
|
67
69
|
workdir: /root/kameleon_workdir
|
70
|
+
proxy_cache: 10.0.2.2
|
68
71
|
|
69
72
|
#== Bootstrap the new system and create the 'in_context'
|
70
73
|
bootstrap:
|
74
|
+
- prepare_qemu
|
75
|
+
- start_qemu
|
76
|
+
- enable_checkpoint
|
77
|
+
- install_requirements:
|
78
|
+
- packages: parted e2fsprogs debootstrap extlinux
|
79
|
+
- initialize_disk
|
71
80
|
- debootstrap:
|
72
|
-
- include_pkg: >
|
73
|
-
|
74
|
-
|
75
|
-
|
81
|
+
- include_pkg: >
|
82
|
+
apt-utils ca-certificates locales less linux-image-$$kernel_arch
|
83
|
+
isc-dhcp-client ifupdown iptables iputils-ping iproute pciutils
|
84
|
+
psmisc acpid acpi-support-base openssh-server sysvinit
|
76
85
|
- release: $$release
|
77
86
|
- arch: $$arch
|
78
87
|
- repository: $$apt_repository
|
79
|
-
-
|
80
|
-
-
|
81
|
-
- prepare_qemu
|
82
|
-
- install_bootloader
|
83
|
-
- start_qemu
|
88
|
+
- variant: minbase
|
89
|
+
- switch_context_qemu
|
84
90
|
|
85
91
|
#== Install and configuration steps
|
86
|
-
# WARNING: this part should be independante from the out context (whenever
|
87
|
-
# possible...)
|
88
92
|
setup:
|
89
93
|
# Install
|
90
94
|
- configure_apt:
|
91
95
|
- repository: $$apt_repository
|
92
96
|
- enable_contrib_repo: $$apt_enable_contrib
|
93
97
|
- enable_nonfree_repo: $$apt_enable_nonfree
|
94
|
-
- install_recommends: $$apt_install_recommends
|
95
98
|
- upgrade_system:
|
96
99
|
- dist_upgrade: true
|
97
100
|
- install_software:
|
98
101
|
- packages: >
|
99
|
-
debian-keyring ntp
|
100
|
-
|
101
|
-
|
102
|
+
debian-keyring ntp sudo less vim bash-completion curl less bzip2 wget
|
103
|
+
dialog htop tree extlinux
|
104
|
+
- install_bootloader
|
102
105
|
# Configuration
|
103
106
|
- configure_system:
|
104
107
|
- locales: POSIX C en_US fr_FR de_DE
|
@@ -106,8 +109,7 @@ setup:
|
|
106
109
|
- timezone: UTC
|
107
110
|
- configure_keyboard:
|
108
111
|
- layout: "us,fr,de"
|
109
|
-
- configure_network
|
110
|
-
- hostname: kameleon-$$distrib
|
112
|
+
- configure_network
|
111
113
|
- create_group:
|
112
114
|
- name: admin
|
113
115
|
- create_user:
|
@@ -117,12 +119,15 @@ setup:
|
|
117
119
|
|
118
120
|
#== Export the generated appliance in the format of your choice
|
119
121
|
export:
|
120
|
-
-
|
121
|
-
|
122
|
+
- disable_checkpoint
|
123
|
+
- qemu_save_appliance:
|
124
|
+
- input: $$qemu_image_disk
|
122
125
|
- output: $$kameleon_cwd/$$kameleon_recipe_name
|
123
126
|
- save_as_qcow2
|
124
127
|
# - save_as_qed
|
125
|
-
# -
|
128
|
+
# - save_as_tar_gz
|
129
|
+
# - save_as_tar_xz
|
130
|
+
# - save_as_tar_bz2
|
126
131
|
# - save_as_raw
|
127
132
|
# - save_as_vmdk
|
128
133
|
# - save_as_vdi
|
@@ -2,16 +2,15 @@
|
|
2
2
|
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
|
3
3
|
#==============================================================================
|
4
4
|
#
|
5
|
-
# DESCRIPTION: Debian 7 (Wheezy) GNOME Desktop edition.
|
5
|
+
# DESCRIPTION: Debian 7 (Wheezy) GNOME Desktop edition (amd64).
|
6
6
|
#
|
7
7
|
#==============================================================================
|
8
8
|
|
9
9
|
---
|
10
|
-
extend: debian7
|
10
|
+
extend: debian7-amd64
|
11
11
|
|
12
12
|
global:
|
13
13
|
# Apt options
|
14
|
-
apt_install_recommends: true
|
15
14
|
|
16
15
|
bootstrap:
|
17
16
|
- @base
|
@@ -2,12 +2,12 @@
|
|
2
2
|
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
|
3
3
|
#==============================================================================
|
4
4
|
#
|
5
|
-
# DESCRIPTION: Debian 7 appliance with kameleon.
|
5
|
+
# DESCRIPTION: Debian 7 appliance with kameleon (amd64).
|
6
6
|
#
|
7
7
|
#==============================================================================
|
8
8
|
|
9
9
|
---
|
10
|
-
extend: debian7-desktop
|
10
|
+
extend: debian7-desktop-amd64
|
11
11
|
|
12
12
|
global:
|
13
13
|
# You can see the base template `debian7-desktop.yaml` to know the
|
@@ -37,7 +37,4 @@ setup:
|
|
37
37
|
rm -f /bigemptyfile
|
38
38
|
|
39
39
|
export:
|
40
|
-
-
|
41
|
-
- save_as_qcow2:
|
42
|
-
- exec_out: qemu-img convert -c -O qcow2 $$image_disk $KAMELEON_WORKDIR/$$kameleon_recipe_name.qcow2
|
43
|
-
- exec_out: echo "Saved qcow2 appliance to $KAMELEON_WORKDIR/$$kameleon_recipe_name.qcow2"
|
40
|
+
- @base
|
@@ -2,12 +2,12 @@
|
|
2
2
|
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
|
3
3
|
#==============================================================================
|
4
4
|
#
|
5
|
-
# DESCRIPTION: Debian 7 dev appliance with OAR-2.5 (
|
5
|
+
# DESCRIPTION: Debian 7 dev appliance with OAR-2.5 (amd64).
|
6
6
|
#
|
7
7
|
#==============================================================================
|
8
8
|
|
9
9
|
---
|
10
|
-
extend: debian7
|
10
|
+
extend: debian7-amd64
|
11
11
|
|
12
12
|
global:
|
13
13
|
distrib: debian
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#==============================================================================
|
2
|
+
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
|
3
|
+
#==============================================================================
|
4
|
+
#
|
5
|
+
# DESCRIPTION: Debian 8 (Jessie) base system (amd64).
|
6
|
+
#
|
7
|
+
#==============================================================================
|
8
|
+
|
9
|
+
---
|
10
|
+
extend: debian7-amd64
|
11
|
+
|
12
|
+
global:
|
13
|
+
# Distribution
|
14
|
+
distrib: debian
|
15
|
+
release: jessie
|
16
|
+
arch: amd64
|
17
|
+
|
18
|
+
bootstrap:
|
19
|
+
- @base
|
20
|
+
|
21
|
+
setup:
|
22
|
+
- @base
|
23
|
+
|
24
|
+
export:
|
25
|
+
- @base
|
@@ -2,12 +2,12 @@
|
|
2
2
|
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
|
3
3
|
#==============================================================================
|
4
4
|
#
|
5
|
-
# DESCRIPTION: Fedora 20 GNOME Desktop edition
|
5
|
+
# DESCRIPTION: Fedora 20 GNOME Desktop edition (x86_64).
|
6
6
|
#
|
7
7
|
#==============================================================================
|
8
8
|
|
9
9
|
---
|
10
|
-
extend: fedora20
|
10
|
+
extend: fedora20-x86_64
|
11
11
|
|
12
12
|
bootstrap:
|
13
13
|
- @base
|
@@ -0,0 +1,116 @@
|
|
1
|
+
#==============================================================================
|
2
|
+
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
|
3
|
+
#==============================================================================
|
4
|
+
#
|
5
|
+
# DESCRIPTION: Fedora 20 base system (x86_64).
|
6
|
+
#
|
7
|
+
#==============================================================================
|
8
|
+
|
9
|
+
---
|
10
|
+
# Loads some helpful aliases
|
11
|
+
aliases: defaults.yaml
|
12
|
+
# Enables qemu checkpoint
|
13
|
+
checkpoint: qemu.yaml
|
14
|
+
#== Global variables use by Kameleon engine and the steps
|
15
|
+
global:
|
16
|
+
## User varibales : used by the recipe
|
17
|
+
user_name: kameleon
|
18
|
+
user_password: $$user_name
|
19
|
+
|
20
|
+
# Distribution
|
21
|
+
distrib: fedora
|
22
|
+
release: 20
|
23
|
+
arch: x86_64
|
24
|
+
hostname: kameleon-$$distrib
|
25
|
+
|
26
|
+
## QEMU options
|
27
|
+
qemu_enable_kvm: "$(egrep '(vmx|svm)' /proc/cpuinfo > /dev/null && echo true)"
|
28
|
+
qemu_cpu: 2
|
29
|
+
qemu_memory_size: 768
|
30
|
+
qemu_monitor_socket: $$kameleon_cwd/qemu_monitor.socket
|
31
|
+
qemu_ssh_port: 55423
|
32
|
+
qemu_arch: x86_64
|
33
|
+
qemu_image_size: 10G
|
34
|
+
qemu_image_disk: $$kameleon_cwd/base_$$kameleon_recipe_name.qcow2
|
35
|
+
qemu_pidfile: $$kameleon_cwd/qemu.pid
|
36
|
+
|
37
|
+
## Kameleon iso bootstrap
|
38
|
+
boot2kameleon_url: http://kameleon.imag.fr/iso/boot2debian/debian-jessie-$${qemu_arch}-insecure.iso
|
39
|
+
insecure_ssh_key_url: http://kameleon.imag.fr/iso/boot2debian/keys/insecure_id_rsa
|
40
|
+
|
41
|
+
# rootfs options
|
42
|
+
disk_device: /dev/vda
|
43
|
+
rootfs: /rootfs
|
44
|
+
filesystem_type: ext4
|
45
|
+
|
46
|
+
## System variables. Required by kameleon engine
|
47
|
+
# Include specific steps
|
48
|
+
include_steps:
|
49
|
+
- $$distrib/$$release
|
50
|
+
- $$distrib
|
51
|
+
|
52
|
+
disable_selinux: true
|
53
|
+
ssh_config_file: $$kameleon_cwd/ssh_config
|
54
|
+
out_context:
|
55
|
+
cmd: ssh -F $$ssh_config_file $${kameleon_recipe_name} -t /bin/bash
|
56
|
+
workdir: /root/kameleon_workdir
|
57
|
+
proxy_cache: 10.0.2.2
|
58
|
+
|
59
|
+
in_context:
|
60
|
+
cmd: ssh -F $$ssh_config_file $${kameleon_recipe_name} -t /bin/bash
|
61
|
+
workdir: /root/kameleon_workdir
|
62
|
+
proxy_cache: 10.0.2.2
|
63
|
+
|
64
|
+
#== Bootstrap the new system and create the 'in_context'
|
65
|
+
bootstrap:
|
66
|
+
- enable_checkpoint
|
67
|
+
- prepare_qemu
|
68
|
+
- start_qemu
|
69
|
+
- install_requirements:
|
70
|
+
- packages: parted e2fsprogs yum rpm lynx extlinux
|
71
|
+
- initialize_disk
|
72
|
+
- yum_bootstrap:
|
73
|
+
- mirror_packages_url: http://mirrors.kernel.org/fedora/releases/$$release/Fedora/$$arch/os/Packages/f/
|
74
|
+
- include_pkgs: >
|
75
|
+
findutils yum util-linux dhclient vim-minimal net-tools NetworkManager
|
76
|
+
openssh-server
|
77
|
+
- init_pxeboot:
|
78
|
+
- pxe_initrd_url: http://mirrors.kernel.org/fedora/releases/$$release/Fedora/$$arch/os/images/pxeboot/initrd.img
|
79
|
+
- pxe_vmlinuz_url: http://mirrors.kernel.org/fedora/releases/$$release/Fedora/$$arch/os/images/pxeboot/vmlinuz
|
80
|
+
- switch_context_qemu
|
81
|
+
|
82
|
+
#== Install and configuration steps
|
83
|
+
setup:
|
84
|
+
- configure_kernel
|
85
|
+
- update_system
|
86
|
+
- minimal_install
|
87
|
+
- install_software:
|
88
|
+
- packages: >
|
89
|
+
kernel bash-completion kbd sudo openssh-clients syslinux-extlinux acpid
|
90
|
+
ntp ntpdate
|
91
|
+
- install_bootloader
|
92
|
+
- configure_system:
|
93
|
+
- locales: POSIX C en_US fr_FR de_DE
|
94
|
+
- lang: en_US.UTF-8
|
95
|
+
- timezone: UTC
|
96
|
+
- configure_keyboard:
|
97
|
+
- layout: "us"
|
98
|
+
- configure_network:
|
99
|
+
- hostname: kameleon-$$distrib
|
100
|
+
- create_user:
|
101
|
+
- name: $$user_name
|
102
|
+
- groups: wheel
|
103
|
+
- password: $$user_password
|
104
|
+
|
105
|
+
#== Export the generated appliance in the format of your choice
|
106
|
+
export:
|
107
|
+
- disable_checkpoint
|
108
|
+
- qemu_save_appliance:
|
109
|
+
- input: $$qemu_image_disk
|
110
|
+
- output: $$kameleon_cwd/$$kameleon_recipe_name
|
111
|
+
- save_as_qcow2
|
112
|
+
# - save_as_qed
|
113
|
+
# - save_as_tgz
|
114
|
+
# - save_as_raw
|
115
|
+
# - save_as_vmdk
|
116
|
+
# - save_as_vdi
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
|
3
3
|
#==============================================================================
|
4
4
|
#
|
5
|
-
# DESCRIPTION: Ubuntu 12.04 LTS (Precise Pangolin) base system.
|
5
|
+
# DESCRIPTION: Ubuntu 12.04 LTS (Precise Pangolin) base system (amd64).
|
6
6
|
#
|
7
7
|
#==============================================================================
|
8
8
|
|
@@ -21,29 +21,35 @@ global:
|
|
21
21
|
distrib: ubuntu
|
22
22
|
release: precise
|
23
23
|
arch: amd64
|
24
|
+
kernel_arch: $$arch
|
25
|
+
hostname: kameleon-$$distrib
|
24
26
|
|
25
27
|
## QEMU options
|
26
|
-
qemu_enable_kvm: true
|
28
|
+
qemu_enable_kvm: "$(egrep '(vmx|svm)' /proc/cpuinfo > /dev/null && echo true)"
|
27
29
|
qemu_cpu: 2
|
28
|
-
qemu_memory_size:
|
29
|
-
|
30
|
+
qemu_memory_size: 768
|
31
|
+
qemu_monitor_socket: $$kameleon_cwd/qemu_monitor.socket
|
30
32
|
qemu_ssh_port: 55423
|
31
33
|
qemu_arch: x86_64
|
34
|
+
qemu_image_size: 10G
|
35
|
+
qemu_image_disk: $$kameleon_cwd/base_$$kameleon_recipe_name.qcow2
|
36
|
+
qemu_pidfile: $$kameleon_cwd/qemu.pid
|
32
37
|
|
33
|
-
##
|
34
|
-
|
35
|
-
|
36
|
-
|
38
|
+
## Kameleon iso bootstrap
|
39
|
+
boot2kameleon_url: http://kameleon.imag.fr/iso/boot2debian/debian-jessie-$${qemu_arch}-insecure.iso
|
40
|
+
insecure_ssh_key_url: http://kameleon.imag.fr/iso/boot2debian/keys/insecure_id_rsa
|
41
|
+
|
42
|
+
# rootfs options
|
43
|
+
disk_device: /dev/vda
|
44
|
+
rootfs: /rootfs
|
37
45
|
filesystem_type: ext4
|
38
46
|
|
39
47
|
# rootfs options
|
40
|
-
rootfs:
|
41
|
-
rootfs_download_path: /var/cache/kameleon/$$distrib/$$release/$$arch/rootfs
|
48
|
+
rootfs: /rootfs
|
42
49
|
|
43
50
|
# Apt options
|
44
51
|
apt_repository: http://archive.ubuntu.com/ubuntu/
|
45
52
|
apt_enable_restricted: true
|
46
|
-
apt_install_recommends: false
|
47
53
|
|
48
54
|
## System variables. Required by kameleon engine
|
49
55
|
# Include specific steps
|
@@ -52,52 +58,51 @@ global:
|
|
52
58
|
- $$distrib
|
53
59
|
- debian
|
54
60
|
|
55
|
-
|
56
|
-
# local bash session, but it can be a remote shell on other machines or on
|
57
|
-
# any shell. (eg. bash, chroot, fakechroot, ssh, tmux, lxc...)
|
61
|
+
ssh_config_file: $$kameleon_cwd/ssh_config
|
58
62
|
out_context:
|
59
|
-
cmd: bash
|
60
|
-
workdir:
|
63
|
+
cmd: ssh -F $$ssh_config_file $${kameleon_recipe_name} -t /bin/bash
|
64
|
+
workdir: /root/kameleon_workdir
|
65
|
+
proxy_cache: 10.0.2.2
|
61
66
|
|
62
|
-
# Shell session that allows us to connect to the building machine in order to
|
63
|
-
# configure it and setup additional programs
|
64
|
-
ssh_config_file: $$kameleon_cwd/ssh_config
|
65
67
|
in_context:
|
66
|
-
cmd: ssh -F $$ssh_config_file $$kameleon_recipe_name -t /bin/bash
|
68
|
+
cmd: ssh -F $$ssh_config_file $${kameleon_recipe_name} -t /bin/bash
|
67
69
|
workdir: /root/kameleon_workdir
|
70
|
+
proxy_cache: 10.0.2.2
|
68
71
|
|
69
72
|
#== Bootstrap the new system and create the 'in_context'
|
70
73
|
bootstrap:
|
74
|
+
- prepare_qemu
|
75
|
+
- start_qemu
|
76
|
+
- install_requirements:
|
77
|
+
- packages: parted e2fsprogs debootstrap extlinux
|
78
|
+
- enable_checkpoint
|
79
|
+
- initialize_disk
|
71
80
|
- debootstrap:
|
72
|
-
- include_pkg: >
|
73
|
-
acpi-support kbd udev
|
74
|
-
|
81
|
+
- include_pkg: >
|
82
|
+
apt-transport-https ca-certificates less acpid acpi-support kbd bzip2 udev
|
83
|
+
locales psmisc linux-image-generic ifupdown iptables iputils-ping
|
84
|
+
iproute pciutils isc-dhcp-client openssh-server
|
75
85
|
- release: $$release
|
76
86
|
- arch: $$arch
|
77
87
|
- repository: $$apt_repository
|
78
|
-
-
|
79
|
-
-
|
80
|
-
|
81
|
-
- install_bootloader
|
82
|
-
- start_qemu
|
88
|
+
- variant: minbase
|
89
|
+
- switch_context_qemu
|
90
|
+
|
83
91
|
|
84
92
|
#== Install and configuration steps
|
85
|
-
# WARNING: this part should be independante from the out context (whenever
|
86
|
-
# possible...)
|
87
93
|
setup:
|
88
94
|
# Install
|
89
95
|
- configure_apt:
|
90
96
|
- repository: $$apt_repository
|
91
97
|
- enable_restricted: $$apt_enable_restricted
|
92
|
-
- install_recommends: $$apt_install_recommends
|
93
98
|
- upgrade_system:
|
94
99
|
- dist_upgrade: true
|
95
100
|
- install_software:
|
96
101
|
- packages: >
|
97
|
-
|
98
|
-
curl nano vim psmisc language-pack-en
|
102
|
+
bash-completion curl nano vim language-pack-en extlinux sudo
|
99
103
|
- configure_kernel:
|
100
104
|
- arch: $$arch
|
105
|
+
- install_bootloader
|
101
106
|
# Configuration
|
102
107
|
- configure_system:
|
103
108
|
- locales: POSIX C en_US fr_FR de_DE
|
@@ -105,8 +110,7 @@ setup:
|
|
105
110
|
- timezone: UTC
|
106
111
|
- configure_keyboard:
|
107
112
|
- layout: "us,fr,de"
|
108
|
-
- configure_network
|
109
|
-
- hostname: kameleon-$$distrib
|
113
|
+
- configure_network
|
110
114
|
- create_group:
|
111
115
|
- name: admin
|
112
116
|
- create_user:
|
@@ -116,8 +120,9 @@ setup:
|
|
116
120
|
|
117
121
|
#== Export the generated appliance in the format of your choice
|
118
122
|
export:
|
119
|
-
-
|
120
|
-
|
123
|
+
- disable_checkpoint
|
124
|
+
- qemu_save_appliance:
|
125
|
+
- input: $$qemu_image_disk
|
121
126
|
- output: $$kameleon_cwd/$$kameleon_recipe_name
|
122
127
|
- save_as_qcow2
|
123
128
|
# - save_as_qed
|
@@ -125,4 +130,3 @@ export:
|
|
125
130
|
# - save_as_raw
|
126
131
|
# - save_as_vmdk
|
127
132
|
# - save_as_vdi
|
128
|
-
|