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
@@ -28,7 +28,7 @@ global:
28
28
  docker_hostname: $$kameleon_recipe_name
29
29
 
30
30
  # rootfs options
31
- rootfs_download_path: /var/cache/kameleon/$$distrib/$$release/$$arch/rootfs
31
+ rootfs: $$kameleon_cwd/rootfs
32
32
 
33
33
  ## System variables. Required by kameleon engine
34
34
  # Include specific steps
@@ -40,7 +40,6 @@ global:
40
40
  apt_repository: http://ftp.debian.org/debian/
41
41
  apt_enable_contrib: true
42
42
  apt_enable_nonfree: true
43
- apt_install_recommends: false
44
43
 
45
44
  # Shell session from where we launch exec_out commands. There is often a
46
45
  # local bash session, but it can be a remote shell on other machines or on
@@ -48,6 +47,7 @@ global:
48
47
  out_context:
49
48
  cmd: bash
50
49
  workdir: $$kameleon_cwd
50
+ proxy_cache: localhost
51
51
 
52
52
  # Shell session that allows us to connect to the building machine in order to
53
53
  # configure it and setup additional programs
@@ -55,6 +55,7 @@ global:
55
55
  in_context:
56
56
  cmd: LC_ALL=POSIX ssh -F $$ssh_config_file $$kameleon_recipe_name -t /bin/bash
57
57
  workdir: /root/kameleon_workdir
58
+ proxy_cache: 172.17.42.1
58
59
 
59
60
  #== Bootstrap the new system and create the 'in_context'
60
61
  bootstrap:
@@ -66,7 +67,7 @@ bootstrap:
66
67
  - release: $$release
67
68
  - arch: $$arch
68
69
  - repository: $$apt_repository
69
- - enable_cache: true
70
+ - variant: minbase
70
71
  - prepare_docker
71
72
  - start_docker
72
73
 
@@ -80,7 +81,6 @@ setup:
80
81
  - repository: $$apt_repository
81
82
  - enable_contrib_repo: $$apt_enable_contrib
82
83
  - enable_nonfree_repo: $$apt_enable_nonfree
83
- - install_recommends: $$apt_install_recommends
84
84
  - upgrade_system:
85
85
  - dist_upgrade: true
86
86
  - install_software:
@@ -104,4 +104,4 @@ setup:
104
104
  export:
105
105
  - save_docker_appliance:
106
106
  - commit:
107
- - exec_out: docker commit $(cat MAIN_CONTAINER_ID) -t $$kameleon_recipe_name:latest
107
+ - exec_out: docker commit $(cat MAIN_CONTAINER_ID) $$kameleon_recipe_name:latest
data/templates/extend.erb CHANGED
@@ -7,10 +7,10 @@
7
7
  #==============================================================================
8
8
 
9
9
  ---
10
- extend: <%= @name %>
10
+ extend: <%= tpl.relative_path %>
11
11
 
12
12
  global:
13
- # You can see the base template `<%= @name %>.yaml` to know the
13
+ # You can see the base template `<%= tpl.relative_path %>.yaml` to know the
14
14
  # variables that you can override
15
15
 
16
16
  bootstrap:
@@ -67,7 +67,7 @@ setup:
67
67
  - configure_apt:
68
68
  - enable_contrib_repo: true
69
69
  - enable_nonfree_repo: true
70
- - install_recommends: false
70
+
71
71
  - upgrade_system:
72
72
  - dist_upgrade: true
73
73
  - install_software:
@@ -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: Archlinux GNOME Desktop edition.
5
+ # DESCRIPTION: Archlinux GNOME Desktop edition (i686).
6
6
  #
7
7
  #==============================================================================
8
8
 
9
9
  ---
10
- extend: archlinux
10
+ extend: archlinux-i686
11
11
 
12
12
  bootstrap:
13
13
  - @base
