kameleon-builder 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.editorconfig +0 -0
- data/.env +63 -15
- data/.gitignore +1 -0
- data/README.rst +4 -2
- data/Vagrantfile +13 -52
- data/bin/kameleon +5 -0
- data/completion/_kameleon.zsh +18 -0
- data/completion/kameleon.bash +13 -0
- data/completion/kameleon.fish +10 -0
- data/contrib/polipo_env.sh +2 -0
- data/contrib/steps/export/save_as_g5k.yaml +63 -0
- data/contrib/steps/setup/add_to_sudoers.yaml +5 -0
- data/docs/Makefile +10 -6
- data/docs/README.md +17 -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/aliases.rst +4 -2
- data/docs/source/checkpoint.rst +2 -0
- data/docs/source/commands.rst +4 -3
- data/docs/source/conf.py +15 -7
- data/docs/source/context.rst +7 -4
- data/docs/source/faq.rst +39 -1
- data/docs/source/getting_started.rst +227 -1
- data/docs/source/grid5000_tutorial.rst +110 -0
- data/docs/source/index.rst +7 -2
- data/docs/source/installation.rst +12 -4
- data/docs/source/persistent_cache.rst +34 -0
- data/docs/source/recipe.rst +23 -16
- data/docs/source/use_cases.rst +93 -0
- data/docs/source/workspace.rst +2 -0
- data/kameleon-builder.gemspec +7 -1
- data/lib/kameleon.rb +3 -6
- data/lib/kameleon/cli.rb +104 -50
- data/lib/kameleon/compat.rb +39 -0
- data/lib/kameleon/context.rb +43 -13
- data/lib/kameleon/engine.rb +118 -77
- data/lib/kameleon/environment.rb +3 -5
- data/lib/kameleon/error.rb +15 -9
- data/lib/kameleon/logger.rb +7 -4
- data/lib/kameleon/persistent_cache.rb +139 -0
- data/lib/kameleon/recipe.rb +200 -81
- data/lib/kameleon/shell.rb +51 -16
- data/omnibus/.gitignore +11 -0
- data/omnibus/.kitchen.yml +25 -0
- data/omnibus/Berksfile +9 -0
- data/omnibus/Berksfile.lock +25 -0
- data/omnibus/Gemfile +12 -0
- data/omnibus/README.md +94 -0
- data/omnibus/config/projects/kameleon.rb +23 -0
- data/omnibus/config/software/kameleon.rb +24 -0
- data/omnibus/config/software/polipo.rb +30 -0
- data/omnibus/config/software/ruby.rb +158 -0
- 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 +1 -0
- data/omnibus/files/mac_pkg/Resources/welcome.html +9 -0
- data/omnibus/omnibus.rb +27 -0
- data/omnibus/package-scripts/kameleon/makeselfinst +27 -0
- data/omnibus/package-scripts/kameleon/postrm +9 -0
- data/templates/archlinux-desktop.yaml +25 -0
- data/templates/archlinux.yaml +106 -0
- data/templates/debian-testing.yaml +25 -0
- data/templates/debian7-desktop.yaml +25 -0
- data/templates/{debian-wheezy-docker.yaml → debian7-docker.yaml} +30 -16
- data/templates/debian7-g5k.yaml +97 -0
- data/templates/debian7-oar-dev.yaml +51 -0
- data/templates/debian7.yaml +128 -0
- data/templates/extend.erb +23 -0
- data/templates/fedora-rawhide.yaml +30 -0
- data/templates/fedora20-desktop.yaml +21 -0
- data/templates/fedora20.yaml +105 -0
- data/templates/{debian-wheezy-chroot.yaml → old-debian7.yaml} +51 -38
- data/templates/{aliases → steps/aliases}/defaults.yaml +37 -12
- data/templates/steps/bootstrap/archlinux/arch_bootstrap.yaml +219 -0
- data/templates/steps/bootstrap/archlinux/install_bootloader.yaml +46 -0
- data/templates/steps/bootstrap/archlinux/populate_disk.yaml +39 -0
- data/templates/steps/bootstrap/debian/debootstrap.yaml +18 -10
- data/templates/steps/bootstrap/debian/debootstrap_arm.yaml +31 -0
- data/templates/steps/bootstrap/fedora/liveos_bootstrap.yaml +123 -0
- data/templates/steps/bootstrap/g5k_reserv.yaml +70 -0
- data/templates/steps/bootstrap/initialize_disk_chroot.yaml +84 -0
- data/templates/steps/bootstrap/initialize_disk_qemu.yaml +72 -0
- data/templates/steps/bootstrap/install_bootloader.yaml +42 -0
- data/templates/steps/bootstrap/prepare_chroot.yaml +126 -0
- data/templates/steps/bootstrap/prepare_docker.yaml +19 -8
- data/templates/steps/bootstrap/prepare_qemu.yaml +47 -0
- data/templates/steps/bootstrap/start_chroot.yaml +11 -2
- data/templates/steps/bootstrap/start_docker.yaml +2 -2
- data/templates/steps/bootstrap/start_qemu.yaml +75 -0
- data/templates/steps/bootstrap/ubuntu/debootstrap.yaml +27 -0
- data/templates/steps/breakpoint.yaml +2 -0
- data/templates/{checkpoints → steps/checkpoints}/docker.yaml +0 -0
- data/templates/steps/checkpoints/qcow2.yaml +38 -0
- data/templates/steps/checkpoints/qemu.yaml +39 -0
- data/templates/steps/export/clean_appliance.yaml +7 -1
- data/templates/steps/export/compact_qcow_img.yaml +12 -0
- data/templates/steps/export/save_appliance.yaml +58 -0
- data/templates/steps/export/save_appliance_from_g5k.yaml +47 -0
- data/templates/steps/export/save_vagrant_box.yaml +29 -0
- data/templates/steps/setup/archlinux/configure_keyboard.yaml +9 -0
- data/templates/steps/setup/archlinux/configure_network.yaml +9 -0
- data/templates/steps/setup/archlinux/configure_ruby.yaml +7 -0
- data/templates/steps/setup/archlinux/configure_system.yaml +20 -0
- data/templates/steps/setup/archlinux/install_dev_tools.yaml +18 -0
- data/templates/steps/setup/archlinux/install_gnome.yaml +27 -0
- data/templates/steps/setup/archlinux/install_software.yaml +9 -0
- data/templates/steps/setup/archlinux/install_yaourt.yaml +29 -0
- data/templates/steps/setup/autologin.yaml +16 -0
- data/templates/steps/setup/create_group.yaml +12 -0
- data/templates/steps/setup/create_user.yaml +9 -10
- data/templates/steps/setup/debian/configure_apt.yaml +65 -0
- data/templates/steps/setup/debian/configure_kernel.yaml +18 -0
- data/templates/steps/setup/debian/{keyboard_config.yaml → configure_keyboard.yaml} +1 -1
- data/templates/steps/setup/debian/{network_config.yaml → configure_network.yaml} +0 -0
- data/templates/steps/setup/debian/{system_config.yaml → configure_system.yaml} +0 -0
- data/templates/steps/setup/debian/install_gnome.yaml +13 -0
- data/templates/steps/setup/debian/install_kde.yaml +13 -0
- data/templates/steps/setup/debian/install_software.yaml +2 -0
- data/templates/steps/setup/debian/oar/oar_debian_config_frontend.yaml +8 -0
- data/templates/steps/setup/debian/oar/oar_debian_config_node.yaml +5 -0
- data/templates/steps/setup/debian/oar/oar_debian_config_server.yaml +5 -0
- data/templates/steps/setup/debian/oar/oar_prereq_install.yaml +16 -0
- data/templates/steps/setup/debian/setup_vagrant_box.yaml +52 -0
- data/templates/steps/setup/debian/upgrade_system.yaml +15 -0
- data/templates/steps/setup/fedora/configure_network.yaml +30 -0
- data/templates/steps/setup/fedora/configure_system.yaml +59 -0
- data/templates/steps/setup/fedora/install_software.yaml +3 -0
- data/templates/steps/setup/fedora/update_system.yaml +10 -0
- data/templates/steps/setup/oar/oar_config_devel.yaml +21 -0
- data/templates/steps/setup/oar/oar_config_frontend.yaml +38 -0
- data/templates/steps/setup/oar/oar_config_node.yaml +4 -0
- data/templates/steps/setup/oar/oar_config_server.yaml +25 -0
- data/templates/steps/setup/oar/oar_config_system.yaml +34 -0
- data/templates/steps/setup/oar/oar_devel_prereq_install.yaml +5 -0
- data/templates/steps/setup/oar/oar_git_install.yaml +21 -0
- data/templates/steps/setup/ubuntu/configure_apt.yaml +67 -0
- data/templates/ubuntu-12.04-desktop.yaml +25 -0
- data/templates/ubuntu-12.04.yaml +128 -0
- data/templates/ubuntu-14.04-desktop.yaml +27 -0
- data/templates/ubuntu-14.04.yaml +25 -0
- data/templates/vagrant-debian7.yaml +31 -0
- data/version.txt +1 -1
- metadata +155 -28
- checksums.yaml +0 -7
- data/templates/checkpoints/qcow2.yaml +0 -44
- data/templates/fedora-docker.yaml +0 -96
- data/templates/steps/bootstrap/fedora/docker_bootstrap.yaml +0 -25
- data/templates/steps/bootstrap/fedora/yum_bootstrap.yaml +0 -22
- data/templates/steps/bootstrap/prepare_appliance_with_nbd.yaml +0 -93
- data/templates/steps/export/build_appliance_from_docker.yaml +0 -105
- data/templates/steps/export/save_appliance_from_nbd.yaml +0 -54
- data/templates/steps/setup/debian/kernel_install.yaml +0 -20
- data/templates/steps/setup/debian/software_install.yaml +0 -15
- data/templates/steps/setup/fedora/kernel_install.yaml +0 -27
- data/templates/steps/setup/fedora/software_install.yaml +0 -10
@@ -0,0 +1,51 @@
|
|
1
|
+
#==============================================================================
|
2
|
+
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
|
3
|
+
#==============================================================================
|
4
|
+
#
|
5
|
+
# DESCRIPTION: Debian 7 dev appliance with OAR-2.5 (node/server/frontend).
|
6
|
+
#
|
7
|
+
#==============================================================================
|
8
|
+
|
9
|
+
---
|
10
|
+
extend: debian7
|
11
|
+
|
12
|
+
global:
|
13
|
+
distrib: debian
|
14
|
+
release: wheezy
|
15
|
+
|
16
|
+
## System variables. Required by kameleon engine
|
17
|
+
# Include specific steps
|
18
|
+
include_steps:
|
19
|
+
- $$distrib/$$release
|
20
|
+
- $$distrib
|
21
|
+
- $$distrib/$$release/oar
|
22
|
+
- $${distrib}/oar
|
23
|
+
- oar
|
24
|
+
|
25
|
+
## OAR
|
26
|
+
#
|
27
|
+
oar_git_directory: "/home/$$user_name/oar"
|
28
|
+
oar_git_repository: "git://scm.gforge.inria.fr/oar/oar.git"
|
29
|
+
oar_git_treeish: "2.5"
|
30
|
+
oar_prefix_install: "/usr/local"
|
31
|
+
|
32
|
+
bootstrap:
|
33
|
+
- @base
|
34
|
+
|
35
|
+
setup:
|
36
|
+
- @base
|
37
|
+
- oar_prereq_install
|
38
|
+
- oar_devel_prereq_install
|
39
|
+
- oar_git_install
|
40
|
+
- oar_debian_config_server
|
41
|
+
- oar_debian_config_frontend
|
42
|
+
- oar_debian_config_node
|
43
|
+
- oar_config_node
|
44
|
+
- oar_config_server
|
45
|
+
- oar_config_frontend
|
46
|
+
- oar_config_system
|
47
|
+
- oar_config_devel
|
48
|
+
- autologin
|
49
|
+
|
50
|
+
export:
|
51
|
+
- @base
|
@@ -0,0 +1,128 @@
|
|
1
|
+
#==============================================================================
|
2
|
+
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
|
3
|
+
#==============================================================================
|
4
|
+
#
|
5
|
+
# DESCRIPTION: Debian 7 (Wheezy) base system
|
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: debian
|
22
|
+
release: wheezy
|
23
|
+
arch: amd64
|
24
|
+
|
25
|
+
## QEMU options
|
26
|
+
qemu_enable_kvm: true
|
27
|
+
qemu_cpu: 2
|
28
|
+
qemu_memory_size: 512
|
29
|
+
qemu_monitor_port: 10023
|
30
|
+
qemu_ssh_port: 55423
|
31
|
+
qemu_arch: x86_64
|
32
|
+
|
33
|
+
## Disk options
|
34
|
+
nbd_device: /dev/nbd1
|
35
|
+
image_disk: $$kameleon_cwd/base_$$kameleon_recipe_name.qcow2
|
36
|
+
image_size: 10G
|
37
|
+
filesystem_type: ext4
|
38
|
+
|
39
|
+
# rootfs options
|
40
|
+
rootfs: $$kameleon_cwd/rootfs
|
41
|
+
rootfs_download_path: /var/cache/kameleon/$$distrib/$$release/$$arch/rootfs
|
42
|
+
|
43
|
+
## System variables. Required by kameleon engine
|
44
|
+
# Include specific steps
|
45
|
+
include_steps:
|
46
|
+
- $$distrib/$$release
|
47
|
+
- $$distrib
|
48
|
+
|
49
|
+
# Apt options
|
50
|
+
apt_repository: http://ftp.debian.org/debian/
|
51
|
+
apt_enable_contrib: true
|
52
|
+
apt_enable_nonfree: true
|
53
|
+
apt_install_recommends: false
|
54
|
+
|
55
|
+
# Shell session from where we launch exec_out commands. There is often a
|
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...)
|
58
|
+
out_context:
|
59
|
+
cmd: bash
|
60
|
+
workdir: $$kameleon_cwd
|
61
|
+
|
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
|
+
in_context:
|
66
|
+
cmd: LC_ALL=POSIX ssh -F $$ssh_config_file $$kameleon_recipe_name -t /bin/bash
|
67
|
+
workdir: /root/kameleon_workdir
|
68
|
+
|
69
|
+
#== Bootstrap the new system and create the 'in_context'
|
70
|
+
bootstrap:
|
71
|
+
- debootstrap:
|
72
|
+
- include_pkg: >
|
73
|
+
ifupdown locales libui-dialog-perl dialog isc-dhcp-client netbase
|
74
|
+
net-tools iproute acpid openssh-server pciutils extlinux
|
75
|
+
linux-image-$$arch
|
76
|
+
- release: $$release
|
77
|
+
- arch: $$arch
|
78
|
+
- repository: $$apt_repository
|
79
|
+
- enable_cache: true
|
80
|
+
- initialize_disk_qemu
|
81
|
+
- prepare_qemu
|
82
|
+
- install_bootloader
|
83
|
+
- start_qemu
|
84
|
+
|
85
|
+
#== Install and configuration steps
|
86
|
+
# WARNING: this part should be independante from the out context (whenever
|
87
|
+
# possible...)
|
88
|
+
setup:
|
89
|
+
# Install
|
90
|
+
- configure_apt:
|
91
|
+
- repository: $$apt_repository
|
92
|
+
- enable_contrib_repo: $$apt_enable_contrib
|
93
|
+
- enable_nonfree_repo: $$apt_enable_nonfree
|
94
|
+
- install_recommends: $$apt_install_recommends
|
95
|
+
- upgrade_system:
|
96
|
+
- dist_upgrade: true
|
97
|
+
- install_software:
|
98
|
+
- packages: >
|
99
|
+
debian-keyring ntp zip unzip rsync sudo less vim bash-completion
|
100
|
+
- configure_kernel:
|
101
|
+
- arch: $$arch
|
102
|
+
# Configuration
|
103
|
+
- configure_system:
|
104
|
+
- locales: POSIX C en_US fr_FR de_DE
|
105
|
+
- lang: en_US.UTF-8
|
106
|
+
- timezone: UTC
|
107
|
+
- configure_keyboard:
|
108
|
+
- layout: "us,fr,de"
|
109
|
+
- configure_network:
|
110
|
+
- hostname: kameleon-$$distrib
|
111
|
+
- create_group:
|
112
|
+
- name: admin
|
113
|
+
- create_user:
|
114
|
+
- name: $$user_name
|
115
|
+
- groups: sudo admin
|
116
|
+
- password: $$user_password
|
117
|
+
|
118
|
+
#== Export the generated appliance in the format of your choice
|
119
|
+
export:
|
120
|
+
- save_appliance:
|
121
|
+
- input: $$image_disk
|
122
|
+
- output: $$kameleon_cwd/$$kameleon_recipe_name
|
123
|
+
- save_as_qcow2
|
124
|
+
# - save_as_qed
|
125
|
+
# - save_as_tgz
|
126
|
+
# - save_as_raw
|
127
|
+
# - save_as_vmdk
|
128
|
+
# - save_as_vdi
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#==============================================================================
|
2
|
+
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
|
3
|
+
#==============================================================================
|
4
|
+
#
|
5
|
+
# DESCRIPTION: <MY RECIPE DESCRIPTION>
|
6
|
+
#
|
7
|
+
#==============================================================================
|
8
|
+
|
9
|
+
---
|
10
|
+
extend: <%= @name %>
|
11
|
+
|
12
|
+
global:
|
13
|
+
# You can see the base template `<%= @name %>.yaml` to know the
|
14
|
+
# variables that you can override
|
15
|
+
|
16
|
+
bootstrap:
|
17
|
+
- @base
|
18
|
+
|
19
|
+
setup:
|
20
|
+
- @base
|
21
|
+
|
22
|
+
export:
|
23
|
+
- @base
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#==============================================================================
|
2
|
+
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
|
3
|
+
#==============================================================================
|
4
|
+
#
|
5
|
+
# DESCRIPTION: Fedora Rawhide base system
|
6
|
+
#
|
7
|
+
#==============================================================================
|
8
|
+
|
9
|
+
---
|
10
|
+
extend: fedora20
|
11
|
+
|
12
|
+
global:
|
13
|
+
# Distribution
|
14
|
+
distrib: fedora
|
15
|
+
release: rawhide
|
16
|
+
arch: x86_64
|
17
|
+
|
18
|
+
bootstrap:
|
19
|
+
- liveos_bootstrap:
|
20
|
+
- mirror_distrib_path: fedora/development/$${release}/$$arch/os
|
21
|
+
- initialize_disk_qemu
|
22
|
+
- prepare_qemu
|
23
|
+
- install_bootloader
|
24
|
+
- start_qemu
|
25
|
+
|
26
|
+
setup:
|
27
|
+
- @base
|
28
|
+
|
29
|
+
export:
|
30
|
+
- @base
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#==============================================================================
|
2
|
+
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
|
3
|
+
#==============================================================================
|
4
|
+
#
|
5
|
+
# DESCRIPTION: Fedora 20 GNOME Desktop edition
|
6
|
+
#
|
7
|
+
#==============================================================================
|
8
|
+
|
9
|
+
---
|
10
|
+
extend: fedora20
|
11
|
+
|
12
|
+
bootstrap:
|
13
|
+
- @base
|
14
|
+
|
15
|
+
setup:
|
16
|
+
- @base
|
17
|
+
- install_software:
|
18
|
+
- packages: @x-window-system @gnome-desktop
|
19
|
+
|
20
|
+
export:
|
21
|
+
- @base
|
@@ -0,0 +1,105 @@
|
|
1
|
+
#==============================================================================
|
2
|
+
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
|
3
|
+
#==============================================================================
|
4
|
+
#
|
5
|
+
# DESCRIPTION: Fedora 20 base system
|
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
|
+
|
25
|
+
## QEMU options
|
26
|
+
qemu_enable_kvm: true
|
27
|
+
qemu_cpu: 2
|
28
|
+
qemu_memory_size: 512
|
29
|
+
qemu_monitor_port: 10023
|
30
|
+
qemu_ssh_port: 55423
|
31
|
+
qemu_arch: $$arch
|
32
|
+
|
33
|
+
## Disk options
|
34
|
+
nbd_device: /dev/nbd1
|
35
|
+
image_disk: $$kameleon_cwd/base_$$kameleon_recipe_name.qcow2
|
36
|
+
image_size: 10G
|
37
|
+
filesystem_type: ext4
|
38
|
+
|
39
|
+
# rootfs options
|
40
|
+
rootfs: $$kameleon_cwd/rootfs
|
41
|
+
rootfs_download_path: /var/cache/kameleon/$$distrib/$$release/$$arch/rootfs
|
42
|
+
|
43
|
+
## System variables. Required by kameleon engine
|
44
|
+
# Include specific steps
|
45
|
+
include_steps:
|
46
|
+
- $$distrib/$$release
|
47
|
+
- $$distrib
|
48
|
+
- ""
|
49
|
+
- "archlinux"
|
50
|
+
|
51
|
+
# Shell session from where we launch exec_out commands. There is often a
|
52
|
+
# local bash session, but it can be a remote shell on other machines or on
|
53
|
+
# any shell. (eg. bash, chroot, fakechroot, ssh, tmux, lxc...)
|
54
|
+
out_context:
|
55
|
+
cmd: bash
|
56
|
+
workdir: $$kameleon_cwd
|
57
|
+
|
58
|
+
# Shell session that allows us to connect to the building machine in order to
|
59
|
+
# configure it and setup additional programs
|
60
|
+
ssh_config_file: $$kameleon_cwd/ssh_config
|
61
|
+
in_context:
|
62
|
+
cmd: LC_ALL=POSIX ssh -F $$ssh_config_file $$kameleon_recipe_name -t /bin/bash
|
63
|
+
workdir: /root/kameleon_workdir
|
64
|
+
|
65
|
+
#== Bootstrap the new system and create the 'in_context'
|
66
|
+
bootstrap:
|
67
|
+
- liveos_bootstrap
|
68
|
+
- initialize_disk_qemu
|
69
|
+
- prepare_qemu
|
70
|
+
- install_bootloader
|
71
|
+
- start_qemu
|
72
|
+
|
73
|
+
|
74
|
+
#== Install and configuration steps
|
75
|
+
# WARNING: this part should be independante from the out context (whenever
|
76
|
+
# possible...)
|
77
|
+
setup:
|
78
|
+
- update_system
|
79
|
+
- install_software:
|
80
|
+
- packages: >
|
81
|
+
ntp zip unzip rsync sudo less vim bash-completion wget kernel kernel-devel
|
82
|
+
- configure_system:
|
83
|
+
- locales: POSIX C en_US fr_FR de_DE
|
84
|
+
- lang: en_US.UTF-8
|
85
|
+
- timezone: UTC
|
86
|
+
- configure_keyboard:
|
87
|
+
- layout: "us"
|
88
|
+
- configure_network:
|
89
|
+
- hostname: kameleon-$$distrib
|
90
|
+
- create_user:
|
91
|
+
- name: $$user_name
|
92
|
+
- groups: wheel
|
93
|
+
- password: $$user_password
|
94
|
+
|
95
|
+
# == Export the generated appliance in the format of your choice
|
96
|
+
export:
|
97
|
+
- save_appliance:
|
98
|
+
- input: $$image_disk
|
99
|
+
- output: $$kameleon_cwd/$$kameleon_recipe_name
|
100
|
+
- save_as_qcow2
|
101
|
+
# - save_as_qed
|
102
|
+
# - save_as_tgz
|
103
|
+
# - save_as_raw
|
104
|
+
# - save_as_vmdk
|
105
|
+
# - save_as_vdi
|
@@ -2,11 +2,7 @@
|
|
2
2
|
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
|
3
3
|
#==============================================================================
|
4
4
|
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
# DESCRIPTION: Build a debian wheezy appliance using chroot and qemu-nbd.
|
8
|
-
#
|
9
|
-
# TEMPLATE: <%= @name %>
|
5
|
+
# DESCRIPTION: [deprecated] Build a debian wheezy appliance using chroot and qemu-nbd.
|
10
6
|
#
|
11
7
|
#==============================================================================
|
12
8
|
|
@@ -18,20 +14,29 @@ checkpoint: qcow2.yaml
|
|
18
14
|
#== Global variables use by Kameleon engine and the steps
|
19
15
|
global:
|
20
16
|
## User varibales : used by the recipe
|
21
|
-
cachedir: /var/cache/kameleon
|
22
|
-
rootfs: $$kameleon_cwd/rootfs
|
23
17
|
user_name: kameleon
|
24
|
-
|
25
|
-
|
26
|
-
nbd_device: /dev/nbd10
|
27
|
-
container: "$${kameleon_recipe_name}_temp.qcow2"
|
18
|
+
user_password: $$user_name
|
28
19
|
|
20
|
+
# Distribution
|
29
21
|
distrib: debian
|
30
22
|
release: wheezy
|
23
|
+
arch: amd64
|
24
|
+
|
25
|
+
## Disk options
|
26
|
+
nbd_device: /dev/nbd1
|
27
|
+
image_disk: $$kameleon_cwd/base_$$kameleon_recipe_name.qcow2
|
28
|
+
image_size: 10G
|
29
|
+
filesystem_type: ext4
|
30
|
+
|
31
|
+
# rootfs options
|
32
|
+
rootfs: $$kameleon_cwd/rootfs
|
33
|
+
rootfs_download_path: /var/cache/kameleon/$$distrib/$$release/$$arch/rootfs
|
31
34
|
|
32
35
|
## System variables. Required by kameleon engine
|
33
36
|
# Include specific steps
|
34
|
-
include_steps:
|
37
|
+
include_steps:
|
38
|
+
- $$distrib/$$release
|
39
|
+
- $$distrib
|
35
40
|
|
36
41
|
# Shell session from where we launch exec_out commands. There is often a
|
37
42
|
# local bash session, but it can be a remote shell on other machines or on
|
@@ -42,56 +47,64 @@ global:
|
|
42
47
|
|
43
48
|
# Shell session that allows us to connect to the building machine in order to
|
44
49
|
# configure it and setup additional programs
|
45
|
-
default_env: "USER=root HOME=/root LC_ALL=POSIX"
|
46
50
|
in_context:
|
47
|
-
cmd:
|
48
|
-
workdir: /
|
51
|
+
cmd: USER=root HOME=/root LC_ALL=POSIX chroot $$kameleon_cwd/rootfs bash
|
52
|
+
workdir: /root/kameleon_workdir
|
49
53
|
|
50
54
|
#== Bootstrap the new system and create the 'in_context'
|
51
55
|
bootstrap:
|
52
56
|
- debootstrap:
|
57
|
+
- include_pkg: >
|
58
|
+
ifupdown locales libui-dialog-perl dialog isc-dhcp-client netbase
|
59
|
+
net-tools iproute acpid openssh-server pciutils extlinux
|
60
|
+
linux-image-$$arch
|
53
61
|
- release: $$release
|
54
62
|
- arch: $$arch
|
55
63
|
- repository: http://ftp.fr.debian.org/debian/
|
56
|
-
-
|
57
|
-
-
|
58
|
-
|
59
|
-
|
60
|
-
- filesystem_type: ext4
|
61
|
-
- rootfs_archive: $$cachedir/$$distrib/$$release/$$arch/debootstrap.tar.gz
|
62
|
-
- start_chroot:
|
63
|
-
- rootfs: $$rootfs
|
64
|
-
|
64
|
+
- enable_cache: true
|
65
|
+
- initialize_disk_chroot
|
66
|
+
- start_chroot
|
67
|
+
- install_bootloader
|
65
68
|
|
66
69
|
#== Install and configuration steps
|
67
|
-
# WARNING: this part should be independante from the
|
70
|
+
# WARNING: this part should be independante from the out context (whenever
|
68
71
|
# possible...)
|
69
72
|
setup:
|
70
73
|
# Install
|
71
|
-
-
|
74
|
+
- configure_apt:
|
75
|
+
- enable_contrib_repo: true
|
76
|
+
- enable_nonfree_repo: true
|
77
|
+
- install_recommends: false
|
78
|
+
- upgrade_system:
|
79
|
+
- dist_upgrade: true
|
80
|
+
- install_software:
|
72
81
|
- packages: >
|
73
82
|
debian-keyring ntp zip unzip rsync sudo less vim bash-completion
|
74
|
-
-
|
83
|
+
- configure_kernel:
|
75
84
|
- arch: $$arch
|
76
85
|
# Configuration
|
77
|
-
-
|
78
|
-
- locales: fr_FR
|
79
|
-
- lang:
|
80
|
-
- timezone:
|
81
|
-
-
|
82
|
-
- layout: "fr,
|
83
|
-
-
|
86
|
+
- configure_system:
|
87
|
+
- locales: POSIX C en_US fr_FR de_DE
|
88
|
+
- lang: en_US.UTF-8
|
89
|
+
- timezone: UTC
|
90
|
+
- configure_keyboard:
|
91
|
+
- layout: "us,fr,de"
|
92
|
+
- configure_network:
|
84
93
|
- hostname: kameleon-$$distrib
|
94
|
+
- create_group:
|
95
|
+
- name: admin
|
85
96
|
- create_user:
|
86
97
|
- name: $$user_name
|
87
|
-
-
|
88
|
-
- password: $$
|
98
|
+
- groups: sudo admin
|
99
|
+
- password: $$user_password
|
89
100
|
|
90
101
|
#== Export the generated appliance in the format of your choice
|
91
102
|
export:
|
92
|
-
-
|
93
|
-
-
|
103
|
+
- save_appliance:
|
104
|
+
- input: $(readlink $$image_disk)
|
105
|
+
- output: $$kameleon_cwd/$$kameleon_recipe_name
|
94
106
|
- save_as_qcow2
|
107
|
+
# - save_as_qed
|
95
108
|
# - save_as_tgz
|
96
109
|
# - save_as_raw
|
97
110
|
# - save_as_vmdk
|