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.
Files changed (185) hide show
  1. data/.editorconfig +0 -0
  2. data/.env +2 -6
  3. data/CHANGELOG.rst +74 -1
  4. data/Gemfile +20 -2
  5. data/README.rst +35 -25
  6. data/Thorfile +29 -0
  7. data/contrib/kameleon_bashrc.sh +61 -0
  8. data/contrib/polipo_env.sh +3 -2
  9. data/kameleon-builder.gemspec +3 -10
  10. data/lib/kameleon.rb +10 -14
  11. data/lib/kameleon/cli.rb +92 -105
  12. data/lib/kameleon/context.rb +76 -43
  13. data/lib/kameleon/engine.rb +147 -103
  14. data/lib/kameleon/environment.rb +10 -5
  15. data/lib/kameleon/error.rb +1 -32
  16. data/lib/kameleon/persistent_cache.rb +127 -29
  17. data/lib/kameleon/recipe.rb +63 -106
  18. data/lib/kameleon/shell.rb +32 -17
  19. data/lib/kameleon/step.rb +18 -1
  20. data/lib/kameleon/ui.rb +141 -0
  21. data/lib/kameleon/utils.rb +9 -0
  22. data/templates/{debian7-chroot.yaml → chroot/debian7-amd64.yaml} +29 -21
  23. data/templates/{docker-debian7.yaml → docker/debian7.yaml} +5 -5
  24. data/templates/extend.erb +2 -2
  25. data/templates/{debian7-g5k.yaml → grid5000/debian7.yaml} +1 -1
  26. data/templates/{archlinux-desktop.yaml → qemu/archlinux-desktop-i686.yaml} +2 -2
  27. data/templates/qemu/archlinux-desktop-x86_64.yaml +25 -0
  28. data/templates/qemu/archlinux-i686.yaml +25 -0
  29. data/templates/{archlinux.yaml → qemu/archlinux-x86_64.yaml} +37 -34
  30. data/templates/qemu/centos6.5-x86_64.yaml +113 -0
  31. data/templates/qemu/centos7-x86_64.yaml +119 -0
  32. data/templates/{debian7.yaml → qemu/debian7-amd64.yaml} +45 -40
  33. data/templates/{debian7-desktop.yaml → qemu/debian7-desktop-amd64.yaml} +2 -3
  34. data/templates/{debian7-kameleon.yaml → qemu/debian7-kameleon-amd64.yaml} +3 -6
  35. data/templates/{debian7-oar-dev.yaml → qemu/debian7-oar-amd64.yaml} +2 -2
  36. data/templates/qemu/debian8-amd64.yaml +25 -0
  37. data/templates/{fedora20-desktop.yaml → qemu/fedora20-desktop-x86_64.yaml} +2 -2
  38. data/templates/qemu/fedora20-x86_64.yaml +116 -0
  39. data/templates/{ubuntu-12.04.yaml → qemu/ubuntu-12.04-amd64.yaml} +42 -38
  40. data/templates/{ubuntu-12.04-desktop.yaml → qemu/ubuntu-12.04-desktop-amd64.yaml} +3 -3
  41. data/templates/{ubuntu-14.04.yaml → qemu/ubuntu-14.04-amd64.yaml} +2 -2
  42. data/templates/{ubuntu-14.04-desktop.yaml → qemu/ubuntu-14.04-desktop-amd64.yaml} +2 -2
  43. data/templates/steps/aliases/defaults.yaml +19 -13
  44. data/templates/steps/bootstrap/archlinux/arch_bootstrap.yaml +11 -19
  45. data/templates/steps/bootstrap/debian/debootstrap.yaml +10 -11
  46. data/templates/steps/bootstrap/debian/debootstrap_arm.yaml +11 -19
  47. data/templates/steps/bootstrap/fedora/init_pxeboot.yaml +13 -0
  48. data/templates/steps/bootstrap/fedora/yum_bootstrap.yaml +45 -0
  49. data/templates/steps/bootstrap/initialize_disk.yaml +16 -0
  50. data/templates/steps/bootstrap/initialize_disk_chroot.yaml +10 -14
  51. data/templates/steps/bootstrap/install_requirements.yaml +3 -0
  52. data/templates/steps/bootstrap/prepare_docker.yaml +7 -7
  53. data/templates/steps/bootstrap/prepare_qemu.yaml +20 -26
  54. data/templates/steps/bootstrap/prepare_virtualbox.yaml +63 -0
  55. data/templates/steps/bootstrap/start_chroot.yaml +2 -13
  56. data/templates/steps/bootstrap/start_qemu.yaml +50 -53
  57. data/templates/steps/bootstrap/start_virtualbox.yaml +37 -0
  58. data/templates/steps/bootstrap/switch_context_qemu.yaml +64 -0
  59. data/templates/steps/bootstrap/switch_context_virtualbox.yaml +66 -0
  60. data/templates/steps/breakpoint.yaml +2 -1
  61. data/templates/steps/checkpoints/docker.yaml +14 -11
  62. data/templates/steps/checkpoints/qcow2.yaml +26 -24
  63. data/templates/steps/checkpoints/qemu.yaml +30 -36
  64. data/templates/steps/checkpoints/virtualbox.yaml +21 -0
  65. data/templates/steps/disable_checkpoint.yaml +3 -0
  66. data/templates/steps/enable_checkpoint.yaml +5 -0
  67. data/templates/steps/export/qemu_save_appliance.yaml +52 -0
  68. data/templates/steps/export/virtualbox_save_appliance.yaml +67 -0
  69. data/templates/steps/setup/archlinux/install_bootloader.yaml +23 -0
  70. data/templates/steps/setup/centos/6.5/configure_network.yaml +31 -0
  71. data/templates/steps/setup/centos/6.5/configure_system.yaml +27 -0
  72. data/templates/steps/setup/debian/configure_apt.yaml +1 -6
  73. data/templates/steps/setup/debian/configure_kernel.yaml +0 -5
  74. data/templates/steps/setup/debian/install_bootloader.yaml +36 -0
  75. data/templates/steps/setup/debian/setup_vagrant_box.yaml +48 -18
  76. data/templates/steps/setup/debian/upgrade_system.yaml +2 -7
  77. data/templates/steps/setup/fedora/configure_kernel.yaml +9 -0
  78. data/templates/steps/setup/fedora/configure_keyboard.yaml +12 -0
  79. data/templates/steps/setup/fedora/configure_network.yaml +9 -1
  80. data/templates/steps/setup/fedora/configure_system.yaml +20 -45
  81. data/templates/steps/setup/fedora/install_bootloader.yaml +58 -0
  82. data/templates/steps/setup/fedora/minimal_install.yaml +3 -0
  83. data/templates/steps/setup/fedora/update_system.yaml +13 -5
  84. data/templates/steps/setup/ubuntu/configure_apt.yaml +4 -9
  85. data/templates/vagrant/debian7-amd64.yaml +130 -0
  86. data/templates/virtualbox/archlinux-desktop-i686.yaml +25 -0
  87. data/templates/virtualbox/archlinux-desktop-x86_64.yaml +28 -0
  88. data/templates/virtualbox/archlinux-i686.yaml +28 -0
  89. data/templates/virtualbox/archlinux-x86_64.yaml +109 -0
  90. data/templates/virtualbox/centos6.5-i386.yaml +39 -0
  91. data/templates/virtualbox/centos6.5-x86_64.yaml +111 -0
  92. data/templates/virtualbox/centos7-x86_64.yaml +116 -0
  93. data/{docs/source/debian7.yaml → templates/virtualbox/debian7-amd64.yaml} +53 -52
  94. data/templates/virtualbox/debian7-desktop-amd64.yaml +25 -0
  95. data/templates/{fedora-rawhide.yaml → virtualbox/debian7-i386.yaml} +12 -11
  96. data/templates/virtualbox/debian7-kameleon-amd64.yaml +38 -0
  97. data/templates/virtualbox/debian7-oar-amd64.yaml +51 -0
  98. data/templates/{debian-testing.yaml → virtualbox/debian8-amd64.yaml} +3 -3
  99. data/templates/virtualbox/debian8-i386.yaml +31 -0
  100. data/templates/virtualbox/fedora20-x86_64.yaml +116 -0
  101. data/templates/virtualbox/ubuntu-12.04-amd64.yaml +128 -0
  102. data/templates/virtualbox/ubuntu-12.04-desktop-amd64.yaml +25 -0
  103. data/templates/virtualbox/ubuntu-14.04-amd64.yaml +25 -0
  104. data/templates/virtualbox/ubuntu-14.04-desktop-amd64.yaml +27 -0
  105. data/version.txt +1 -1
  106. metadata +67 -212
  107. data/Rakefile +0 -24
  108. data/docs/.gitignore +0 -1
  109. data/docs/Makefile +0 -181
  110. data/docs/README.md +0 -17
  111. data/docs/make.bat +0 -242
  112. data/docs/source/_static/.gitignore +0 -0
  113. data/docs/source/_static/centos.png +0 -0
  114. data/docs/source/_static/debian.png +0 -0
  115. data/docs/source/_static/kameleon-logo.png +0 -0
  116. data/docs/source/_static/kameleon-logo.xcf +0 -0
  117. data/docs/source/_static/kameleon-long.png +0 -0
  118. data/docs/source/_static/ubuntu.png +0 -0
  119. data/docs/source/_themes/sphinx_rtd_theme/__init__.py +0 -17
  120. data/docs/source/_themes/sphinx_rtd_theme/breadcrumbs.html +0 -19
  121. data/docs/source/_themes/sphinx_rtd_theme/footer.html +0 -32
  122. data/docs/source/_themes/sphinx_rtd_theme/layout.html +0 -160
  123. data/docs/source/_themes/sphinx_rtd_theme/layout_old.html +0 -205
  124. data/docs/source/_themes/sphinx_rtd_theme/search.html +0 -50
  125. data/docs/source/_themes/sphinx_rtd_theme/searchbox.html +0 -7
  126. data/docs/source/_themes/sphinx_rtd_theme/static/css/badge_only.css +0 -1
  127. data/docs/source/_themes/sphinx_rtd_theme/static/css/theme.css +0 -4
  128. data/docs/source/_themes/sphinx_rtd_theme/static/fonts/FontAwesome.otf +0 -0
  129. data/docs/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot +0 -0
  130. data/docs/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.svg +0 -414
  131. data/docs/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf +0 -0
  132. data/docs/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff +0 -0
  133. data/docs/source/_themes/sphinx_rtd_theme/static/js/theme.js +0 -47
  134. data/docs/source/_themes/sphinx_rtd_theme/theme.conf +0 -8
  135. data/docs/source/_themes/sphinx_rtd_theme/versions.html +0 -37
  136. data/docs/source/aliases.rst +0 -31
  137. data/docs/source/atlas_debian_g5k.yaml +0 -36
  138. data/docs/source/checkpoint.rst +0 -30
  139. data/docs/source/commands.rst +0 -63
  140. data/docs/source/conf.py +0 -262
  141. data/docs/source/context.rst +0 -47
  142. data/docs/source/debian_customized.yaml +0 -28
  143. data/docs/source/debian_customized_g5k.yaml +0 -21
  144. data/docs/source/faq.rst +0 -43
  145. data/docs/source/getting_started.rst +0 -260
  146. data/docs/source/grid5000_tutorial.rst +0 -525
  147. data/docs/source/index.rst +0 -53
  148. data/docs/source/install_atlas.yaml +0 -25
  149. data/docs/source/install_hpl.yaml +0 -24
  150. data/docs/source/installation.rst +0 -51
  151. data/docs/source/persistent_cache.rst +0 -34
  152. data/docs/source/recipe.rst +0 -177
  153. data/docs/source/tau_install.yaml +0 -19
  154. data/docs/source/tau_install_g5k.yaml +0 -25
  155. data/docs/source/use_cases.rst +0 -93
  156. data/docs/source/workspace.rst +0 -13
  157. data/lib/kameleon/logger.rb +0 -56
  158. data/omnibus/.gitignore +0 -11
  159. data/omnibus/.kitchen.yml +0 -25
  160. data/omnibus/Berksfile +0 -9
  161. data/omnibus/Berksfile.lock +0 -25
  162. data/omnibus/Gemfile +0 -12
  163. data/omnibus/README.md +0 -94
  164. data/omnibus/config/projects/kameleon.rb +0 -23
  165. data/omnibus/config/software/kameleon.rb +0 -24
  166. data/omnibus/config/software/polipo.rb +0 -30
  167. data/omnibus/config/software/ruby.rb +0 -158
  168. data/omnibus/files/mac_dmg/Resources/background.png +0 -0
  169. data/omnibus/files/mac_dmg/Resources/icon.png +0 -0
  170. data/omnibus/files/mac_pkg/Resources/background.png +0 -0
  171. data/omnibus/files/mac_pkg/Resources/license.html +0 -1
  172. data/omnibus/files/mac_pkg/Resources/welcome.html +0 -9
  173. data/omnibus/omnibus.rb +0 -27
  174. data/omnibus/package-scripts/kameleon/makeselfinst +0 -27
  175. data/omnibus/package-scripts/kameleon/postrm +0 -9
  176. data/templates/fedora20.yaml +0 -105
  177. data/templates/steps/bootstrap/archlinux/install_bootloader.yaml +0 -46
  178. data/templates/steps/bootstrap/archlinux/populate_disk.yaml +0 -39
  179. data/templates/steps/bootstrap/fedora/liveos_bootstrap.yaml +0 -123
  180. data/templates/steps/bootstrap/initialize_disk_qemu.yaml +0 -72
  181. data/templates/steps/bootstrap/install_bootloader.yaml +0 -42
  182. data/templates/steps/bootstrap/ubuntu/debootstrap.yaml +0 -27
  183. data/templates/steps/export/save_appliance.yaml +0 -58
  184. data/templates/steps/export/save_vagrant_box.yaml +0 -29
  185. data/templates/vagrant-debian7.yaml +0 -31
