kameleon-builder 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.rst +10 -0
- data/docs/source/_static/centos.png +0 -0
- data/docs/source/_static/debian.png +0 -0
- data/docs/source/_static/ubuntu.png +0 -0
- data/docs/source/_themes/sphinx_rtd_theme/__init__.py +17 -0
- data/docs/source/_themes/sphinx_rtd_theme/breadcrumbs.html +19 -0
- data/docs/source/_themes/sphinx_rtd_theme/footer.html +32 -0
- data/docs/source/_themes/sphinx_rtd_theme/layout.html +160 -0
- data/docs/source/_themes/sphinx_rtd_theme/layout_old.html +205 -0
- data/docs/source/_themes/sphinx_rtd_theme/search.html +50 -0
- data/docs/source/_themes/sphinx_rtd_theme/searchbox.html +7 -0
- data/docs/source/_themes/sphinx_rtd_theme/static/css/badge_only.css +1 -0
- data/docs/source/_themes/sphinx_rtd_theme/static/css/theme.css +4 -0
- 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 +414 -0
- 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 +47 -0
- data/docs/source/_themes/sphinx_rtd_theme/theme.conf +8 -0
- data/docs/source/_themes/sphinx_rtd_theme/versions.html +37 -0
- data/docs/source/aliases.rst +2 -2
- data/docs/source/atlas_debian_g5k.yaml +36 -0
- data/docs/source/checkpoint.rst +1 -1
- data/docs/source/conf.py +4 -6
- data/docs/source/debian7.yaml +2 -2
- data/docs/source/getting_started.rst +132 -104
- data/docs/source/grid5000_tutorial.rst +36 -24
- data/docs/source/install_atlas.yaml +25 -0
- data/docs/source/install_hpl.yaml +24 -0
- data/docs/source/installation.rst +30 -16
- data/docs/source/persistent_cache.rst +3 -3
- data/docs/source/recipe.rst +6 -92
- data/docs/source/tau_install.yaml +19 -0
- data/docs/source/tau_install_g5k.yaml +13 -12
- data/docs/source/workspace.rst +2 -2
- data/lib/kameleon/cli.rb +3 -3
- data/lib/kameleon/recipe.rb +5 -6
- data/lib/kameleon/utils.rb +3 -4
- data/templates/{old-debian7.yaml → debian7-chroot.yaml} +1 -1
- data/version.txt +1 -1
- metadata +27 -3
@@ -0,0 +1,47 @@
|
|
1
|
+
$( document ).ready(function() {
|
2
|
+
// Shift nav in mobile when clicking the menu.
|
3
|
+
$(document).on('click', "[data-toggle='wy-nav-top']", function() {
|
4
|
+
$("[data-toggle='wy-nav-shift']").toggleClass("shift");
|
5
|
+
$("[data-toggle='rst-versions']").toggleClass("shift");
|
6
|
+
});
|
7
|
+
// Close menu when you click a link.
|
8
|
+
$(document).on('click', ".wy-menu-vertical .current ul li a", function() {
|
9
|
+
$("[data-toggle='wy-nav-shift']").removeClass("shift");
|
10
|
+
$("[data-toggle='rst-versions']").toggleClass("shift");
|
11
|
+
});
|
12
|
+
$(document).on('click', "[data-toggle='rst-current-version']", function() {
|
13
|
+
$("[data-toggle='rst-versions']").toggleClass("shift-up");
|
14
|
+
});
|
15
|
+
// Make tables responsive
|
16
|
+
$("table.docutils:not(.field-list)").wrap("<div class='wy-table-responsive'></div>");
|
17
|
+
});
|
18
|
+
|
19
|
+
window.SphinxRtdTheme = (function (jquery) {
|
20
|
+
var stickyNav = (function () {
|
21
|
+
var navBar,
|
22
|
+
win,
|
23
|
+
stickyNavCssClass = 'stickynav',
|
24
|
+
applyStickNav = function () {
|
25
|
+
if (navBar.height() <= win.height()) {
|
26
|
+
navBar.addClass(stickyNavCssClass);
|
27
|
+
} else {
|
28
|
+
navBar.removeClass(stickyNavCssClass);
|
29
|
+
}
|
30
|
+
},
|
31
|
+
enable = function () {
|
32
|
+
applyStickNav();
|
33
|
+
win.on('resize', applyStickNav);
|
34
|
+
},
|
35
|
+
init = function () {
|
36
|
+
navBar = jquery('nav.wy-nav-side:first');
|
37
|
+
win = jquery(window);
|
38
|
+
};
|
39
|
+
jquery(init);
|
40
|
+
return {
|
41
|
+
enable : enable
|
42
|
+
};
|
43
|
+
}());
|
44
|
+
return {
|
45
|
+
StickyNav : stickyNav
|
46
|
+
};
|
47
|
+
}($));
|
@@ -0,0 +1,37 @@
|
|
1
|
+
{% if READTHEDOCS %}
|
2
|
+
{# Add rst-badge after rst-versions for small badge style. #}
|
3
|
+
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
|
4
|
+
<span class="rst-current-version" data-toggle="rst-current-version">
|
5
|
+
<span class="fa fa-book"> Read the Docs</span>
|
6
|
+
v: {{ current_version }}
|
7
|
+
<span class="fa fa-caret-down"></span>
|
8
|
+
</span>
|
9
|
+
<div class="rst-other-versions">
|
10
|
+
<dl>
|
11
|
+
<dt>Versions</dt>
|
12
|
+
{% for slug, url in versions %}
|
13
|
+
<dd><a href="{{ url }}">{{ slug }}</a></dd>
|
14
|
+
{% endfor %}
|
15
|
+
</dl>
|
16
|
+
<dl>
|
17
|
+
<dt>Downloads</dt>
|
18
|
+
{% for type, url in downloads %}
|
19
|
+
<dd><a href="{{ url }}">{{ type }}</a></dd>
|
20
|
+
{% endfor %}
|
21
|
+
</dl>
|
22
|
+
<dl>
|
23
|
+
<dt>On Read the Docs</dt>
|
24
|
+
<dd>
|
25
|
+
<a href="//{{ PRODUCTION_DOMAIN }}/projects/{{ slug }}/?fromdocs={{ slug }}">Project Home</a>
|
26
|
+
</dd>
|
27
|
+
<dd>
|
28
|
+
<a href="//{{ PRODUCTION_DOMAIN }}/builds/{{ slug }}/?fromdocs={{ slug }}">Builds</a>
|
29
|
+
</dd>
|
30
|
+
</dl>
|
31
|
+
<hr/>
|
32
|
+
Free document hosting provided by <a href="http://www.readthedocs.org">Read the Docs</a>.
|
33
|
+
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
{% endif %}
|
37
|
+
|
data/docs/source/aliases.rst
CHANGED
@@ -5,8 +5,8 @@ Aliases
|
|
5
5
|
-------
|
6
6
|
|
7
7
|
The aliases can be used anywhere instead of a Kameleon command. Some aliases
|
8
|
-
are provided with the templates in the ``aliases/defaults.yaml`` files
|
9
|
-
your workspace. You can add your own aliases in this file.
|
8
|
+
are provided with the templates in the ``steps/aliases/defaults.yaml`` files
|
9
|
+
within your workspace. You can add your own aliases in this file.
|
10
10
|
|
11
11
|
An alias is define by its name as a key and a list of commands as a value. You
|
12
12
|
can call an alias with any number of arguments given in a list.
|
@@ -0,0 +1,36 @@
|
|
1
|
+
#==============================================================================
|
2
|
+
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
|
3
|
+
#==============================================================================
|
4
|
+
#
|
5
|
+
# DESCRIPTION: <MY RECIPE DESCRIPTION>
|
6
|
+
#
|
7
|
+
#==============================================================================
|
8
|
+
|
9
|
+
---
|
10
|
+
extend: debian7-g5k
|
11
|
+
|
12
|
+
global:
|
13
|
+
# You can see the base template `debian7.yaml` to know the
|
14
|
+
# variables that you can override
|
15
|
+
g5k_user: user # CHANGE ME
|
16
|
+
g5k_site: grenoble # CHANGE ME
|
17
|
+
|
18
|
+
bootstrap:
|
19
|
+
- @base
|
20
|
+
|
21
|
+
setup:
|
22
|
+
- @base
|
23
|
+
- install_software:
|
24
|
+
- packages: >
|
25
|
+
g++ make taktuk openssh-server openmpi-bin openmpi-common openmpi-dev
|
26
|
+
build-essential gfortran fort77 gnome-applets
|
27
|
+
- install_atlas:
|
28
|
+
- repository: http://sourceforge.net/projects/math-atlas/files/Stable/
|
29
|
+
- version: "3.10.1"
|
30
|
+
- install_hpl:
|
31
|
+
- repository: "http://www.netlib.org/benchmark/hpl/"
|
32
|
+
- version: "2.1"
|
33
|
+
- hpl_makefile: "/tmp/Make.Linux"
|
34
|
+
|
35
|
+
export:
|
36
|
+
- @base
|
data/docs/source/checkpoint.rst
CHANGED
@@ -7,7 +7,7 @@ Checkpoint
|
|
7
7
|
Kameleon provide a modular Checkpoint mechanism. Indeed, Kameleon give you the
|
8
8
|
possibility to implement your own checkpoint mechanism, using for example the
|
9
9
|
snapshot feature of your underneath filesystem. To do so, you have to fill in a
|
10
|
-
YAML file, located in the ``checkpoints`` folder of your workspace, in which
|
10
|
+
YAML file, located in the ``steps/checkpoints`` folder of your workspace, in which
|
11
11
|
you have to define 4 commands:
|
12
12
|
|
13
13
|
create
|
data/docs/source/conf.py
CHANGED
@@ -86,7 +86,7 @@ exclude_patterns = ['_build']
|
|
86
86
|
#show_authors = False
|
87
87
|
|
88
88
|
# The name of the Pygments (syntax highlighting) style to use.
|
89
|
-
pygments_style = 'sphinx'
|
89
|
+
# pygments_style = 'sphinx'
|
90
90
|
|
91
91
|
# A list of ignored prefixes for module index sorting.
|
92
92
|
#modindex_common_prefix = []
|
@@ -100,12 +100,10 @@ pygments_style = 'sphinx'
|
|
100
100
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
101
101
|
# a list of builtin themes.
|
102
102
|
# on_rtd is whether we are on readthedocs.org
|
103
|
-
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
104
103
|
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
104
|
+
html_theme = 'sphinx_rtd_theme'
|
105
|
+
html_theme_path = ['_themes']
|
106
|
+
# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
109
107
|
|
110
108
|
# Theme options are theme-specific and customize the look and feel of a theme
|
111
109
|
# further. For a list of options available for each theme, see the
|
data/docs/source/debian7.yaml
CHANGED
@@ -64,7 +64,7 @@ global:
|
|
64
64
|
ssh_config_file: $$kameleon_cwd/ssh_config
|
65
65
|
in_context:
|
66
66
|
cmd: LC_ALL=POSIX ssh -F $$ssh_config_file $$kameleon_recipe_name -t /bin/bash
|
67
|
-
workdir: /
|
67
|
+
workdir: /root/kameleon_workdir
|
68
68
|
|
69
69
|
#== Bootstrap the new system and create the 'in_context'
|
70
70
|
bootstrap:
|
@@ -96,7 +96,7 @@ setup:
|
|
96
96
|
- dist_upgrade: true
|
97
97
|
- install_software:
|
98
98
|
- packages: >
|
99
|
-
debian-keyring ntp
|
99
|
+
debian-keyring ntp rsync sudo less vim bash-completion
|
100
100
|
- configure_kernel:
|
101
101
|
- arch: $$arch
|
102
102
|
# Configuration
|
@@ -2,9 +2,6 @@
|
|
2
2
|
Getting Started
|
3
3
|
---------------
|
4
4
|
|
5
|
-
.. note::
|
6
|
-
This page is a work in progress...
|
7
|
-
|
8
5
|
Installation
|
9
6
|
~~~~~~~~~~~~
|
10
7
|
|
@@ -28,65 +25,91 @@ with Kameleon::
|
|
28
25
|
The following templates are available in /var/lib/gems/1.9.1/gems/kameleon-builder-2.0.0/templates:
|
29
26
|
NAME | DESCRIPTION
|
30
27
|
---------------------|-----------------------------------------------------------
|
31
|
-
|
32
|
-
|
33
|
-
debian-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
28
|
+
archlinux | Build an Archlinux base system system.
|
29
|
+
archlinux-desktop | Archlinux GNOME Desktop edition.
|
30
|
+
debian-testing | Debian Testing base system
|
31
|
+
debian7 | Debian 7 (Wheezy) base system
|
32
|
+
debian7-desktop | Debian 7 (Wheezy) GNOME Desktop edition.
|
33
|
+
debian7-kameleon | Debian 7 appliance with kameleon.
|
34
|
+
debian7-oar-dev | Debian 7 dev appliance with OAR-2.5 (node/server/frontend).
|
35
|
+
docker-debian7 | Build a debian image for docker with docker
|
36
|
+
fedora-rawhide | Fedora Rawhide base system
|
37
|
+
fedora20 | Fedora 20 base system
|
38
|
+
fedora20-desktop | Fedora 20 GNOME Desktop edition
|
39
|
+
old-debian7 | [deprecated] Build a debian wheezy appliance using chroot...
|
40
|
+
ubuntu-12.04 | Ubuntu 12.04 LTS (Precise Pangolin) base system.
|
41
|
+
ubuntu-12.04-desktop | Ubuntu 12.04 LTS (Precise Pangolin) Desktop edition.
|
42
|
+
ubuntu-14.04 | Ubuntu 14.04 LTS (Trusty Tahr) base system.
|
43
|
+
ubuntu-14.04-desktop | Ubuntu 14.04 LTS (Trusty Tahr) Desktop edition.
|
44
|
+
vagrant-debian7 | A standard Debian 7 vagrant base box
|
45
|
+
|
46
|
+
Let's pick one of these. The ``debian7`` is a good example. Now you
|
47
|
+
will create a new recipe from this template. Let's name it ``my_debian``::
|
48
|
+
|
49
|
+
kameleon new my_debian debian7
|
39
50
|
|
40
51
|
Kameleon make a direct copy of the YAML template recipe file and all
|
41
52
|
the other required files like steps or aliases ones. You can see that in the
|
42
53
|
``new`` command output::
|
43
54
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
55
|
+
[kameleon]: Cloning template 'debian7'...
|
56
|
+
[kameleon]: create /root/debian7.yaml
|
57
|
+
[kameleon]: create /root/steps/aliases/defaults.yaml
|
58
|
+
[kameleon]: create /root/steps/checkpoints/qemu.yaml
|
59
|
+
[kameleon]: create /root/steps/export/save_appliance.yaml
|
60
|
+
[kameleon]: create /root/steps/setup/debian/configure_apt.yaml
|
61
|
+
[kameleon]: create /root/steps/setup/debian/upgrade_system.yaml
|
62
|
+
[kameleon]: create /root/steps/setup/debian/install_software.yaml
|
63
|
+
[kameleon]: create /root/steps/setup/debian/configure_kernel.yaml
|
64
|
+
[kameleon]: create /root/steps/setup/debian/configure_system.yaml
|
65
|
+
[kameleon]: create /root/steps/setup/debian/configure_keyboard.yaml
|
66
|
+
[kameleon]: create /root/steps/setup/debian/configure_network.yaml
|
67
|
+
[kameleon]: create /root/steps/setup/create_group.yaml
|
68
|
+
[kameleon]: create /root/steps/setup/create_user.yaml
|
69
|
+
[kameleon]: create /root/steps/bootstrap/debian/debootstrap.yaml
|
70
|
+
[kameleon]: create /root/steps/bootstrap/initialize_disk_qemu.yaml
|
71
|
+
[kameleon]: create /root/steps/bootstrap/prepare_qemu.yaml
|
72
|
+
[kameleon]: create /root/steps/bootstrap/install_bootloader.yaml
|
73
|
+
[kameleon]: create /root/steps/bootstrap/start_qemu.yaml
|
74
|
+
[kameleon]: Creating extended recipe from template 'debian7'...
|
75
|
+
[kameleon]: create /root/my_debian.yaml
|
76
|
+
[kameleon]: done
|
60
77
|
|
61
78
|
You can check that you got all the files in your workspace for example with the
|
62
79
|
UNIX ``tree`` command::
|
63
80
|
|
64
81
|
tree
|
65
82
|
.
|
66
|
-
`--
|
83
|
+
`-- debian7.yaml
|
84
|
+
`-- my_debian.yaml
|
85
|
+
`-- steps
|
67
86
|
|-- aliases
|
68
87
|
| `-- defaults.yaml
|
88
|
+
|-- bootstrap
|
89
|
+
| |-- debian
|
90
|
+
| | `-- debootstrap.yaml
|
91
|
+
| |-- initialize_disk_qemu.yaml
|
92
|
+
| |-- install_bootloader.yaml
|
93
|
+
| |-- prepare_qemu.yaml
|
94
|
+
| `-- start_qemu.yaml
|
69
95
|
|-- checkpoints
|
70
|
-
| `--
|
71
|
-
|--
|
72
|
-
`--
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|--
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
`-- system_config.yaml
|
88
|
-
|
89
|
-
9 directories, 13 files
|
96
|
+
| `-- qemu.yaml
|
97
|
+
|-- export
|
98
|
+
| `-- save_appliance.yaml
|
99
|
+
`-- setup
|
100
|
+
|-- create_group.yaml
|
101
|
+
|-- create_user.yaml
|
102
|
+
`-- debian
|
103
|
+
|-- configure_apt.yaml
|
104
|
+
|-- configure_kernel.yaml
|
105
|
+
|-- configure_keyboard.yaml
|
106
|
+
|-- configure_network.yaml
|
107
|
+
|-- configure_system.yaml
|
108
|
+
|-- install_software.yaml
|
109
|
+
`-- upgrade_system.yaml
|
110
|
+
|
111
|
+
|
112
|
+
8 directories, 19 files
|
90
113
|
|
91
114
|
To understand this hierarchy please refer to the :doc:`recipe` documentation.
|
92
115
|
|
@@ -102,49 +125,55 @@ from your system bootstrap to its export. It empowers you to customize anything
|
|
102
125
|
you want at anytime during the appliance build. But before changing anything
|
103
126
|
just build the template to see how it works::
|
104
127
|
|
105
|
-
kameleon build
|
128
|
+
kameleon build my_debian
|
106
129
|
|
107
130
|
Oups! Maybe you get an error like this::
|
108
131
|
|
109
132
|
...
|
110
|
-
[
|
111
|
-
[
|
112
|
-
[
|
113
|
-
[
|
114
|
-
[
|
115
|
-
[
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
133
|
+
[kameleon]: debootstrap is missing from out_context
|
134
|
+
[kameleon]: Press [c] to continue with execution
|
135
|
+
[kameleon]: Press [a] to abort execution
|
136
|
+
[kameleon]: Press [l] to switch to local_context shell
|
137
|
+
[kameleon]: Press [o] to switch to out_context shell
|
138
|
+
[kameleon]: Press [i] to switch to in_context shell
|
139
|
+
[kameleon]: answer ? [i/o/l/a/c]:
|
140
|
+
|
141
|
+
This is the interactive prompt of Kameleon.
|
142
|
+
|
143
|
+
It is a powerful tool that offers you the possibility to fix a problem if
|
144
|
+
something goes wrong during the build process. For this example, the problem is
|
145
|
+
due to the missing ``debootstrap`` binary.
|
146
|
+
|
147
|
+
So you have to install it on your ``out`` context (to read more about context
|
148
|
+
see the :doc:`context` page). Just type the ``o`` key and ``Enter``. Now you
|
149
|
+
are logged in your out context. If you are on a Debian based system install the
|
150
|
+
missing package::
|
151
|
+
|
152
|
+
(out_context) root@f4b261b5fad7: ~/build/my_debian # sudo apt-get install debootstrap
|
127
153
|
|
128
154
|
Press ``Ctrl-d`` or type ``exit`` to go back to the Kameleon prompt then press
|
129
155
|
``c`` and ``Enter`` to continue the build.
|
130
156
|
|
131
157
|
The first time it will take a while to finish the building process. But, Thanks
|
132
158
|
to the :doc:`checkpoint` mechanism you can abort with ``Ctrl-c`` anytime during
|
133
|
-
the build without problem.
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
159
|
+
the build without problem.
|
160
|
+
|
161
|
+
Every step is backed up and if you start the build again, it will skip all the
|
162
|
+
steps already done to restart at the point you have just stopped.
|
163
|
+
|
164
|
+
Moreover, if you change anything in the recipe Kameleon will know it (using
|
165
|
+
recipe and steps hashes), so your next build will automatically restart at the
|
166
|
+
right steps. Here is a good example: The first time you built your recipe you
|
167
|
+
should have something like this::
|
139
168
|
|
140
169
|
...
|
141
|
-
[
|
142
|
-
[
|
170
|
+
[kameleon]: Build recipe 'my_debian.yaml' is completed !
|
171
|
+
[kameleon]: Build total duration : 224 secs
|
143
172
|
...
|
144
173
|
|
145
174
|
Now you can run your appliance using qemu::
|
146
175
|
|
147
|
-
qemu-system-x86_64 -enable-kvm builds/
|
176
|
+
qemu-system-x86_64 -enable-kvm builds/my_debian/my_debian.qcow2
|
148
177
|
|
149
178
|
.. note::
|
150
179
|
If you do not have access to a graphical server use the ``-curses`` option
|
@@ -154,20 +183,19 @@ How to use the checkpoint
|
|
154
183
|
|
155
184
|
You just have to run the build again and you will notice that it is much faster::
|
156
185
|
|
157
|
-
kameleon build
|
186
|
+
kameleon build my_debian
|
158
187
|
...
|
159
|
-
[
|
160
|
-
[
|
161
|
-
[engine]: ---> Using cache
|
188
|
+
[kameleon]: Step 1 : bootstrap/_init_bootstrap/_init_0_debootstrap
|
189
|
+
[kameleon]: ---> Using cache
|
162
190
|
...
|
163
|
-
[
|
164
|
-
[
|
191
|
+
[kameleon]: Build recipe 'my_debian' is completed !
|
192
|
+
[kameleon]: Build total duration : 22 secs
|
165
193
|
...
|
166
194
|
|
167
195
|
As you can see Kameleon has used the checkpoint cache for each step and in
|
168
|
-
doing so it takes just
|
169
|
-
not change so there is no real challenge to build it so fast. Let's change
|
170
|
-
the user name for example. Open the ``
|
196
|
+
doing so it takes just 22 seconds to build the recipe again. Well the recipe
|
197
|
+
did not change so there is no real challenge to build it so fast. Let's change
|
198
|
+
the user name for example. Open the ``my_debian.yaml`` recipe file and in the
|
171
199
|
global section change the user name like this::
|
172
200
|
|
173
201
|
user_name: my_user
|
@@ -175,30 +203,28 @@ global section change the user name like this::
|
|
175
203
|
Save the file and re-build the recipe again. This is a part of the outputs you
|
176
204
|
should see::
|
177
205
|
|
178
|
-
kameleon build
|
206
|
+
kameleon build my_debian
|
179
207
|
...
|
180
|
-
[
|
181
|
-
[
|
182
|
-
[
|
183
|
-
[
|
184
|
-
[
|
185
|
-
[
|
186
|
-
[
|
187
|
-
[
|
188
|
-
[engine]: ---> 28b7a1fae5e2
|
189
|
-
[engine]: ---> Running step
|
190
|
-
[engine]: ---> Creating checkpoint : 28b7a1fae5e2
|
208
|
+
[kameleon]: Step 29 : setup/create_user/create_group
|
209
|
+
[kameleon]: ---> Using cache
|
210
|
+
[kameleon]: Step 30 : setup/create_user/add_user
|
211
|
+
[kameleon]: ---> Running step
|
212
|
+
[kameleon]: ---> Creating checkpoint : 6bde599e7ed1
|
213
|
+
[kameleon]: Step 31 : setup/create_user/add_group_to_sudoers
|
214
|
+
[kameleon]: ---> Running step
|
215
|
+
[kameleon]: ---> Creating checkpoint : 28b7a1fae5e2
|
191
216
|
...
|
192
|
-
[
|
193
|
-
[
|
217
|
+
[kameleon]: Build recipe 'my_debian' is completed !
|
218
|
+
[kameleon]: Build total duration : 29 secs
|
194
219
|
...
|
195
220
|
|
196
221
|
This need a little explanation: You have change the ``user_name`` value in the
|
197
|
-
recipe. This variable is firstly used in the ``add_user`` :ref:`microstep`, in
|
198
|
-
create_user :ref:`step` within the setup section.
|
199
|
-
|
200
|
-
|
201
|
-
|
222
|
+
recipe. This variable is firstly used in the ``add_user`` :ref:`microstep`, in
|
223
|
+
the create_user :ref:`step` within the setup section.
|
224
|
+
|
225
|
+
That is why allmicrosteps before this one (the 30 in our case) are using the
|
226
|
+
cache but all the microsteps after are build again, to prevent side effects of
|
227
|
+
this change, even if they are not using the ``add_user`` value.
|
202
228
|
|
203
229
|
Add a new step
|
204
230
|
~~~~~~~~~~~~~~
|
@@ -206,7 +232,9 @@ Add a new step
|
|
206
232
|
Let's assume that you want to add a step to put a timestamp in your image to
|
207
233
|
know when it was built. First, you have to create a step file in the
|
208
234
|
``steps/setup`` folder because you want your timestamp to be added inside the
|
209
|
-
newly created appliance before exporting it.
|
235
|
+
newly created appliance before exporting it.
|
236
|
+
|
237
|
+
Let's call it ``add_timestamp.yaml``:
|
210
238
|
|
211
239
|
.. literalinclude:: ../../contrib/steps/setup/add_timestamp.yaml
|
212
240
|
:language: yaml
|