@@ -0,0 +1,25 @@
1
+ #==============================================================================
2
+ # vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
3
+ #==============================================================================
4
+ #
5
+ # DESCRIPTION: Archlinux GNOME Desktop edition (x86_64).
6
+ #
7
+ #==============================================================================
8
+
9
+ ---
10
+ extend: archlinux-x86_64
11
+
12
+ bootstrap:
13
+ - @base
14
+
15
+ setup:
16
+ - @base
17
+ - install_yaourt
18
+ - install_gnome:
19
+ - keyboard_layout: en
20
+ - extra_packages: >
21
+ firefox-i18n-en-us flashplugin libreoffice libreoffice-en-US telepathy
22
+ hunspell-en faenza-icon-theme file-roller
23
+
24
+ export:
25
+ - @base
@@ -0,0 +1,25 @@
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
+ qemu_arch: i386
17
+
18
+ bootstrap:
19
+ - @base
20
+
21
+ setup:
22
+ - @base
23
+
24
+ export:
25
+ - @base
@@ -2,14 +2,14 @@
2
2
  # vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
3
3
  #==============================================================================
4
4
  #
5
- # DESCRIPTION: Build an Archlinux base system system.
5
+ # DESCRIPTION: Build an Archlinux base system system (x86_64).
6
6
  #
7
7
  #==============================================================================
8
8
 
9
9
  ---
10
10
  # Loads some helpful aliases
11
11
  aliases: defaults.yaml
12
- # Enables qcow2 checkpoint
12
+ # Enables qemu checkpoint
13
13
  checkpoint: qemu.yaml
14
14
  #== Global variables use by Kameleon engine and the steps
15
15
  global:
@@ -20,56 +20,58 @@ global:
20
20
  # Distribution
21
21
  distrib: archlinux
22
22
  arch: x86_64
23
-
24
- ## Disk options
25
- nbd_device: /dev/nbd1
26
- image_disk: $$kameleon_cwd/base_$$kameleon_recipe_name.qcow2
27
- image_size: 10G
28
- filesystem_type: ext4
23
+ hostname: kameleon-$$distrib
29
24
 
30
25
  ## QEMU options
31
- qemu_enable_kvm: true
26
+ qemu_enable_kvm: "$(egrep '(vmx|svm)' /proc/cpuinfo > /dev/null && echo true)"
32
27
  qemu_cpu: 2
33
- qemu_memory_size: 512
34
- qemu_monitor_port: 10023
28
+ qemu_memory_size: 768
29
+ qemu_monitor_socket: $$kameleon_cwd/qemu_monitor.socket
35
30
  qemu_ssh_port: 55423
36
- qemu_arch: x86_64
31
+ qemu_arch: $$arch
32
+ qemu_image_size: 10G
33
+ qemu_image_disk: $$kameleon_cwd/base_$$kameleon_recipe_name.qcow2
34
+ qemu_pidfile: $$kameleon_cwd/qemu.pid
35
+
36
+ ## Kameleon iso bootstrap
37
+ boot2kameleon_url: http://kameleon.imag.fr/iso/boot2debian/debian-jessie-$${arch}-insecure.iso
38
+ insecure_ssh_key_url: http://kameleon.imag.fr/iso/boot2debian/keys/insecure_id_rsa
37
39
 
38
40
  # rootfs options
39
- rootfs: $$kameleon_cwd/rootfs
40
- rootfs_download_path: /var/cache/kameleon/$$distrib/$$arch/rootfs
41
+ rootfs: /rootfs
42
+ filesystem_type: ext4
41
43
 
42
44
  ## System variables. Required by kameleon engine
43
45
  # Include specific steps
44
46
  include_steps:
45
47
  - $$distrib
46
48
 
47
- # Shell session from where we launch exec_out commands. There is often a
48
- # local bash session, but it can be a remote shell on other machines or on
49
- # any shell. (eg. bash, chroot, fakechroot, ssh, tmux, lxc...)
49
+ ssh_config_file: $$kameleon_cwd/ssh_config
50
50
  out_context:
51
- cmd: bash
52
- workdir: $$kameleon_cwd
51
+ cmd: ssh -F $$ssh_config_file $${kameleon_recipe_name} -t /bin/bash
52
+ workdir: /root/kameleon_workdir
53
+ proxy_cache: 10.0.2.2
53
54
 
54
- # Shell session that allows us to connect to the building machine in order to
55
- # configure it and setup additional programs
56
- ssh_config_file: $$kameleon_cwd/ssh_config
57
55
  in_context:
58
- cmd: LC_ALL=POSIX ssh -F $$ssh_config_file $$kameleon_recipe_name -t /bin/bash
56
+ cmd: ssh -F $$ssh_config_file $${kameleon_recipe_name} -t chroot $$rootfs /bin/bash
59
57
  workdir: /root/kameleon_workdir
60
-
58
+ proxy_cache: 10.0.2.2
61
59
 
62
60
  #== Bootstrap the new system and create the 'in_context'
63
61
  bootstrap:
62
+ - prepare_qemu
63
+ - start_qemu
64
+ - install_requirements:
65
+ - packages: parted e2fsprogs wget
66
+ - enable_checkpoint
67
+ - initialize_disk:
68
+ - disk_device: /dev/vda
64
69
  - arch_bootstrap:
65
70
  - mirror: http://mir.archlinux.fr/
66
71
  # You can choose any group from https://www.archlinux.org/groups/
67
72
  # It's recommended to use 'base' (default) or 'base-devel' (with dev tools)
68
73
  - pkg_group: base
69
- - initialize_disk_qemu
70
- - prepare_qemu
71
- - install_bootloader
72
- - start_qemu
74
+ - start_chroot
73
75
 
74
76
  #== Install and configuration steps
75
77
  # WARNING: this part should be independante from the out context (whenever
@@ -77,17 +79,17 @@ bootstrap:
77
79
  setup:
78
80
  # Install
79
81
  - install_software:
80
- - packages: ntp zip unzip rsync sudo vim bash-completion
82
+ - packages: ntp zip unzip rsync sudo vim bash-completion syslinux
83
+ - install_bootloader
81
84
  # Configuration
82
85
  - configure_system:
83
86
  - locales: POSIX C en_US fr_FR de_DE
84
87
  - lang: en_US.UTF-8
85
88
  - timezone: UTC
86
89
  - configure_keyboard:
87
- # set to french keyboard use 'localectl list-keymaps' to see available list
90
+ # set to english keyboard use 'localectl list-keymaps' to see available list
88
91
  - layout: en
89
- - configure_network:
90
- - hostname: kameleon-$$distrib
92
+ - configure_network
91
93
  - create_user:
92
94
  - name: $$user_name
93
95
  - groups: wheel
@@ -95,8 +97,9 @@ setup:
95
97
 
96
98
  #== Export the generated appliance in the format of your choice
97
99
  export:
98
- - save_appliance:
99
- - input: $$image_disk
100
+ - disable_checkpoint
101
+ - qemu_save_appliance:
102
+ - input: $$qemu_image_disk
100
103
  - output: $$kameleon_cwd/$$kameleon_recipe_name
101
104
  - save_as_qcow2
102
105
  #- save_as_qed