@@ -0,0 +1,28 @@
1
+ #==============================================================================
2
+ # vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
3
+ #==============================================================================
4
+ #
5
+ # DESCRIPTION: Archlinux base system system (i686).
6
+ #
7
+ #==============================================================================
8
+
9
+ ---
10
+ extend: archlinux-x86_64
11
+
12
+ #== Global variables use by Kameleon engine and the steps
13
+ global:
14
+ # Distribution
15
+ arch: i686
16
+
17
+ ## VirtualBox options
18
+ virtualbox_os_type: Linux
19
+
20
+
21
+ bootstrap:
22
+ - @base
23
+
24
+ setup:
25
+ - @base
26
+
27
+ export:
28
+ - @base
@@ -0,0 +1,109 @@
1
+ #==============================================================================
2
+ # vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
3
+ #==============================================================================
4
+ #
5
+ # DESCRIPTION: Archlinux base system system (x86_64)..
6
+ #
7
+ #==============================================================================
8
+
9
+ ---
10
+ # Loads some helpful aliases
11
+ aliases: defaults.yaml
12
+ # Enables virtualbox checkpoint
13
+ checkpoint: virtualbox.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: archlinux
22
+ arch: x86_64
23
+ hostname: kameleon-$$distrib
24
+
25
+ ## VirtualBox options
26
+ virtualbox_memory_size: 768
27
+ virtualbox_ssh_port: 55423
28
+ virtualbox_os_type: Linux_64
29
+ virtualbox_vmid: $${kameleon_recipe_name}_$${kameleon_short_uuid}
30
+ virtualbox_image_size: 10000 ## megabytes = 10G
31
+ virtualbox_image_disk: $$kameleon_cwd/base_$$kameleon_recipe_name.vdi
32
+
33
+ ## Kameleon iso bootstrap
34
+ boot2kameleon_url: http://kameleon.imag.fr/iso/boot2debian/debian-jessie-$${arch}-insecure.iso
35
+ insecure_ssh_key_url: http://kameleon.imag.fr/iso/boot2debian/keys/insecure_id_rsa
36
+
37
+ # rootfs options
38
+ rootfs: /rootfs
39
+ filesystem_type: ext4
40
+
41
+ ## System variables. Required by kameleon engine
42
+ # Include specific steps
43
+ include_steps:
44
+ - $$distrib
45
+
46
+ ssh_config_file: $$kameleon_cwd/ssh_config
47
+ out_context:
48
+ cmd: ssh -F $$ssh_config_file $${kameleon_recipe_name} -t /bin/bash
49
+ workdir: /root/kameleon_workdir
50
+ proxy_cache: 10.0.2.2
51
+
52
+ in_context:
53
+ cmd: ssh -F $$ssh_config_file $${kameleon_recipe_name} -t chroot $$rootfs /bin/bash
54
+ workdir: /root/kameleon_workdir
55
+ proxy_cache: 10.0.2.2
56
+
57
+ #== Bootstrap the new system and create the 'in_context'
58
+ bootstrap:
59
+ - enable_checkpoint
60
+ - prepare_virtualbox
61
+ - start_virtualbox
62
+ - install_requirements:
63
+ - packages: parted e2fsprogs wget
64
+ - initialize_disk:
65
+ - disk_device: /dev/sda
66
+ - arch_bootstrap:
67
+ - mirror: http://mir.archlinux.fr/
68
+ # You can choose any group from https://www.archlinux.org/groups/
69
+ # It's recommended to use 'base' (default) or 'base-devel' (with dev tools)
70
+ - pkg_group: base
71
+ - start_chroot
72
+
73
+ #== Install and configuration steps
74
+ # WARNING: this part should be independante from the out context (whenever
75
+ # possible...)
76
+ setup:
77
+ # Install
78
+ - install_software:
79
+ - packages: ntp zip unzip rsync sudo vim bash-completion syslinux
80
+ - install_bootloader
81
+ # Configuration
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
+ # set to english keyboard use 'localectl list-keymaps' to see available list
88
+ - layout: en
89
+ - configure_network
90
+ - create_user:
91
+ - name: $$user_name
92
+ - groups: wheel
93
+ - password: $$user_name
94
+
95
+ #== Export the generated appliance in the format of your choice
96
+ export:
97
+ - disable_checkpoint
98
+ - virtualbox_save_appliance:
99
+ - output: "$$kameleon_cwd/$${kameleon_recipe_name}"
100
+ - save_as_ova
101
+ # - save_as_vdi
102
+ # - save_as_vmdk
103
+ # - save_as_tar_gz
104
+ # - save_as_tar_xz
105
+ # - save_as_tar_bz2
106
+ # - save_as_raw
107
+ # - save_as_qcow2
108
+ # - save_as_qed
109
+ # - save_as_vagrant_box
@@ -0,0 +1,39 @@
1
+ #==============================================================================
2
+ # vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
3
+ #==============================================================================
4
+ #
5
+ # DESCRIPTION: Centos 6.5 base system (i386)
6
+ #
7
+ #==============================================================================
8
+
9
+ ---
10
+ extend: centos6.5-x86_64
11
+
12
+ global:
13
+ ## User varibales : used by the recipe
14
+ user_name: kameleon
15
+ user_password: $$user_name
16
+
17
+ # Distribution
18
+ distrib: centos
19
+ release: 6.5
20
+ arch: i386
21
+ hostname: kameleon-$$distrib
22
+
23
+ ## VirtualBox options
24
+ virtualbox_os_type: Linux
25
+
26
+ ## Kameleon iso bootstrap
27
+ boot2kameleon_url: http://kameleon.imag.fr/iso/boot2debian/debian-jessie-i686-insecure.iso
28
+
29
+ #== Bootstrap the new system and create the 'in_context'
30
+ bootstrap:
31
+ - @base
32
+
33
+ #== Install and configuration steps
34
+ setup:
35
+ - @base
36
+
37
+ #== Export the generated appliance in the format of your choice
38
+ export:
39
+ - @base
@@ -0,0 +1,111 @@
1
+ #==============================================================================
2
+ # vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
3
+ #==============================================================================
4
+ #
5
+ # DESCRIPTION: Centos 6.5 base system (x86_64)
6
+ #
7
+ #==============================================================================
8
+
9
+ ---
10
+ # Loads some helpful aliases
11
+ aliases: defaults.yaml
12
+ # Enables virtualbox checkpoint
13
+ checkpoint: virtualbox.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: centos
22
+ release: 6.5
23
+ arch: x86_64
24
+ hostname: kameleon-$$distrib
25
+
26
+ ## VirtualBox options
27
+ virtualbox_memory_size: 768
28
+ virtualbox_ssh_port: 55423
29
+ virtualbox_os_type: Linux_64
30
+ virtualbox_vmid: $${kameleon_recipe_name}_$${kameleon_short_uuid}
31
+ virtualbox_image_size: 10000 ## megabytes
32
+ virtualbox_image_disk: $$kameleon_cwd/base_$$kameleon_recipe_name.vdi
33
+
34
+ ## Kameleon iso bootstrap
35
+ boot2kameleon_url: http://kameleon.imag.fr/iso/boot2debian/debian-jessie-$${arch}-insecure.iso
36
+ insecure_ssh_key_url: http://kameleon.imag.fr/iso/boot2debian/keys/insecure_id_rsa
37
+
38
+ ## Rootfs options
39
+ rootfs: /rootfs
40
+ filesystem_type: ext4
41
+ disk_device: /dev/sda
42
+
43
+ ## System variables. Required by kameleon engine
44
+ # Include specific steps
45
+ include_steps:
46
+ - $$distrib/$$release
47
+ - $$distrib
48
+ - "fedora"
49
+
50
+ disable_selinux: true
51
+ ssh_config_file: $$kameleon_cwd/ssh_config
52
+ out_context:
53
+ cmd: ssh -F $$ssh_config_file $${kameleon_recipe_name} -t /bin/bash
54
+ workdir: /root/kameleon_workdir
55
+ proxy_cache: 10.0.2.2
56
+
57
+ in_context:
58
+ cmd: ssh -F $$ssh_config_file $${kameleon_recipe_name} -t chroot $$rootfs /bin/bash
59
+ workdir: /root/kameleon_workdir
60
+ proxy_cache: 10.0.2.2
61
+
62
+ bootstrap:
63
+ - enable_checkpoint
64
+ - prepare_virtualbox
65
+ - start_virtualbox
66
+ - install_requirements:
67
+ - packages: parted e2fsprogs yum rpm lynx
68
+ - initialize_disk:
69
+ - yum_bootstrap:
70
+ - mirror_packages_url: http://mirrors.kernel.org/$$distrib/$$release/os/$$arch/Packages/
71
+ - include_pkgs: findutils util-linux
72
+ - start_chroot
73
+
74
+ #== Install and configuration steps
75
+ setup:
76
+ - configure_kernel
77
+ - update_system
78
+ - minimal_install
79
+ - install_software:
80
+ - packages: >
81
+ kernel kernel-devel syslinux-extlinux bash-completion kbd dhclient
82
+ sudo openssh-server openssh-clients ntp ntpdate dhclient
83
+ net-tools NetworkManager
84
+ - install_bootloader
85
+ - configure_system:
86
+ - locales: POSIX C en_US fr_FR de_DE
87
+ - lang: en_US.UTF-8
88
+ - timezone: UTC
89
+ - configure_keyboard:
90
+ - layout: "us"
91
+ - configure_network
92
+ - create_user:
93
+ - name: $$user_name
94
+ - groups: wheel
95
+ - password: $$user_password
96
+
97
+ #== Export the generated appliance in the format of your choice
98
+ export:
99
+ - disable_checkpoint
100
+ - virtualbox_save_appliance:
101
+ - output: "$$kameleon_cwd/$${kameleon_recipe_name}"
102
+ - save_as_ova
103
+ # - save_as_vdi
104
+ # - save_as_vmdk
105
+ # - save_as_tar_gz
106
+ # - save_as_tar_xz
107
+ # - save_as_tar_bz2
108
+ # - save_as_raw
109
+ # - save_as_qcow2
110
+ # - save_as_qed
111
+ # - save_as_vagrant_box
@@ -0,0 +1,116 @@
1
+ #==============================================================================
2
+ # vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
3
+ #==============================================================================
4
+ #
5
+ # DESCRIPTION: Centos 7 base system (x86_64)
6
+ #
7
+ #==============================================================================
8
+
9
+ ---
10
+ # Loads some helpful aliases
11
+ aliases: defaults.yaml
12
+ # Enables virtualbox checkpoint
13
+ checkpoint: virtualbox.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: centos
22
+ release: 7
23
+ arch: x86_64
24
+ hostname: kameleon-$$distrib
25
+
26
+ ## VirtualBox options
27
+ virtualbox_memory_size: 768
28
+ virtualbox_ssh_port: 55423
29
+ virtualbox_os_type: Linux_64
30
+ virtualbox_vmid: $${kameleon_recipe_name}_$${kameleon_short_uuid}
31
+ virtualbox_image_size: 10000 ## megabytes
32
+ virtualbox_image_disk: $$kameleon_cwd/base_$$kameleon_recipe_name.vdi
33
+
34
+ ## Kameleon iso bootstrap
35
+ boot2kameleon_url: http://kameleon.imag.fr/iso/boot2debian/debian-jessie-$${arch}-insecure.iso
36
+ insecure_ssh_key_url: http://kameleon.imag.fr/iso/boot2debian/keys/insecure_id_rsa
37
+
38
+ ## Rootfs options
39
+ rootfs: /rootfs
40
+ filesystem_type: ext4
41
+ disk_device: /dev/sda
42
+
43
+ # Include specific steps
44
+ include_steps:
45
+ - $$distrib/$$release
46
+ - $$distrib
47
+ - "fedora"
48
+
49
+ disable_selinux: true
50
+ ssh_config_file: $$kameleon_cwd/ssh_config
51
+ out_context:
52
+ cmd: ssh -F $$ssh_config_file $${kameleon_recipe_name} -t /bin/bash
53
+ workdir: /root/kameleon_workdir
54
+ proxy_cache: 10.0.2.2
55
+
56
+ in_context:
57
+ cmd: ssh -F $$ssh_config_file $${kameleon_recipe_name} -t /bin/bash
58
+ workdir: /root/kameleon_workdir
59
+ proxy_cache: 10.0.2.2
60
+
61
+ #== Bootstrap the new system and create the 'in_context'
62
+ bootstrap:
63
+ - enable_checkpoint
64
+ - prepare_virtualbox
65
+ - start_virtualbox
66
+ - install_requirements:
67
+ - packages: parted e2fsprogs yum rpm lynx extlinux
68
+ - initialize_disk
69
+ - yum_bootstrap:
70
+ - mirror_packages_url: http://mirrors.kernel.org/$$distrib/$$release/os/$$arch/Packages/
71
+ - include_pkgs: >
72
+ findutils yum util-linux dhclient vim-minimal net-tools NetworkManager
73
+ openssh-server
74
+ - init_pxeboot:
75
+ - pxe_initrd_url: http://mirrors.kernel.org/$$distrib/$$release/os/$$arch/images/pxeboot/initrd.img
76
+ - pxe_vmlinuz_url: http://mirrors.kernel.org/$$distrib/$$release/os/$$arch/images/pxeboot/vmlinuz
77
+ - switch_context_virtualbox
78
+
79
+ #== Install and configuration steps
80
+ setup:
81
+ - configure_kernel
82
+ - update_system
83
+ - minimal_install
84
+ - install_software:
85
+ - packages: >
86
+ kernel bash-completion kbd sudo openssh-clients syslinux-extlinux acpid
87
+ ntp ntpdate
88
+ - install_bootloader
89
+ - configure_system:
90
+ - locales: POSIX C en_US fr_FR de_DE
91
+ - lang: en_US.UTF-8
92
+ - timezone: UTC
93
+ - configure_keyboard:
94
+ - layout: "us"
95
+ - configure_network:
96
+ - hostname: kameleon-$$distrib
97
+ - create_user:
98
+ - name: $$user_name
99
+ - groups: wheel
100
+ - password: $$user_password
101
+
102
+ #== Export the generated appliance in the format of your choice
103
+ export:
104
+ - disable_checkpoint
105
+ - virtualbox_save_appliance:
106
+ - output: "$$kameleon_cwd/$${kameleon_recipe_name}"
107
+ - save_as_ova
108
+ # - save_as_vdi
109
+ # - save_as_vmdk
110
+ # - save_as_tar_gz
111
+ # - save_as_tar_xz
112
+ # - save_as_tar_bz2
113
+ # - save_as_raw
114
+ # - save_as_qcow2
115
+ # - save_as_qed
116
+ # - save_as_vagrant_box
@@ -2,15 +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) 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
- # Enables qemu checkpoint
13
- checkpoint: qemu.yaml
12
+ # Enables virtualbox checkpoint
13
+ checkpoint: virtualbox.yaml
14
14
  #== Global variables use by Kameleon engine and the steps
