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.
- data/.editorconfig +0 -0
- data/.env +2 -6
- data/CHANGELOG.rst +74 -1
- data/Gemfile +20 -2
- data/README.rst +35 -25
- data/Thorfile +29 -0
- data/contrib/kameleon_bashrc.sh +61 -0
- data/contrib/polipo_env.sh +3 -2
- data/kameleon-builder.gemspec +3 -10
- data/lib/kameleon.rb +10 -14
- data/lib/kameleon/cli.rb +92 -105
- data/lib/kameleon/context.rb +76 -43
- data/lib/kameleon/engine.rb +147 -103
- data/lib/kameleon/environment.rb +10 -5
- data/lib/kameleon/error.rb +1 -32
- data/lib/kameleon/persistent_cache.rb +127 -29
- data/lib/kameleon/recipe.rb +63 -106
- data/lib/kameleon/shell.rb +32 -17
- data/lib/kameleon/step.rb +18 -1
- data/lib/kameleon/ui.rb +141 -0
- data/lib/kameleon/utils.rb +9 -0
- data/templates/{debian7-chroot.yaml → chroot/debian7-amd64.yaml} +29 -21
- data/templates/{docker-debian7.yaml → docker/debian7.yaml} +5 -5
- data/templates/extend.erb +2 -2
- data/templates/{debian7-g5k.yaml → grid5000/debian7.yaml} +1 -1
- data/templates/{archlinux-desktop.yaml → qemu/archlinux-desktop-i686.yaml} +2 -2
- data/templates/qemu/archlinux-desktop-x86_64.yaml +25 -0
- data/templates/qemu/archlinux-i686.yaml +25 -0
- data/templates/{archlinux.yaml → qemu/archlinux-x86_64.yaml} +37 -34
- data/templates/qemu/centos6.5-x86_64.yaml +113 -0
- data/templates/qemu/centos7-x86_64.yaml +119 -0
- data/templates/{debian7.yaml → qemu/debian7-amd64.yaml} +45 -40
- data/templates/{debian7-desktop.yaml → qemu/debian7-desktop-amd64.yaml} +2 -3
- data/templates/{debian7-kameleon.yaml → qemu/debian7-kameleon-amd64.yaml} +3 -6
- data/templates/{debian7-oar-dev.yaml → qemu/debian7-oar-amd64.yaml} +2 -2
- data/templates/qemu/debian8-amd64.yaml +25 -0
- data/templates/{fedora20-desktop.yaml → qemu/fedora20-desktop-x86_64.yaml} +2 -2
- data/templates/qemu/fedora20-x86_64.yaml +116 -0
- data/templates/{ubuntu-12.04.yaml → qemu/ubuntu-12.04-amd64.yaml} +42 -38
- data/templates/{ubuntu-12.04-desktop.yaml → qemu/ubuntu-12.04-desktop-amd64.yaml} +3 -3
- data/templates/{ubuntu-14.04.yaml → qemu/ubuntu-14.04-amd64.yaml} +2 -2
- data/templates/{ubuntu-14.04-desktop.yaml → qemu/ubuntu-14.04-desktop-amd64.yaml} +2 -2
- data/templates/steps/aliases/defaults.yaml +19 -13
- data/templates/steps/bootstrap/archlinux/arch_bootstrap.yaml +11 -19
- data/templates/steps/bootstrap/debian/debootstrap.yaml +10 -11
- data/templates/steps/bootstrap/debian/debootstrap_arm.yaml +11 -19
- data/templates/steps/bootstrap/fedora/init_pxeboot.yaml +13 -0
- data/templates/steps/bootstrap/fedora/yum_bootstrap.yaml +45 -0
- data/templates/steps/bootstrap/initialize_disk.yaml +16 -0
- data/templates/steps/bootstrap/initialize_disk_chroot.yaml +10 -14
- data/templates/steps/bootstrap/install_requirements.yaml +3 -0
- data/templates/steps/bootstrap/prepare_docker.yaml +7 -7
- data/templates/steps/bootstrap/prepare_qemu.yaml +20 -26
- data/templates/steps/bootstrap/prepare_virtualbox.yaml +63 -0
- data/templates/steps/bootstrap/start_chroot.yaml +2 -13
- data/templates/steps/bootstrap/start_qemu.yaml +50 -53
- data/templates/steps/bootstrap/start_virtualbox.yaml +37 -0
- data/templates/steps/bootstrap/switch_context_qemu.yaml +64 -0
- data/templates/steps/bootstrap/switch_context_virtualbox.yaml +66 -0
- data/templates/steps/breakpoint.yaml +2 -1
- data/templates/steps/checkpoints/docker.yaml +14 -11
- data/templates/steps/checkpoints/qcow2.yaml +26 -24
- data/templates/steps/checkpoints/qemu.yaml +30 -36
- data/templates/steps/checkpoints/virtualbox.yaml +21 -0
- data/templates/steps/disable_checkpoint.yaml +3 -0
- data/templates/steps/enable_checkpoint.yaml +5 -0
- data/templates/steps/export/qemu_save_appliance.yaml +52 -0
- data/templates/steps/export/virtualbox_save_appliance.yaml +67 -0
- data/templates/steps/setup/archlinux/install_bootloader.yaml +23 -0
- data/templates/steps/setup/centos/6.5/configure_network.yaml +31 -0
- data/templates/steps/setup/centos/6.5/configure_system.yaml +27 -0
- data/templates/steps/setup/debian/configure_apt.yaml +1 -6
- data/templates/steps/setup/debian/configure_kernel.yaml +0 -5
- data/templates/steps/setup/debian/install_bootloader.yaml +36 -0
- data/templates/steps/setup/debian/setup_vagrant_box.yaml +48 -18
- data/templates/steps/setup/debian/upgrade_system.yaml +2 -7
- data/templates/steps/setup/fedora/configure_kernel.yaml +9 -0
- data/templates/steps/setup/fedora/configure_keyboard.yaml +12 -0
- data/templates/steps/setup/fedora/configure_network.yaml +9 -1
- data/templates/steps/setup/fedora/configure_system.yaml +20 -45
- data/templates/steps/setup/fedora/install_bootloader.yaml +58 -0
- data/templates/steps/setup/fedora/minimal_install.yaml +3 -0
- data/templates/steps/setup/fedora/update_system.yaml +13 -5
- data/templates/steps/setup/ubuntu/configure_apt.yaml +4 -9
- data/templates/vagrant/debian7-amd64.yaml +130 -0
- data/templates/virtualbox/archlinux-desktop-i686.yaml +25 -0
- data/templates/virtualbox/archlinux-desktop-x86_64.yaml +28 -0
- data/templates/virtualbox/archlinux-i686.yaml +28 -0
- data/templates/virtualbox/archlinux-x86_64.yaml +109 -0
- data/templates/virtualbox/centos6.5-i386.yaml +39 -0
- data/templates/virtualbox/centos6.5-x86_64.yaml +111 -0
- data/templates/virtualbox/centos7-x86_64.yaml +116 -0
- data/{docs/source/debian7.yaml → templates/virtualbox/debian7-amd64.yaml} +53 -52
- data/templates/virtualbox/debian7-desktop-amd64.yaml +25 -0
- data/templates/{fedora-rawhide.yaml → virtualbox/debian7-i386.yaml} +12 -11
- data/templates/virtualbox/debian7-kameleon-amd64.yaml +38 -0
- data/templates/virtualbox/debian7-oar-amd64.yaml +51 -0
- data/templates/{debian-testing.yaml → virtualbox/debian8-amd64.yaml} +3 -3
- data/templates/virtualbox/debian8-i386.yaml +31 -0
- data/templates/virtualbox/fedora20-x86_64.yaml +116 -0
- data/templates/virtualbox/ubuntu-12.04-amd64.yaml +128 -0
- data/templates/virtualbox/ubuntu-12.04-desktop-amd64.yaml +25 -0
- data/templates/virtualbox/ubuntu-14.04-amd64.yaml +25 -0
- data/templates/virtualbox/ubuntu-14.04-desktop-amd64.yaml +27 -0
- data/version.txt +1 -1
- metadata +67 -212
- data/Rakefile +0 -24
- data/docs/.gitignore +0 -1
- data/docs/Makefile +0 -181
- data/docs/README.md +0 -17
- data/docs/make.bat +0 -242
- data/docs/source/_static/.gitignore +0 -0
- data/docs/source/_static/centos.png +0 -0
- data/docs/source/_static/debian.png +0 -0
- data/docs/source/_static/kameleon-logo.png +0 -0
- data/docs/source/_static/kameleon-logo.xcf +0 -0
- data/docs/source/_static/kameleon-long.png +0 -0
- data/docs/source/_static/ubuntu.png +0 -0
- data/docs/source/_themes/sphinx_rtd_theme/__init__.py +0 -17
- data/docs/source/_themes/sphinx_rtd_theme/breadcrumbs.html +0 -19
- data/docs/source/_themes/sphinx_rtd_theme/footer.html +0 -32
- data/docs/source/_themes/sphinx_rtd_theme/layout.html +0 -160
- data/docs/source/_themes/sphinx_rtd_theme/layout_old.html +0 -205
- data/docs/source/_themes/sphinx_rtd_theme/search.html +0 -50
- data/docs/source/_themes/sphinx_rtd_theme/searchbox.html +0 -7
- data/docs/source/_themes/sphinx_rtd_theme/static/css/badge_only.css +0 -1
- data/docs/source/_themes/sphinx_rtd_theme/static/css/theme.css +0 -4
- data/docs/source/_themes/sphinx_rtd_theme/static/fonts/FontAwesome.otf +0 -0
- data/docs/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot +0 -0
- data/docs/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.svg +0 -414
- data/docs/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf +0 -0
- data/docs/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff +0 -0
- data/docs/source/_themes/sphinx_rtd_theme/static/js/theme.js +0 -47
- data/docs/source/_themes/sphinx_rtd_theme/theme.conf +0 -8
- data/docs/source/_themes/sphinx_rtd_theme/versions.html +0 -37
- data/docs/source/aliases.rst +0 -31
- data/docs/source/atlas_debian_g5k.yaml +0 -36
- data/docs/source/checkpoint.rst +0 -30
- data/docs/source/commands.rst +0 -63
- data/docs/source/conf.py +0 -262
- data/docs/source/context.rst +0 -47
- data/docs/source/debian_customized.yaml +0 -28
- data/docs/source/debian_customized_g5k.yaml +0 -21
- data/docs/source/faq.rst +0 -43
- data/docs/source/getting_started.rst +0 -260
- data/docs/source/grid5000_tutorial.rst +0 -525
- data/docs/source/index.rst +0 -53
- data/docs/source/install_atlas.yaml +0 -25
- data/docs/source/install_hpl.yaml +0 -24
- data/docs/source/installation.rst +0 -51
- data/docs/source/persistent_cache.rst +0 -34
- data/docs/source/recipe.rst +0 -177
- data/docs/source/tau_install.yaml +0 -19
- data/docs/source/tau_install_g5k.yaml +0 -25
- data/docs/source/use_cases.rst +0 -93
- data/docs/source/workspace.rst +0 -13
- data/lib/kameleon/logger.rb +0 -56
- data/omnibus/.gitignore +0 -11
- data/omnibus/.kitchen.yml +0 -25
- data/omnibus/Berksfile +0 -9
- data/omnibus/Berksfile.lock +0 -25
- data/omnibus/Gemfile +0 -12
- data/omnibus/README.md +0 -94
- data/omnibus/config/projects/kameleon.rb +0 -23
- data/omnibus/config/software/kameleon.rb +0 -24
- data/omnibus/config/software/polipo.rb +0 -30
- data/omnibus/config/software/ruby.rb +0 -158
- data/omnibus/files/mac_dmg/Resources/background.png +0 -0
- data/omnibus/files/mac_dmg/Resources/icon.png +0 -0
- data/omnibus/files/mac_pkg/Resources/background.png +0 -0
- data/omnibus/files/mac_pkg/Resources/license.html +0 -1
- data/omnibus/files/mac_pkg/Resources/welcome.html +0 -9
- data/omnibus/omnibus.rb +0 -27
- data/omnibus/package-scripts/kameleon/makeselfinst +0 -27
- data/omnibus/package-scripts/kameleon/postrm +0 -9
- data/templates/fedora20.yaml +0 -105
- data/templates/steps/bootstrap/archlinux/install_bootloader.yaml +0 -46
- data/templates/steps/bootstrap/archlinux/populate_disk.yaml +0 -39
- data/templates/steps/bootstrap/fedora/liveos_bootstrap.yaml +0 -123
- data/templates/steps/bootstrap/initialize_disk_qemu.yaml +0 -72
- data/templates/steps/bootstrap/install_bootloader.yaml +0 -42
- data/templates/steps/bootstrap/ubuntu/debootstrap.yaml +0 -27
- data/templates/steps/export/save_appliance.yaml +0 -58
- data/templates/steps/export/save_vagrant_box.yaml +0 -29
- data/templates/vagrant-debian7.yaml +0 -31
data/docs/source/index.rst
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
.. Kameleon documentation master file, created by
|
2
|
-
sphinx-quickstart on Thu Feb 13 19:01:14 2014.
|
3
|
-
You can adapt this file completely to your liking, but it should at least
|
4
|
-
contain the root `toctree` directive.
|
5
|
-
|
6
|
-
Welcome to Kameleon's documentation!
|
7
|
-
====================================
|
8
|
-
|
9
|
-
|
10
|
-
.. note::
|
11
|
-
This documentation is currently being written...
|
12
|
-
|
13
|
-
.. image:: _static/kameleon-long.png
|
14
|
-
:align: right
|
15
|
-
|
16
|
-
-----
|
17
|
-
About
|
18
|
-
-----
|
19
|
-
|
20
|
-
Kameleon should be seen as a simple but powerful tool to generate customized
|
21
|
-
appliances. With Kameleon, you make your recipe that describes how to create
|
22
|
-
step by step your own distribution. At start Kameleon is used to create custom
|
23
|
-
kvm, docker, VirtualBox, ..., but as it is designed to be very generic
|
24
|
-
you can probably do a lot more than that.
|
25
|
-
|
26
|
-
|
27
|
-
------------------
|
28
|
-
User Documentation
|
29
|
-
------------------
|
30
|
-
|
31
|
-
|
32
|
-
.. toctree::
|
33
|
-
:maxdepth: 2
|
34
|
-
|
35
|
-
installation.rst
|
36
|
-
getting_started.rst
|
37
|
-
use_cases.rst
|
38
|
-
recipe.rst
|
39
|
-
context.rst
|
40
|
-
commands.rst
|
41
|
-
workspace.rst
|
42
|
-
checkpoint.rst
|
43
|
-
persistent_cache.rst
|
44
|
-
aliases.rst
|
45
|
-
faq.rst
|
46
|
-
grid5000_tutorial.rst
|
47
|
-
|
48
|
-
Indices and tables
|
49
|
-
==================
|
50
|
-
|
51
|
-
* :ref:`genindex`
|
52
|
-
* :ref:`modindex`
|
53
|
-
* :ref:`search`
|
@@ -1,25 +0,0 @@
|
|
1
|
-
|
2
|
-
- download_tarball:
|
3
|
-
- exec_local: |
|
4
|
-
cd /tmp/
|
5
|
-
wget -q $$repository/$$version/atlas$$version.tar.bz2/download -O atlas$$version.tar.bz2
|
6
|
-
- local2in:
|
7
|
-
- /tmp/atlas$$version.tar.bz2
|
8
|
-
- /root/atlas$$version.tar.bz2
|
9
|
-
|
10
|
-
- deactivating_cpu_throttling:
|
11
|
-
- exec_in: cpufreq-selector -g performance
|
12
|
-
|
13
|
-
- install:
|
14
|
-
- exec_in: cd /root/
|
15
|
-
- exec_in: bash -c "bunzip2 -c atlas$$version.tar.bz2 | tar xfm - "
|
16
|
-
- exec_in: |
|
17
|
-
mv ATLAS ATLAS$$version # get unique dir name
|
18
|
-
mkdir ATLAS$$version/Linux_test # create BLDdir
|
19
|
-
cd ATLAS$$version/Linux_test/
|
20
|
-
../configure -b 64 -D c -DPentiumCPS=2400
|
21
|
-
make build
|
22
|
-
make check
|
23
|
-
make ptcheck ## this is for parallel tests
|
24
|
-
make time ## this is interactive
|
25
|
-
make install
|
@@ -1,24 +0,0 @@
|
|
1
|
-
|
2
|
-
- download_tarball:
|
3
|
-
- exec_local: |
|
4
|
-
cd /tmp/
|
5
|
-
wget -q $$repository/hpl-$$version.tar.gz
|
6
|
-
- local2in:
|
7
|
-
- /tmp/hpl-$$version.tar.gz
|
8
|
-
- /root/hpl-$$version.tar.gz
|
9
|
-
|
10
|
-
|
11
|
-
- install:
|
12
|
-
- exec_in: cd /root/
|
13
|
-
- exec_in: |
|
14
|
-
tar -xvf hpl-$$version.tar.gz
|
15
|
-
mv hpl-$$version hpl
|
16
|
-
|
17
|
-
- local2in:
|
18
|
-
- $$hpl_makefile
|
19
|
-
- /root/hpl/Make.Linux
|
20
|
-
|
21
|
-
- exec_in: |
|
22
|
-
rm /usr/lib/libf2c.so
|
23
|
-
ln -s /usr/lib/libf2c.a /usr/lib/libf2c.so
|
24
|
-
make -C /root/hpl/ arch=Linux
|
@@ -1,51 +0,0 @@
|
|
1
|
-
.. _`installation`:
|
2
|
-
|
3
|
-
------------
|
4
|
-
Installation
|
5
|
-
------------
|
6
|
-
|
7
|
-
Gem package
|
8
|
-
-----------
|
9
|
-
|
10
|
-
To install the latest release from `RubyGems`_:
|
11
|
-
|
12
|
-
.. _RubyGems: https://rubygems.org/gems/kameleon-builder
|
13
|
-
|
14
|
-
::
|
15
|
-
|
16
|
-
gem install kameleon-builder
|
17
|
-
|
18
|
-
Or from source::
|
19
|
-
|
20
|
-
git clone https://github.com/oar-team/kameleon.git && cd kameleon
|
21
|
-
gem build kameleon-builder.gemspec
|
22
|
-
gem install kameleon-builder-*.gem
|
23
|
-
|
24
|
-
On debian based distribution be sure to install the ``ruby-dev`` package first
|
25
|
-
|
26
|
-
|
27
|
-
Dist packages
|
28
|
-
-------------
|
29
|
-
|
30
|
-
These packages contain Kameleon and all its dependencies (Ruby, polipo and all
|
31
|
-
gems with their native extensions already compiled). These packages are made
|
32
|
-
with `omnibus project`_.
|
33
|
-
|
34
|
-
.. _`omnibus project`: https://github.com/opscode/omnibus-ruby
|
35
|
-
|
36
|
-
+-------------------------------+------------------------+--------------------------------------------+----------------------------------+
|
37
|
-
| | Platform | Download | MD5 |
|
38
|
-
+-------------------------------+------------------------+--------------------------------------------+----------------------------------+
|
39
|
-
| .. image:: _static/debian.png | **Debian 7 64bit** | `kameleon_2.1.3-omnibus-1_amd64.deb`_ | dc69d6386b1acb5b9434e8c186ad962c |
|
40
|
-
| :align: center | | | |
|
41
|
-
+-------------------------------+------------------------+--------------------------------------------+----------------------------------+
|
42
|
-
| .. image:: _static/ubuntu.png | **Ubuntu 12.04 64bit** | `kameleon_2.1.3-omnibus-1_amd64.deb`_ | dc69d6386b1acb5b9434e8c186ad962c |
|
43
|
-
| :align: center | | | |
|
44
|
-
+-------------------------------+------------------------+--------------------------------------------+----------------------------------+
|
45
|
-
| .. image:: _static/centos.png | **CentOS 6.5 64bit** | `kameleon-2.1.3_omnibus-1.el6.x86_64.rpm`_ | 7bc5cee07249f5d4c316e5ea885a2949 |
|
46
|
-
| :align: center | | | |
|
47
|
-
+-------------------------------+------------------------+--------------------------------------------+----------------------------------+
|
48
|
-
|
49
|
-
|
50
|
-
.. _`kameleon_2.1.3-omnibus-1_amd64.deb`: http://kameleon.imag.fr/pkg/kameleon_2.1.3-omnibus-1_amd64.deb
|
51
|
-
.. _`kameleon-2.1.3_omnibus-1.el6.x86_64.rpm`: http://kameleon.imag.fr/pkg/kameleon-2.1.3_omnibus-1.el6.x86_64.rpm
|
@@ -1,34 +0,0 @@
|
|
1
|
-
.. _`persistent_cache`:
|
2
|
-
|
3
|
-
----------------
|
4
|
-
Persistent Cache
|
5
|
-
----------------
|
6
|
-
|
7
|
-
.. versionadded:: 2.0.1
|
8
|
-
|
9
|
-
In order to exactly reconstruct a software appliance with the same exact
|
10
|
-
version of packages. Kameleon offer the option of creating a persistent cache
|
11
|
-
that will catch all the software packages during the building of the software
|
12
|
-
appliance. Enabling other to reconstruct the same exact software appliance
|
13
|
-
with the right package versions. Kameleon uses Polipo [1]_ which is a tiny and
|
14
|
-
lightweight web proxy to cache most of the packages that comes form the
|
15
|
-
network. First of all, you have to install Polipo on your system. If you are
|
16
|
-
under a debian distribution you can install it using the package manager::
|
17
|
-
|
18
|
-
sudo apt-get install polipo
|
19
|
-
|
20
|
-
You can as well build it from sources and then specify the path of the
|
21
|
-
generated binary using the option ``--proxy_path``. To use, you just have to
|
22
|
-
add the option ``--cache`` as an argument of the build command.
|
23
|
-
For example::
|
24
|
-
|
25
|
-
kameleon build my_recipe.yaml -b /tmp/kameleon/ --cache
|
26
|
-
|
27
|
-
This will create a tar file in the build directory ``/tmp/kameleon`` called
|
28
|
-
``my_recipe-cache.tar``. In order to use this generated cache file in
|
29
|
-
another build, we have just to use the options ``--from_cache`` as follows::
|
30
|
-
|
31
|
-
kameleon build my_recipe.yaml -b /tmp/kameleon/ --from_cache /tmp/my_recipe-cache.tar
|
32
|
-
|
33
|
-
|
34
|
-
.. [1] http://www.pps.univ-paris-diderot.fr/~jch/software/polipo/
|
data/docs/source/recipe.rst
DELETED
@@ -1,177 +0,0 @@
|
|
1
|
-
------
|
2
|
-
Recipe
|
3
|
-
------
|
4
|
-
|
5
|
-
Kameleon reads YAML files, named *recipes*, that describes how you will
|
6
|
-
build your appliance. These files are stored in the root of your :ref:`workspace`.
|
7
|
-
A recipe is a hierarchical structure of `Section`_, `Step`_, `Microstep`_ and
|
8
|
-
:ref:`commands`. Here is an overview of this structure:
|
9
|
-
|
10
|
-
.. code-block:: yaml
|
11
|
-
|
12
|
-
recipe
|
13
|
-
|
|
14
|
-
`-- section
|
15
|
-
|
|
16
|
-
`-- step
|
17
|
-
|
|
18
|
-
`-- microstep
|
19
|
-
|
|
20
|
-
`-- command
|
21
|
-
|
22
|
-
The recipe also contains set of `Global variables`_ declaration and some
|
23
|
-
imports like :ref:`aliases` and :ref:`checkpoint`.
|
24
|
-
|
25
|
-
Here is an example of a recipe:
|
26
|
-
|
27
|
-
.. literalinclude:: debian7.yaml
|
28
|
-
:language: yaml
|
29
|
-
|
30
|
-
Section
|
31
|
-
-------
|
32
|
-
|
33
|
-
Each section is a group of steps. Currently, there are 3 sections:
|
34
|
-
|
35
|
-
bootstrap
|
36
|
-
This section contains the bootstrap of the new system and create the *in*
|
37
|
-
context (see :ref:`context`).
|
38
|
-
|
39
|
-
setup
|
40
|
-
It is dedicated to install and configuration steps.
|
41
|
-
|
42
|
-
export
|
43
|
-
Export the generated appliance in the format of your choice.
|
44
|
-
|
45
|
-
|
46
|
-
.. _`step`:
|
47
|
-
.. _`microstep`:
|
48
|
-
|
49
|
-
Step and microstep
|
50
|
-
-------------------
|
51
|
-
|
52
|
-
Each *step* contains a list of *microsteps* that contains a list of :ref:`commands`
|
53
|
-
written in one YAML file. To be found by Kameleon this file must be named by
|
54
|
-
with the step name plus the YAML extension ``.yaml``. For example the
|
55
|
-
``software_install.yaml`` step file looks like this:
|
56
|
-
|
57
|
-
.. code-block:: yaml
|
58
|
-
|
59
|
-
# Software Install
|
60
|
-
- add_contribs_source:
|
61
|
-
- exec_in: perl -pi -e "s/main$/main contrib non-free/" /etc/apt/sources.list
|
62
|
-
- update_repositories:
|
63
|
-
- exec_in: apt-get -y --force-yes update
|
64
|
-
- upgrade_system:
|
65
|
-
- exec_in: apt-get -y --force-yes dist-upgrade
|
66
|
-
- clean:
|
67
|
-
- on_export_init:
|
68
|
-
- exec_in: apt-get -y --force-yes autoclean
|
69
|
-
- exec_in: apt-get -y --force-yes clean
|
70
|
-
- exec_in: apt-get -y --force-yes autoremove
|
71
|
-
# default packages
|
72
|
-
- packages: "ntp sudo"
|
73
|
-
- extra_packages:
|
74
|
-
- exec_in: apt-get -y --force-yes install $$packages
|
75
|
-
|
76
|
-
|
77
|
-
A step will be called like a function in the recipe. You should provide a set
|
78
|
-
of local variables if needed by the step or to override default variables (see
|
79
|
-
Variables_). Optionally, you can select only some microsteps to execute. Here
|
80
|
-
is an example of step call:
|
81
|
-
|
82
|
-
.. code-block:: yaml
|
83
|
-
|
84
|
-
- software_install:
|
85
|
-
- update_repositories
|
86
|
-
- add_contribs_source
|
87
|
-
- clean
|
88
|
-
- extra_packages
|
89
|
-
- packages: "debian-keyring ntp zip unzip rsync sudo"
|
90
|
-
|
91
|
-
Steps path
|
92
|
-
~~~~~~~~~~
|
93
|
-
|
94
|
-
The steps are YAML formated files stored in the ``recipe/steps`` directory of
|
95
|
-
the :ref:`workspace`. To enable a better recipe reuse and ease of write the steps
|
96
|
-
are stored by default in specific folders depending on the sections.
|
97
|
-
|
98
|
-
Kameleon is looking for the steps files using the ``include_steps`` list value,
|
99
|
-
if it is set in the recipe (NOT mandatory). These includes are often the
|
100
|
-
distribution steps. For example if you are building an ubuntu based
|
101
|
-
distribution you can use:
|
102
|
-
|
103
|
-
.. code-block:: yaml
|
104
|
-
|
105
|
-
include_steps:
|
106
|
-
- ubuntu
|
107
|
-
- debian/wheezy
|
108
|
-
- debian
|
109
|
-
|
110
|
-
It also search uppermost within the current section folder. For the previous
|
111
|
-
example, in the bootstrap section, the search paths are scanned in this
|
112
|
-
order:
|
113
|
-
|
114
|
-
.. code-block:: yaml
|
115
|
-
|
116
|
-
steps/bootstrap/ubuntu
|
117
|
-
steps/ubuntu
|
118
|
-
steps/bootstrap/debian/wheezy
|
119
|
-
steps/debian/wheezy
|
120
|
-
steps/bootstrap/debian
|
121
|
-
steps/debian
|
122
|
-
steps/bootstrap/
|
123
|
-
steps/
|
124
|
-
|
125
|
-
|
126
|
-
Variables
|
127
|
-
---------
|
128
|
-
|
129
|
-
Kameleon is using preprocessed variables. You can define it with the YAML
|
130
|
-
key/value syntax ``my_var: my_value``.To access these variables you have to use
|
131
|
-
the two dollars (``$$``) prefix. Like in a Shell you can also use
|
132
|
-
``$${var_name}`` to include your variables in string like this
|
133
|
-
``my-$${variable_name}-templated``. It's also possible to use nested variables
|
134
|
-
like:
|
135
|
-
|
136
|
-
.. code-block:: yaml
|
137
|
-
|
138
|
-
my_var: foo
|
139
|
-
my_nested_var: $${my_var}-bar
|
140
|
-
|
141
|
-
Be careful, in YAML you cannot mix dictionary and list on the same level.
|
142
|
-
That's why, in the global dictionary, you can define your variables like in the
|
143
|
-
example above but, in the recipe or the steps, you must prefix your variable
|
144
|
-
with a ``-`` like this ``- my_var: foo``.
|
145
|
-
|
146
|
-
|
147
|
-
Global variables
|
148
|
-
~~~~~~~~~~~~~~~~~
|
149
|
-
|
150
|
-
Global variables are defined in the ``global`` dictionary of the recipe.
|
151
|
-
Kameleon use some global variable to enable the appliance build. See :ref:`context`
|
152
|
-
and `Steps path`_ for more details
|
153
|
-
|
154
|
-
|
155
|
-
Step local variables
|
156
|
-
~~~~~~~~~~~~~~~~~~~~
|
157
|
-
|
158
|
-
In the recipe, you can provide some variables when you call a step. This
|
159
|
-
variable override the global and the default variables.
|
160
|
-
|
161
|
-
|
162
|
-
Step default variables
|
163
|
-
~~~~~~~~~~~~~~~~~~~~~~
|
164
|
-
|
165
|
-
In the step file, you can define some default variables for your microsteps. Be
|
166
|
-
careful, to avoid some mistakes, these variables can be override by the step
|
167
|
-
local variables but not by the global ones. If this is the behavior you
|
168
|
-
expected just add a step local variable that take the global variable value
|
169
|
-
like this:
|
170
|
-
|
171
|
-
.. code-block:: yaml
|
172
|
-
|
173
|
-
global:
|
174
|
-
foo: bar
|
175
|
-
setup:
|
176
|
-
- my_step:
|
177
|
-
- foo: $$foo
|
@@ -1,19 +0,0 @@
|
|
1
|
-
- tau_version: "2.22.2"
|
2
|
-
- pdt_version: "3.19"
|
3
|
-
- get_tau:
|
4
|
-
- exec_in: cd /tmp/
|
5
|
-
- exec_in: wget -q http://www.cs.uoregon.edu/research/tau/tau_releases/tau-$$tau_version.tar.gz
|
6
|
-
- exec_in: wget -q http://www.cs.uoregon.edu/research/tau/pdt_releases/pdt-$$pdt_version.tar.gz
|
7
|
-
- pdt_install:
|
8
|
-
- exec_in: cd /tmp/
|
9
|
-
- exec_in: tar -xzf pdt-$$pdt_version.tar.gz
|
10
|
-
- exec_in: cd /tmp/pdtoolkit-$$pdt_version
|
11
|
-
- exec_in: ./configure -prefix=/usr/local/pdt-install
|
12
|
-
- exec_in: make clean install
|
13
|
-
|
14
|
-
- tau_install:
|
15
|
-
- exec_in: cd /tmp/
|
16
|
-
- exec_in: tar -xzf tau-$$tau_version.tar.gz
|
17
|
-
- exec_in: cd /tmp/tau-$$tau_version
|
18
|
-
- exec_in: ./configure -prefix=/usr/local/tau-install -pdt=/usr/local/pdt-install/ -mpiinc=/usr/local/openmpi-install/include -mpilib=/usr/local/openmpi-install/lib
|
19
|
-
- exec_in: make install
|
@@ -1,25 +0,0 @@
|
|
1
|
-
- tau_version: "2.22.2"
|
2
|
-
- pdt_version: "3.19"
|
3
|
-
- get_tau:
|
4
|
-
- exec_local: cd /tmp/
|
5
|
-
- exec_local: wget -q http://www.cs.uoregon.edu/research/tau/tau_releases/tau-$$tau_version.tar.gz
|
6
|
-
- exec_local: wget -q http://www.cs.uoregon.edu/research/tau/pdt_releases/pdt-$$pdt_version.tar.gz
|
7
|
-
- local2in:
|
8
|
-
- /tmp/tau-$$tau_version.tar.gz
|
9
|
-
- /tmp/tau-$$tau_version.tar.gz
|
10
|
-
- local2in:
|
11
|
-
- /tmp/pdt-$$pdt_version.tar.gz
|
12
|
-
- /tmp/pdt-$$pdt_version.tar.gz
|
13
|
-
- pdt_install:
|
14
|
-
- exec_in: cd /tmp/
|
15
|
-
- exec_in: tar -xzf pdt-$$pdt_version.tar.gz
|
16
|
-
- exec_in: cd /tmp/pdtoolkit-$$pdt_version
|
17
|
-
- exec_in: ./configure -prefix=/usr/local/pdt-install
|
18
|
-
- exec_in: make clean install
|
19
|
-
|
20
|
-
- tau_install:
|
21
|
-
- exec_in: cd /tmp/
|
22
|
-
- exec_in: tar -xzf tau-$$tau_version.tar.gz
|
23
|
-
- exec_in: cd /tmp/tau-$$tau_version
|
24
|
-
- exec_in: ./configure -prefix=/usr/local/tau-install -pdt=/usr/local/pdt-install/ -mpiinc=/usr/local/openmpi-install/include -mpilib=/usr/local/openmpi-install/lib
|
25
|
-
- exec_in: make install
|
data/docs/source/use_cases.rst
DELETED
@@ -1,93 +0,0 @@
|
|
1
|
-
.. _`use cases`:
|
2
|
-
|
3
|
-
---------
|
4
|
-
Use Cases
|
5
|
-
---------
|
6
|
-
|
7
|
-
Here it is described different use cases for Kameleon. It should give you a better
|
8
|
-
idea, through examples, of how Kameleon is useful for.
|
9
|
-
|
10
|
-
Distribute an environnement to your co-workers/students/friends/...
|
11
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
12
|
-
Whit Kameleon you can easily export your environnement in any format. The
|
13
|
-
export section of the recipe is made for this. For example, if you would like
|
14
|
-
to export your image in vdi format to use VirtualBox you just have to uncomment
|
15
|
-
the right line. Like in the debian7 template::
|
16
|
-
|
17
|
-
#== Export the generated appliance in the format of your choice
|
18
|
-
export:
|
19
|
-
- save_appliance_from_nbd:
|
20
|
-
- mountdir: $$rootfs
|
21
|
-
- filename: "$${kameleon_recipe_name}"
|
22
|
-
- save_as_qcow2
|
23
|
-
# - save_as_qed
|
24
|
-
# - save_as_tgz
|
25
|
-
# - save_as_raw
|
26
|
-
# - save_as_vmdk
|
27
|
-
- save_as_vdi
|
28
|
-
|
29
|
-
Make a Linux virtual machine with graphical support
|
30
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
31
|
-
You can directly use the templates that provide a desktop. However, here is an
|
32
|
-
example of adding desktop capability to the ``debian8`` template. First create
|
33
|
-
a new recipe from this template::
|
34
|
-
|
35
|
-
kameleon new debian8-dektop -t debian8
|
36
|
-
|
37
|
-
Then edit the recipe file ``debian8-dektop.yaml`` and add ``gnome-core`` and ``xorg``
|
38
|
-
packages to the install list::
|
39
|
-
|
40
|
-
setup:
|
41
|
-
# Install
|
42
|
-
- software_install:
|
43
|
-
- packages: >
|
44
|
-
debian-keyring ntp zip unzip rsync sudo less vim bash-completion
|
45
|
-
gnome-core xorg
|
46
|
-
|
47
|
-
These packages take some extra space, so add some space on the disk. 4G should
|
48
|
-
be enough::
|
49
|
-
|
50
|
-
bootstrap:
|
51
|
-
...
|
52
|
-
- create_disk_nbd:
|
53
|
-
- image_size: 4G
|
54
|
-
|
55
|
-
Build your recipe::
|
56
|
-
|
57
|
-
sudo kameleon build debian8-desktop
|
58
|
-
|
59
|
-
When the build has finished, you can try you image with Qemu::
|
60
|
-
|
61
|
-
sudo qemu-system-x86_64 -m 1024 --enable-kvm -vga std \
|
62
|
-
builds/debian8-desktop/debian8-desktop.qcow2
|
63
|
-
|
64
|
-
Alternatively, you could use ``virt-manager`` that provide a good GUI to manage
|
65
|
-
your virtual machines.
|
66
|
-
|
67
|
-
.. note::
|
68
|
-
If you want a better integration between the host and the guest like
|
69
|
-
copy/paste use ``spice`` (http://www.linux-kvm.org/page/SPICE)
|
70
|
-
|
71
|
-
|
72
|
-
Create a fully reproducible experimental environement
|
73
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
74
|
-
You should use the :ref:`persistent_cache` feature.
|
75
|
-
|
76
|
-
.. todo::
|
77
|
-
Give a complete use case.
|
78
|
-
|
79
|
-
Create a persistent live USB key
|
80
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
81
|
-
A dirty but reliable method to do this is to cat the entire raw disk on the USB
|
82
|
-
key. First be sure that the disk size is equal or smaller then your
|
83
|
-
Then, export you image in raw format (this is the disk content bit by bit) and
|
84
|
-
dump it to your USB key. Once your image is built, if your USB key is the
|
85
|
-
``/dev/sdb`` device, be sure that it is not mounted and just do this::
|
86
|
-
|
87
|
-
cat my_image.raw > /dev/my_key
|
88
|
-
|
89
|
-
.. warning::
|
90
|
-
This is a dangerous operation, you usb key will erase without
|
91
|
-
warning! Be sure that you pick the right device (use lsblk): it should be
|
92
|
-
``/dev/sdX`` where X is a letter. Do NOT use the ``dev/sdXY``. unmount it
|
93
|
-
and use the root device instead.
|