@@ -0,0 +1,113 @@
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 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: centos
22
+ release: 6.5
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
+ - "fedora"
52
+
53
+ disable_selinux: true
54
+ ssh_config_file: $$kameleon_cwd/ssh_config
55
+ out_context:
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
59
+
60
+ in_context:
61
+ cmd: ssh -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:
66
+ - enable_checkpoint
67
+ - prepare_qemu
68
+ - start_qemu
69
+ - install_requirements:
70
+ - packages: parted e2fsprogs yum rpm lynx
71
+ - initialize_disk:
72
+ - yum_bootstrap:
73
+ - mirror_packages_url: http://mirrors.kernel.org/$$distrib/$$release/os/$$arch/Packages/
74
+ - include_pkgs: findutils util-linux
75
+ - start_chroot
76
+
77
+ #== Install and configuration steps
78
+ setup:
79
+ - configure_kernel
80
+ - update_system
81
+ - minimal_install
82
+ - install_software:
83
+ - packages: >
84
+ kernel kernel-devel syslinux-extlinux bash-completion kbd dhclient
85
+ sudo openssh-server openssh-clients ntp ntpdate dhclient
86
+ net-tools NetworkManager
87
+ - install_bootloader
88
+ - configure_system:
89
+ - locales: POSIX C en_US fr_FR de_DE
90
+ - lang: en_US.UTF-8
91
+ - timezone: UTC
92
+ - configure_keyboard:
93
+ - layout: "us"
94
+ - configure_network
95
+ - create_user:
96
+ - name: $$user_name
97
+ - groups: wheel
98
+ - password: $$user_password
99
+
100
+ #== Export the generated appliance in the format of your choice
101
+ export:
102
+ - disable_checkpoint
103
+ - qemu_save_appliance:
104
+ - input: $$qemu_image_disk
105
+ - output: $$kameleon_cwd/$$kameleon_recipe_name
106
+ - save_as_qcow2
107
+ # - save_as_qed
108
+ # - save_as_tar_gz
109
+ # - save_as_tar_xz
110
+ # - save_as_tar_bz2
111
+ # - save_as_raw
112
+ # - save_as_vmdk
113
+ # - save_as_vdi
@@ -0,0 +1,119 @@
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 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: centos
22
+ release: 7
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
+ - "fedora"
52
+
53
+ disable_selinux: true
54
+ ssh_config_file: $$kameleon_cwd/ssh_config
55
+ out_context:
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
59
+
60
+ in_context:
61
+ cmd: ssh -F $$ssh_config_file $${kameleon_recipe_name} -t /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_qemu
69
+ - start_qemu
70
+ - install_requirements:
71
+ - packages: parted e2fsprogs yum rpm lynx extlinux
72
+ - initialize_disk
73
+ - yum_bootstrap:
74
+ - mirror_packages_url: http://mirrors.kernel.org/$$distrib/$$release/os/$$arch/Packages/
75
+ - include_pkgs: >
76
+ findutils yum util-linux dhclient vim-minimal net-tools NetworkManager
77
+ openssh-server
78
+ - init_pxeboot:
79
+ - pxe_initrd_url: http://mirrors.kernel.org/$$distrib/$$release/os/$$arch/images/pxeboot/initrd.img
80
+ - pxe_vmlinuz_url: http://mirrors.kernel.org/$$distrib/$$release/os/$$arch/images/pxeboot/vmlinuz
81
+ - switch_context_qemu
82
+
83
+ #== Install and configuration steps
84
+ setup:
85
+ - configure_kernel
86
+ - update_system
87
+ - minimal_install
88
+ - install_software:
89
+ - packages: >
90
+ kernel bash-completion kbd sudo openssh-clients syslinux-extlinux acpid
91
+ ntp ntpdate
92
+ - install_bootloader
93
+ - configure_system:
94
+ - locales: POSIX C en_US fr_FR de_DE
95
+ - lang: en_US.UTF-8
96
+ - timezone: UTC
97
+ - configure_keyboard:
98
+ - layout: "us"
99
+ - configure_network:
100
+ - hostname: kameleon-$$distrib
101
+ - create_user:
102
+ - name: $$user_name
103
+ - groups: wheel
104
+ - password: $$user_password
105
+
106
+ #== Export the generated appliance in the format of your choice
107
+ export:
108
+ - disable_checkpoint
109
+ - qemu_save_appliance:
110
+ - input: $$qemu_image_disk
111
+ - output: $$kameleon_cwd/$$kameleon_recipe_name
112
+ - save_as_qcow2
113
+ # - save_as_qed
114
+ # - save_as_tar_gz
115
+ # - save_as_tar_xz
116
+ # - save_as_tar_bz2
117
+ # - save_as_raw
118
+ # - save_as_vmdk
119
+ # - save_as_vdi