15
15
  global:
16
16
  ## User varibales : used by the recipe
@@ -21,24 +21,24 @@ global:
21
21
  distrib: debian
22
22
  release: wheezy
23
23
  arch: amd64
24
+ kernel_arch: $$arch
25
+ hostname: kameleon-$$distrib
24
26
 
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
27
+ ## VirtualBox options
28
+ virtualbox_memory_size: 768
29
+ virtualbox_ssh_port: 55423
30
+ virtualbox_os_type: Debian_64
31
+ virtualbox_vmid: $${kameleon_recipe_name}_$${kameleon_short_uuid}
32
+ virtualbox_image_size: 10000 ## megabytes
33
+ virtualbox_image_disk: $$kameleon_cwd/base_$$kameleon_recipe_name.vdi
32
34
 
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
35
+ ## Kameleon iso bootstrap
36
+ boot2kameleon_url: http://kameleon.imag.fr/iso/boot2debian/debian-jessie-x86_64-insecure.iso
37
+ insecure_ssh_key_url: http://kameleon.imag.fr/iso/boot2debian/keys/insecure_id_rsa
38
38
 
39
- # rootfs options
40
- rootfs: $$kameleon_cwd/rootfs
41
- rootfs_download_path: /var/cache/kameleon/$$distrib/$$release/$$arch/rootfs
39
+ ## Rootfs options
40
+ rootfs: /rootfs
41
+ filesystem_type: ext4
42
42
 
