kameleon-builder 2.2.5 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/CHANGELOG.rst +21 -0
  4. data/{templates → contrib}/steps/bootstrap/debian/debootstrap_arm.yaml +1 -1
  5. data/{templates → contrib}/steps/export/clean_appliance.yaml +0 -0
  6. data/{templates → contrib}/steps/export/compact_qcow_img.yaml +0 -0
  7. data/{templates → contrib}/steps/setup/archlinux/configure_ruby.yaml +0 -0
  8. data/{templates → contrib}/steps/setup/archlinux/install_dev_tools.yaml +0 -0
  9. data/{templates → contrib}/steps/setup/archlinux/install_gnome.yaml +0 -0
  10. data/{templates → contrib}/steps/setup/archlinux/install_yaourt.yaml +0 -0
  11. data/{templates → contrib}/steps/setup/centos/6.5/configure_repo.yaml +0 -0
  12. data/{templates → contrib}/steps/setup/debian/install_gnome.yaml +0 -0
  13. data/{templates → contrib}/steps/setup/debian/install_kde.yaml +0 -0
  14. data/{templates → erb}/extend.erb +2 -2
  15. data/erb/userconf.erb +5 -0
  16. data/kameleon-builder.gemspec +6 -1
  17. data/lib/kameleon.rb +53 -3
  18. data/lib/kameleon/cli.rb +146 -99
  19. data/lib/kameleon/engine.rb +20 -8
  20. data/lib/kameleon/environment.rb +11 -10
  21. data/lib/kameleon/persistent_cache.rb +1 -9
  22. data/lib/kameleon/recipe.rb +52 -24
  23. data/lib/kameleon/repository.rb +46 -0
  24. data/lib/kameleon/utils.rb +49 -0
  25. data/{templates → tests/recipes}/steps/aliases/defaults.yaml +0 -0
  26. data/tests/recipes/steps/bootstrap/linux/bootstrap.yaml +2 -0
  27. data/tests/recipes/steps/checkpoints/test.yaml +14 -0
  28. data/tests/recipes/steps/enable_something.yaml +2 -0
  29. data/tests/recipes/steps/export/save_appliance.yaml +10 -0
  30. data/tests/recipes/steps/setup/linux/software_install.yaml +7 -0
  31. data/tests/recipes/test_recipe.yaml +41 -0
  32. data/version.txt +1 -1
  33. metadata +34 -139
  34. data/templates/COPYRIGHT +0 -21
  35. data/templates/chroot/debian7-amd64.yaml +0 -119
  36. data/templates/docker/debian7.yaml +0 -107
  37. data/templates/grid5000/debian7.yaml +0 -97
  38. data/templates/qemu/archlinux-desktop-i686.yaml +0 -25
  39. data/templates/qemu/archlinux-desktop-x86_64.yaml +0 -25
  40. data/templates/qemu/archlinux-i686.yaml +0 -25
  41. data/templates/qemu/archlinux-x86_64.yaml +0 -109
  42. data/templates/qemu/centos6.5-x86_64.yaml +0 -122
  43. data/templates/qemu/centos7-x86_64.yaml +0 -122
  44. data/templates/qemu/debian7-amd64.yaml +0 -134
  45. data/templates/qemu/debian7-desktop-amd64.yaml +0 -24
  46. data/templates/qemu/debian7-kameleon-amd64.yaml +0 -40
  47. data/templates/qemu/debian7-oar-amd64.yaml +0 -51
  48. data/templates/qemu/debian8-amd64.yaml +0 -25
  49. data/templates/qemu/fedora20-desktop-x86_64.yaml +0 -21
  50. data/templates/qemu/fedora20-x86_64.yaml +0 -119
  51. data/templates/qemu/ubuntu-12.04-amd64.yaml +0 -132
  52. data/templates/qemu/ubuntu-12.04-desktop-amd64.yaml +0 -25
  53. data/templates/qemu/ubuntu-14.04-amd64.yaml +0 -25
  54. data/templates/qemu/ubuntu-14.04-desktop-amd64.yaml +0 -27
  55. data/templates/steps/bootstrap/archlinux/arch_bootstrap.yaml +0 -211
  56. data/templates/steps/bootstrap/centos/6.5/yum_bootstrap.yaml +0 -67
  57. data/templates/steps/bootstrap/debian/debootstrap.yaml +0 -20
  58. data/templates/steps/bootstrap/fedora/init_pxeboot.yaml +0 -13
  59. data/templates/steps/bootstrap/fedora/yum_bootstrap.yaml +0 -45
  60. data/templates/steps/bootstrap/g5k_reserv.yaml +0 -70
  61. data/templates/steps/bootstrap/initialize_disk.yaml +0 -16
  62. data/templates/steps/bootstrap/initialize_disk_chroot.yaml +0 -80
  63. data/templates/steps/bootstrap/install_requirements.yaml +0 -3
  64. data/templates/steps/bootstrap/prepare_chroot.yaml +0 -126
  65. data/templates/steps/bootstrap/prepare_docker.yaml +0 -51
  66. data/templates/steps/bootstrap/prepare_qemu.yaml +0 -41
  67. data/templates/steps/bootstrap/prepare_virtualbox.yaml +0 -67
  68. data/templates/steps/bootstrap/start_chroot.yaml +0 -51
  69. data/templates/steps/bootstrap/start_docker.yaml +0 -16
  70. data/templates/steps/bootstrap/start_qemu.yaml +0 -74
  71. data/templates/steps/bootstrap/start_virtualbox.yaml +0 -38
  72. data/templates/steps/bootstrap/switch_context_qemu.yaml +0 -84
  73. data/templates/steps/bootstrap/switch_context_virtualbox.yaml +0 -86
  74. data/templates/steps/breakpoint.yaml +0 -3
  75. data/templates/steps/checkpoints/docker.yaml +0 -17
  76. data/templates/steps/checkpoints/qcow2.yaml +0 -40
  77. data/templates/steps/checkpoints/qemu.yaml +0 -33
  78. data/templates/steps/checkpoints/virtualbox.yaml +0 -21
  79. data/templates/steps/disable_checkpoint.yaml +0 -3
  80. data/templates/steps/enable_checkpoint.yaml +0 -5
  81. data/templates/steps/export/qemu_save_appliance.yaml +0 -52
  82. data/templates/steps/export/save_appliance_from_g5k.yaml +0 -47
  83. data/templates/steps/export/vagrant_save_appliance.yaml +0 -14
  84. data/templates/steps/export/virtualbox_save_appliance.yaml +0 -61
  85. data/templates/steps/setup/archlinux/configure_keyboard.yaml +0 -9
  86. data/templates/steps/setup/archlinux/configure_network.yaml +0 -9
  87. data/templates/steps/setup/archlinux/configure_system.yaml +0 -20
  88. data/templates/steps/setup/archlinux/install_bootloader.yaml +0 -23
  89. data/templates/steps/setup/archlinux/install_software.yaml +0 -9
  90. data/templates/steps/setup/autologin.yaml +0 -16
  91. data/templates/steps/setup/centos/6.5/configure_network.yaml +0 -33
  92. data/templates/steps/setup/centos/6.5/configure_system.yaml +0 -46
  93. data/templates/steps/setup/centos/6.5/minimal_install.yaml +0 -3
  94. data/templates/steps/setup/centos/6.5/setup_vagrant_box.yaml +0 -77
  95. data/templates/steps/setup/create_group.yaml +0 -12
  96. data/templates/steps/setup/create_user.yaml +0 -11
  97. data/templates/steps/setup/debian/configure_apt.yaml +0 -73
  98. data/templates/steps/setup/debian/configure_kernel.yaml +0 -13
  99. data/templates/steps/setup/debian/configure_keyboard.yaml +0 -10
  100. data/templates/steps/setup/debian/configure_network.yaml +0 -30
  101. data/templates/steps/setup/debian/configure_system.yaml +0 -12
  102. data/templates/steps/setup/debian/install_bootloader.yaml +0 -36
  103. data/templates/steps/setup/debian/install_software.yaml +0 -2
  104. data/templates/steps/setup/debian/oar/oar_debian_config_frontend.yaml +0 -8
  105. data/templates/steps/setup/debian/oar/oar_debian_config_node.yaml +0 -5
  106. data/templates/steps/setup/debian/oar/oar_debian_config_server.yaml +0 -5
  107. data/templates/steps/setup/debian/oar/oar_prereq_install.yaml +0 -16
  108. data/templates/steps/setup/debian/setup_vagrant_box.yaml +0 -80
  109. data/templates/steps/setup/debian/upgrade_system.yaml +0 -10
  110. data/templates/steps/setup/fedora/configure_kernel.yaml +0 -9
  111. data/templates/steps/setup/fedora/configure_keyboard.yaml +0 -12
  112. data/templates/steps/setup/fedora/configure_network.yaml +0 -38
  113. data/templates/steps/setup/fedora/configure_system.yaml +0 -52
  114. data/templates/steps/setup/fedora/install_bootloader.yaml +0 -53
  115. data/templates/steps/setup/fedora/install_software.yaml +0 -3
  116. data/templates/steps/setup/fedora/minimal_install.yaml +0 -3
  117. data/templates/steps/setup/fedora/update_system.yaml +0 -16
  118. data/templates/steps/setup/oar/oar_config_devel.yaml +0 -21
  119. data/templates/steps/setup/oar/oar_config_frontend.yaml +0 -38
  120. data/templates/steps/setup/oar/oar_config_node.yaml +0 -4
  121. data/templates/steps/setup/oar/oar_config_server.yaml +0 -25
  122. data/templates/steps/setup/oar/oar_config_system.yaml +0 -34
  123. data/templates/steps/setup/oar/oar_devel_prereq_install.yaml +0 -5
  124. data/templates/steps/setup/oar/oar_git_install.yaml +0 -21
  125. data/templates/steps/setup/ubuntu/configure_apt.yaml +0 -62
  126. data/templates/virtualbox/archlinux-desktop-i686.yaml +0 -25
  127. data/templates/virtualbox/archlinux-desktop-x86_64.yaml +0 -28
  128. data/templates/virtualbox/archlinux-i686.yaml +0 -28
  129. data/templates/virtualbox/archlinux-x86_64.yaml +0 -108
  130. data/templates/virtualbox/centos6.5-i386.yaml +0 -39
  131. data/templates/virtualbox/centos6.5-vagrant-x86_64.yaml +0 -33
  132. data/templates/virtualbox/centos6.5-x86_64.yaml +0 -121
  133. data/templates/virtualbox/centos7-x86_64.yaml +0 -118
  134. data/templates/virtualbox/debian7-amd64.yaml +0 -128
  135. data/templates/virtualbox/debian7-desktop-amd64.yaml +0 -25
  136. data/templates/virtualbox/debian7-i386.yaml +0 -31
  137. data/templates/virtualbox/debian7-kameleon-amd64.yaml +0 -38
  138. data/templates/virtualbox/debian7-oar-amd64.yaml +0 -51
  139. data/templates/virtualbox/debian7-vagrant-amd64.yaml +0 -32
  140. data/templates/virtualbox/debian8-amd64.yaml +0 -25
  141. data/templates/virtualbox/debian8-i386.yaml +0 -31
  142. data/templates/virtualbox/fedora20-x86_64.yaml +0 -118
  143. data/templates/virtualbox/ubuntu-12.04-amd64.yaml +0 -128
  144. data/templates/virtualbox/ubuntu-12.04-desktop-amd64.yaml +0 -25
  145. data/templates/virtualbox/ubuntu-14.04-amd64.yaml +0 -25
  146. data/templates/virtualbox/ubuntu-14.04-desktop-amd64.yaml +0 -27
  147. data/tests/recipes/dummy_recipe.yaml +0 -48
  148. data/tests/recipes/steps/bootstrap/dummy_distro/dummy_bootstrap_static.yaml +0 -4
  149. data/tests/recipes/steps/export/dummy_save_appliance.yaml +0 -9
  150. data/tests/recipes/steps/setup/default/dummy_root_passwd.yaml +0 -8
  151. data/tests/recipes/steps/setup/dummy_distro/dummy_software_install.yaml +0 -7
