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,25 @@
1
+ #==============================================================================
2
+ # vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
3
+ #==============================================================================
4
+ #
5
+ # DESCRIPTION: Debian 7 (Wheezy) GNOME Desktop edition (amd64).
6
+ #
7
+ #==============================================================================
8
+
9
+ ---
10
+ extend: debian7-amd64
11
+
12
+ global:
13
+ # Apt options
14
+ virtualbox_memory_size: 1024
15
+
16
+ bootstrap:
17
+ - @base
18
+
19
+ setup:
20
+ - @base
21
+ - install_gnome:
22
+ - extra_packages: gedit gnome-documents
23
+
24
+ export:
25
+ - @base
@@ -2,26 +2,27 @@
2
2
  # vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
3
3
  #==============================================================================
4
4
  #
5
- # DESCRIPTION: Fedora Rawhide base system
5
+ # DESCRIPTION: Debian 7 (Wheezy) base system (i386)
6
6
  #
7
7
  #==============================================================================
8
8
 
9
9
  ---
10
- extend: fedora20
10
+ extend: debian7-amd64
11
11
 
12
+ #== Global variables use by Kameleon engine and the steps
12
13
  global:
13
14
  # Distribution
14
- distrib: fedora
15
- release: rawhide
16
- arch: x86_64
15
+ arch: i386
16
+ kernel_arch: "686"
17
+
18
+ ## Kameleon iso bootstrap
19
+ boot2kameleon_url: http://kameleon.imag.fr/iso/boot2debian/debian-jessie-i686-insecure.iso
20
+
21
+ ## VirtualBox options
22
+ virtualbox_os_type: Debian
17
23
 
18
24
  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
+ - @base
25
26
 
26
27
  setup:
27
28
  - @base