43
43
  ## System variables. Required by kameleon engine
44
44
  # Include specific steps
@@ -50,55 +50,53 @@ global:
50
50
  apt_repository: http://ftp.debian.org/debian/
51
51
  apt_enable_contrib: true
52
52
  apt_enable_nonfree: true
53
- apt_install_recommends: false
54
53
 
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...)
54
+ ssh_config_file: $$kameleon_cwd/ssh_config
58
55
  out_context:
59
- cmd: bash
60
- workdir: $$kameleon_cwd
56
+ cmd: ssh -F $$ssh_config_file $${kameleon_recipe_name} -t /bin/bash
57
+ workdir: /root/kameleon_workdir
58
+ proxy_cache: 10.0.2.2
61
59
 
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
60
  in_context:
66
- cmd: LC_ALL=POSIX ssh -F $$ssh_config_file $$kameleon_recipe_name -t /bin/bash
61
+ cmd: ssh -F $$ssh_config_file $${kameleon_recipe_name} -t chroot $$rootfs /bin/bash
67
62
  workdir: /root/kameleon_workdir
63
+ proxy_cache: 10.0.2.2
68
64
 
69
65
  #== Bootstrap the new system and create the 'in_context'
70
66
  bootstrap:
67
+ - enable_checkpoint
68
+ - prepare_virtualbox
69
+ - start_virtualbox
70
+ - install_requirements:
71
+ - packages: parted e2fsprogs debootstrap
72
+ - initialize_disk:
73
+ - disk_device: /dev/sda
71
74
  - 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