@@ -1,128 +0,0 @@
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
- disk_device: /dev/sda
41
- rootfs: /rootfs
42
- filesystem_type: ext4
43
-
44
- # Apt options
45
- apt_repository: http://archive.ubuntu.com/ubuntu/
46
- apt_enable_restricted: true
47
-
48
- ## System variables. Required by kameleon engine
49
- # Include specific steps
50
- include_steps:
51
- - $$distrib/$$release
52
- - $$distrib
53
- - debian
54
-
55
- ssh_config_file: $$kameleon_cwd/ssh_config
56
- out_context:
57
- cmd: ssh -o ConnectTimeout=1 -F $$ssh_config_file $${kameleon_recipe_name} -t /bin/bash
58
- workdir: /root/kameleon_workdir
59
- proxy_cache: 10.0.2.2
60
-
61
- in_context:
62
- cmd: ssh -o ConnectTimeout=1 -F $$ssh_config_file $${kameleon_recipe_name} -t chroot $$rootfs /bin/bash
63
- workdir: /root/kameleon_workdir
64
- proxy_cache: 10.0.2.2
65
-
66
- #== Bootstrap the new system and create the 'in_context'
67
- bootstrap:
68
- - enable_checkpoint
69
- - prepare_virtualbox
70
- - start_virtualbox
71
- - install_requirements:
72
- - packages: parted e2fsprogs debootstrap extlinux
73
- - initialize_disk
74
- - debootstrap:
75
- - include_pkg: >
76
- apt-transport-https ca-certificates less acpid acpi-support kbd bzip2 udev
77
- locales psmisc linux-image-generic ifupdown iptables iputils-ping
78
- iproute pciutils isc-dhcp-client openssh-server
79
- - release: $$release
80
- - arch: $$arch
81
- - repository: $$apt_repository
82
- - variant: minbase
83
- - switch_context_virtualbox
84
-
85
-
86
- #== Install and configuration steps
87
- setup:
88
- # Install
89
- - configure_apt:
90
- - repository: $$apt_repository
91
- - enable_restricted: $$apt_enable_restricted
92
- - upgrade_system:
93
- - dist_upgrade: true
94
- - install_software:
95
- - packages: >
96
- bash-completion curl nano vim language-pack-en extlinux sudo
97
- - configure_kernel:
98
- - arch: $$arch
99
- - install_bootloader
100
- # Configuration
101
- - configure_system:
102
- - locales: POSIX C en_US fr_FR de_DE
103
- - lang: en_US.UTF-8
104
- - timezone: UTC
105
- - configure_keyboard:
106
- - layout: "us,fr,de"
107
- - configure_network
108
- - create_group:
109
- - name: admin
110
- - create_user:
111
- - name: $$user_name
112
- - groups: sudo admin
113
- - password: $$user_password
114
-
115
- #== Export the generated appliance in the format of your choice
116
- export:
117
- - disable_checkpoint
118
- - virtualbox_save_appliance:
119
- - output: "$$kameleon_cwd/$${kameleon_recipe_name}"
120
- - save_as_ova
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
@@ -1,25 +0,0 @@
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) Desktop edition (amd64).
6
- #
7
- #==============================================================================
8
-
9
- ---
10
- extend: ubuntu-12.04-amd64
11
-
12
- global:
13
- # Apt options
14
- virtualbox_memory_size: 1024
15
-
16
- bootstrap:
17
- - "@base"
18
-
19
- setup:
20
- - "@base"
21
- - install_software:
22
- - packages: ubuntu-desktop
23
-
24
- export:
25
- - "@base"
@@ -1,25 +0,0 @@
1
- #==============================================================================
2
- # vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
3
- #==============================================================================
4
- #
5
- # DESCRIPTION: Ubuntu 14.04 LTS (Trusty Tahr) base system (amd64).
6
- #
7
- #==============================================================================
8
-
9
- ---
10
- extend: ubuntu-12.04-amd64
11
-
12
- global:
13
- # Distribution
14
- distrib: ubuntu
15
- release: trusty
16
- arch: amd64
17
-
18
- bootstrap:
19
- - "@base"
20
-
21
- setup:
22
- - "@base"
23
-
24
- export:
25
- - "@base"
@@ -1,27 +0,0 @@
1
- #==============================================================================
2
- # vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
3
- #==============================================================================
4
- #
5
- # DESCRIPTION: Ubuntu 14.04 LTS (Trusty Tahr) Desktop edition (amd64).
6
- #
7
- #==============================================================================
8
-
9
- ---
10
- extend: ubuntu-14.04-amd64
11
-
12
- global:
13
- # Distribution
14
- distrib: ubuntu
15
- release: trusty
16
- arch: amd64
17
-
18
- bootstrap:
19
- - "@base"
20
-
21
- setup:
22
- - "@base"
23
- - install_software:
24
- - packages: ubuntu-desktop
25
-
26
- export:
27
- - "@base"
@@ -1,48 +0,0 @@
1
- #===============================================================================
2
- # vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
3
- #===============================================================================
4
- #
5
- # RECIPE: dummy_recipe.yaml
6
- #
7
- # DESCRIPTION: This is a test recipe made for unit testing
8
- #
9
- # WARNING: This is a warning!!!
10
- #
11
- #===============================================================================
12
- ---
13
- # This is a comment :/!* $$toto
14
- global:
15
- # This is another comment // ,;:!*ù$=)àç_ç_èè-(-('""é&'" ¹~~##{[{[|``\^^@]}
16
- distrib: dummy_distro
17
- debian_version_name: distrib_repository
18
- outside_context: bash
19
- inside_context: chroot $$workdir/chroot
20
- variables: test
21
- extra_packages: vim
22
-
23
- bootstrap:
24
- # &é"'(-è_çà)=~#{#{|~{|`\[`^|\@^@]*$ùlmjtgsioht jhié"ç_è (y'éy _This
25
- - dummy_bootstrap_static:
26
- - distrib_version_name: wheeeeeeze
27
- # Comment
28
- - distrib_repository: http://myrepo.com/test
29
-
30
- setup:
31
- - dummy_software_install:
32
- - extra_packages: "titi toto tata"
33
- # Comment
34
- - install_cmd: 12345.213
35
- - dummy_step1
36
- # Comment
37
- - dummy_step2
38
- - dummy_root_passwd
39
-
40
- # Comment
41
-
42
- export:
43
- - dummy_save_appliance:
44
- - save_as_raw
45
- # Comment
46
- - save_as_vmdk
47
- # Comment
48
- # Comment
@@ -1,4 +0,0 @@
1
- # # Dummy Bootstrap Static
2
- - dummy_bootstrap_static:
3
- - exec_out: echo $$distrib_version_name > /dev/null
4
- - exec_in: echo $$distrib_repository > /dev/null
@@ -1,9 +0,0 @@
1
- # # Dummy Save Appliance
2
- - save_as_raw:
3
- - exec_out: echo test > /dev/null
4
- - exec_in: echo test > /dev/null
5
- - exec_out: echo test > /dev/null
6
- - save_as_vmdk:
7
- - exec_out: echo test > /dev/null
8
- - exec_in: echo test > /dev/null
9
- - exec_out: echo test > /dev/null
@@ -1,8 +0,0 @@
1
- # # Dummy Passwd Root
2
- - dummy_passwd_root:
3
- - exec_in: echo dummy > /dev/null
4
- - exec_in: |
5
- echo toto > /dev/null
6
- - exec_out: echo dummy > /dev/null
7
- - exec_out: |
8
- echo toto > /dev/null
@@ -1,7 +0,0 @@
1
- # # Dummy Software Install
2
- - dummy_step1:
3
- - exec_in: echo $$install_cmd > /dev/null
4
- - dummy_step2:
5
- - exec_out: echo $$extra_packages > /dev/null
6
- - dummy_step3:
7
- - exec_in: echo test > /dev/null