@@ -0,0 +1,38 @@
1
+ #==============================================================================
2
+ # vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
3
+ #==============================================================================
4
+ #
5
+ # DESCRIPTION: Debian 7 appliance with kameleon (amd64).
6
+ #
7
+ #==============================================================================
8
+
9
+ ---
10
+ extend: debian7-desktop-amd64
11
+
12
+ global:
13
+ # You can see the base template `debian7-desktop-amd64.yaml` to know the
14
+ # variables that you can override
15
+
16
+ bootstrap:
17
+ - @base
18
+
19
+ setup:
20
+ - @base
21
+ - autologin
22
+ - install_software:
23
+ - packages: parted qemu-system debootstrap qemu-utils ruby ruby-childprocess
24
+ - install_kameleon:
25
+ - gem_install:
26
+ - exec_in: gem install kameleon-builder --verbose
27
+ - prepare_export:
28
+ - nullify_freespace:
29
+ - exec_in: rm -rf /tmp/* || true
30
+ - exec_in: rm -rf /var/tmp/* || true
31
+ - exec_in: rm -rf /var/lib/apt/lists/* || true
32
+ - exec_in: |
33
+ echo "Nullify freespace..."
34
+ dd if=/dev/zero of=/bigemptyfile bs=1M 2>&1 >/dev/null || true
35
+ rm -f /bigemptyfile
36
+
37
+ export:
38
+ - @base
@@ -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 (amd64).
6
+ #
7
+ #==============================================================================
8
+
9
+ ---
10
+ extend: debian7-amd64
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
@@ -2,17 +2,17 @@
2
2
  # vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
3
3
  #==============================================================================
4
4
  #
5
- # DESCRIPTION: Debian Testing base system
5
+ # DESCRIPTION: Debian 8 (Jessie) base system (amd64)
6
6
  #
7
7
  #==============================================================================
8
8
 
9
9
  ---
10
- extend: debian7
10
+ extend: debian7-amd64
11
11
 
12
12
  global:
13
13
  # Distribution
14
14
  distrib: debian
15
- release: testing
15
+ release: jessie
16
16
  arch: amd64
17
17
 
18
18
  bootstrap:
@@ -0,0 +1,31 @@
1
+ #==============================================================================
2
+ # vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
3
+ #==============================================================================
4
+ #
5
+ # DESCRIPTION: Debian 8 (Jessie) base system (i386)
6
+ #
7
+ #==============================================================================
8
+
9
+ ---
10
+ extend: debian8-amd64
11
+
12
+ #== Global variables use by Kameleon engine and the steps
13
+ global:
14
+ # Distribution
15
+ arch: i386
16
+ kernel_arch: "686"
17
+
18
+ ## Kameleon iso bootstrap
19
+ boot2kameleon_url: http://kameleon.imag.fr/iso/boot2debian/debian-jessie-i686-insecure.iso
20
+
21
+ ## VirtualBox options
22
+ virtualbox_os_type: Debian
23
+
24
+ bootstrap:
25
+ - @base
26
+
27
+ setup:
28
+ - @base
29
+
30
+ export:
31
+ - @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 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: fedora
22
+ release: 20
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: Fedora_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
+
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/fedora/releases/$$release/Fedora/$$arch/os/Packages/f/
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/fedora/releases/$$release/Fedora/$$arch/os/images/pxeboot/initrd.img
76
+ - pxe_vmlinuz_url: http://mirrors.kernel.org/fedora/releases/$$release/Fedora/$$arch/os/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
@@ -0,0 +1,128 @@
1
+ #==============================================================================
2
+ # vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
3
+ #==============================================================================
4
+ #
5
+ # DESCRIPTION: Ubuntu 12.04 LTS (Precise Pangolin) base system (amd64).
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: ubuntu
22
+ release: precise
23
+ arch: amd64
24
+ kernel_arch: $$arch
25
+ hostname: kameleon-$$distrib
26
+
27
+ ## VirtualBox options
28
+ virtualbox_memory_size: 768
29
+ virtualbox_ssh_port: 55423
30
+ virtualbox_os_type: Ubuntu_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
34
+
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
+
39
+ # rootfs options
40
+ rootfs: /rootfs
41
+ filesystem_type: ext4
42
+
43
+ # Apt options
44
+ apt_repository: http://archive.ubuntu.com/ubuntu/
45
+ apt_enable_restricted: true
46
+
47
+ ## System variables. Required by kameleon engine
48
+ # Include specific steps
49
+ include_steps:
50
+ - $$distrib/$$release
51
+ - $$distrib
52
+ - debian
53
+
54
+ ssh_config_file: $$kameleon_cwd/ssh_config
55
+ out_context:
56
+ cmd: ssh -o ConnectTimeout=1 -F $$ssh_config_file $${kameleon_recipe_name} -t /bin/bash
57
+ workdir: /root/kameleon_workdir
58
+ proxy_cache: 10.0.2.2
59
+
60
+ in_context:
61
+ cmd: ssh -o ConnectTimeout=1 -F $$ssh_config_file $${kameleon_recipe_name} -t chroot $$rootfs /bin/bash
62
+ workdir: /root/kameleon_workdir
63
+ proxy_cache: 10.0.2.2
64
+
65
+ #== Bootstrap the new system and create the 'in_context'
66
+ bootstrap:
67
+ - enable_checkpoint
68
+ - prepare_virtualbox
69
+ - start_virtualbox
70
+ - install_requirements:
71
+ - packages: parted e2fsprogs debootstrap extlinux
72
+ - initialize_disk
73
+ - debootstrap:
74
+ - include_pkg: >
75
+ apt-transport-https ca-certificates less acpid acpi-support kbd bzip2 udev
76
+ locales psmisc linux-image-generic ifupdown iptables iputils-ping
77
+ iproute pciutils isc-dhcp-client openssh-server
78
+ - release: $$release
79
+ - arch: $$arch
80
+ - repository: $$apt_repository
81
+ - variant: minbase
82
+ - switch_context_virtualbox
83
+
84
+
85
+ #== Install and configuration steps
86
+ setup:
87
+ # Install
88
+ - configure_apt:
89
+ - repository: $$apt_repository
90
+ - enable_restricted: $$apt_enable_restricted
91
+ - upgrade_system:
92
+ - dist_upgrade: true
93
+ - install_software:
94
+ - packages: >
95
+ bash-completion curl nano vim language-pack-en extlinux sudo
96
+ - configure_kernel:
97
+ - arch: $$arch
98
+ - install_bootloader
99
+ # Configuration
100
+ - configure_system:
101
+ - locales: POSIX C en_US fr_FR de_DE
102
+ - lang: en_US.UTF-8
103
+ - timezone: UTC
104
+ - configure_keyboard:
105
+ - layout: "us,fr,de"
106
+ - configure_network
107
+ - create_group:
108
+ - name: admin
109
+ - create_user:
110
+ - name: $$user_name
111
+ - groups: sudo admin
112
+ - password: $$user_password
113
+
114
+ #== Export the generated appliance in the format of your choice
115
+ export:
116
+ - disable_checkpoint
117
+ - virtualbox_save_appliance:
118
+ - output: "$$kameleon_cwd/$${kameleon_recipe_name}"
119
+ - save_as_ova
120
+ # - save_as_vdi
121
+ # - save_as_vmdk
122
+ # - save_as_tar_gz
123
+ # - save_as_tar_xz
124
+ # - save_as_tar_bz2
125
+ # - save_as_raw
126
+ # - save_as_qcow2
127
+ # - save_as_qed
128
+ # - save_as_vagrant_box