75
+ - include_pkg: apt-utils ca-certificates locales less
76
76
  - release: $$release
77
77
  - arch: $$arch
78
78
  - repository: $$apt_repository
79
79
  - enable_cache: true
80
- - initialize_disk_qemu
81
- - prepare_qemu
82
- - install_bootloader
83
- - start_qemu
80
+ - variant: minbase
81
+ - start_chroot
84
82
 
85
83
  #== Install and configuration steps
86
- # WARNING: this part should be independante from the out context (whenever
87
- # possible...)
88
84
  setup:
89
85
  # Install
90
86
  - configure_apt:
91
87
  - repository: $$apt_repository
92
88
  - enable_contrib_repo: $$apt_enable_contrib
93
89
  - enable_nonfree_repo: $$apt_enable_nonfree
94
- - install_recommends: $$apt_install_recommends
95
90
  - upgrade_system:
96
91
  - dist_upgrade: true
97
92
  - install_software:
98
93
  - packages: >
99
- debian-keyring ntp rsync sudo less vim bash-completion
100
- - configure_kernel:
101
- - arch: $$arch
94
+ debian-keyring ntp sudo less vim bash-completion curl less acpid
95
+ linux-image-$$kernel_arch isc-dhcp-client isc-dhcp-common ifupdown
96
+ iptables iputils-ping iproute pciutils psmisc extlinux acpid
97
+ acpi-support-base dialog htop tree openssh-server
98
+ - configure_kernel
99
+ - install_bootloader
102
100
  # Configuration
103
101
  - configure_system:
104
102
  - locales: POSIX C en_US fr_FR de_DE
@@ -106,8 +104,7 @@ setup:
106
104
  - timezone: UTC
107
105
  - configure_keyboard:
108
106
  - layout: "us,fr,de"
109
- - configure_network:
110
- - hostname: kameleon-$$distrib
107
+ - configure_network
111
108
  - create_group:
112
109
  - name: admin
113
110
  - create_user:
@@ -117,12 +114,16 @@ setup:
117
114
 
118
115
  #== Export the generated appliance in the format of your choice
119
116
  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
117
+ - disable_checkpoint
118
+ - virtualbox_save_appliance:
119
+ - output: "$$kameleon_cwd/$${kameleon_recipe_name}"
120
+ - save_as_ova
128
121
  # - save_as_vdi
122
+ # - save_as_vmdk
123
+ # - save_as_tar_gz
124
+ # - save_as_tar_xz
125
+ # - save_as_tar_bz2
126
+ # - save_as_raw
127
+ # - save_as_qcow2
128
+ # - save_as_qed
129
+ # - save_as_vagrant_box