kameleon-builder 2.0.0 → 2.1.0
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/.editorconfig +0 -0
- data/.env +63 -15
- data/.gitignore +1 -0
- data/README.rst +4 -2
- data/Vagrantfile +13 -52
- data/bin/kameleon +5 -0
- data/completion/_kameleon.zsh +18 -0
- data/completion/kameleon.bash +13 -0
- data/completion/kameleon.fish +10 -0
- data/contrib/polipo_env.sh +2 -0
- data/contrib/steps/export/save_as_g5k.yaml +63 -0
- data/contrib/steps/setup/add_to_sudoers.yaml +5 -0
- data/docs/Makefile +10 -6
- data/docs/README.md +17 -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/aliases.rst +4 -2
- data/docs/source/checkpoint.rst +2 -0
- data/docs/source/commands.rst +4 -3
- data/docs/source/conf.py +15 -7
- data/docs/source/context.rst +7 -4
- data/docs/source/faq.rst +39 -1
- data/docs/source/getting_started.rst +227 -1
- data/docs/source/grid5000_tutorial.rst +110 -0
- data/docs/source/index.rst +7 -2
- data/docs/source/installation.rst +12 -4
- data/docs/source/persistent_cache.rst +34 -0
- data/docs/source/recipe.rst +23 -16
- data/docs/source/use_cases.rst +93 -0
- data/docs/source/workspace.rst +2 -0
- data/kameleon-builder.gemspec +7 -1
- data/lib/kameleon.rb +3 -6
- data/lib/kameleon/cli.rb +104 -50
- data/lib/kameleon/compat.rb +39 -0
- data/lib/kameleon/context.rb +43 -13
- data/lib/kameleon/engine.rb +118 -77
- data/lib/kameleon/environment.rb +3 -5
- data/lib/kameleon/error.rb +15 -9
- data/lib/kameleon/logger.rb +7 -4
- data/lib/kameleon/persistent_cache.rb +139 -0
- data/lib/kameleon/recipe.rb +200 -81
- data/lib/kameleon/shell.rb +51 -16
- data/omnibus/.gitignore +11 -0
- data/omnibus/.kitchen.yml +25 -0
- data/omnibus/Berksfile +9 -0
- data/omnibus/Berksfile.lock +25 -0
- data/omnibus/Gemfile +12 -0
- data/omnibus/README.md +94 -0
- data/omnibus/config/projects/kameleon.rb +23 -0
- data/omnibus/config/software/kameleon.rb +24 -0
- data/omnibus/config/software/polipo.rb +30 -0
- data/omnibus/config/software/ruby.rb +158 -0
- 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 +1 -0
- data/omnibus/files/mac_pkg/Resources/welcome.html +9 -0
- data/omnibus/omnibus.rb +27 -0
- data/omnibus/package-scripts/kameleon/makeselfinst +27 -0
- data/omnibus/package-scripts/kameleon/postrm +9 -0
- data/templates/archlinux-desktop.yaml +25 -0
- data/templates/archlinux.yaml +106 -0
- data/templates/debian-testing.yaml +25 -0
- data/templates/debian7-desktop.yaml +25 -0
- data/templates/{debian-wheezy-docker.yaml → debian7-docker.yaml} +30 -16
- data/templates/debian7-g5k.yaml +97 -0
- data/templates/debian7-oar-dev.yaml +51 -0
- data/templates/debian7.yaml +128 -0
- data/templates/extend.erb +23 -0
- data/templates/fedora-rawhide.yaml +30 -0
- data/templates/fedora20-desktop.yaml +21 -0
- data/templates/fedora20.yaml +105 -0
- data/templates/{debian-wheezy-chroot.yaml → old-debian7.yaml} +51 -38
- data/templates/{aliases → steps/aliases}/defaults.yaml +37 -12
- data/templates/steps/bootstrap/archlinux/arch_bootstrap.yaml +219 -0
- data/templates/steps/bootstrap/archlinux/install_bootloader.yaml +46 -0
- data/templates/steps/bootstrap/archlinux/populate_disk.yaml +39 -0
- data/templates/steps/bootstrap/debian/debootstrap.yaml +18 -10
- data/templates/steps/bootstrap/debian/debootstrap_arm.yaml +31 -0
- data/templates/steps/bootstrap/fedora/liveos_bootstrap.yaml +123 -0
- data/templates/steps/bootstrap/g5k_reserv.yaml +70 -0
- data/templates/steps/bootstrap/initialize_disk_chroot.yaml +84 -0
- data/templates/steps/bootstrap/initialize_disk_qemu.yaml +72 -0
- data/templates/steps/bootstrap/install_bootloader.yaml +42 -0
- data/templates/steps/bootstrap/prepare_chroot.yaml +126 -0
- data/templates/steps/bootstrap/prepare_docker.yaml +19 -8
- data/templates/steps/bootstrap/prepare_qemu.yaml +47 -0
- data/templates/steps/bootstrap/start_chroot.yaml +11 -2
- data/templates/steps/bootstrap/start_docker.yaml +2 -2
- data/templates/steps/bootstrap/start_qemu.yaml +75 -0
- data/templates/steps/bootstrap/ubuntu/debootstrap.yaml +27 -0
- data/templates/steps/breakpoint.yaml +2 -0
- data/templates/{checkpoints → steps/checkpoints}/docker.yaml +0 -0
- data/templates/steps/checkpoints/qcow2.yaml +38 -0
- data/templates/steps/checkpoints/qemu.yaml +39 -0
- data/templates/steps/export/clean_appliance.yaml +7 -1
- data/templates/steps/export/compact_qcow_img.yaml +12 -0
- data/templates/steps/export/save_appliance.yaml +58 -0
- data/templates/steps/export/save_appliance_from_g5k.yaml +47 -0
- data/templates/steps/export/save_vagrant_box.yaml +29 -0
- data/templates/steps/setup/archlinux/configure_keyboard.yaml +9 -0
- data/templates/steps/setup/archlinux/configure_network.yaml +9 -0
- data/templates/steps/setup/archlinux/configure_ruby.yaml +7 -0
- data/templates/steps/setup/archlinux/configure_system.yaml +20 -0
- data/templates/steps/setup/archlinux/install_dev_tools.yaml +18 -0
- data/templates/steps/setup/archlinux/install_gnome.yaml +27 -0
- data/templates/steps/setup/archlinux/install_software.yaml +9 -0
- data/templates/steps/setup/archlinux/install_yaourt.yaml +29 -0
- data/templates/steps/setup/autologin.yaml +16 -0
- data/templates/steps/setup/create_group.yaml +12 -0
- data/templates/steps/setup/create_user.yaml +9 -10
- data/templates/steps/setup/debian/configure_apt.yaml +65 -0
- data/templates/steps/setup/debian/configure_kernel.yaml +18 -0
- data/templates/steps/setup/debian/{keyboard_config.yaml → configure_keyboard.yaml} +1 -1
- data/templates/steps/setup/debian/{network_config.yaml → configure_network.yaml} +0 -0
- data/templates/steps/setup/debian/{system_config.yaml → configure_system.yaml} +0 -0
- data/templates/steps/setup/debian/install_gnome.yaml +13 -0
- data/templates/steps/setup/debian/install_kde.yaml +13 -0
- data/templates/steps/setup/debian/install_software.yaml +2 -0
- data/templates/steps/setup/debian/oar/oar_debian_config_frontend.yaml +8 -0
- data/templates/steps/setup/debian/oar/oar_debian_config_node.yaml +5 -0
- data/templates/steps/setup/debian/oar/oar_debian_config_server.yaml +5 -0
- data/templates/steps/setup/debian/oar/oar_prereq_install.yaml +16 -0
- data/templates/steps/setup/debian/setup_vagrant_box.yaml +52 -0
- data/templates/steps/setup/debian/upgrade_system.yaml +15 -0
- data/templates/steps/setup/fedora/configure_network.yaml +30 -0
- data/templates/steps/setup/fedora/configure_system.yaml +59 -0
- data/templates/steps/setup/fedora/install_software.yaml +3 -0
- data/templates/steps/setup/fedora/update_system.yaml +10 -0
- data/templates/steps/setup/oar/oar_config_devel.yaml +21 -0
- data/templates/steps/setup/oar/oar_config_frontend.yaml +38 -0
- data/templates/steps/setup/oar/oar_config_node.yaml +4 -0
- data/templates/steps/setup/oar/oar_config_server.yaml +25 -0
- data/templates/steps/setup/oar/oar_config_system.yaml +34 -0
- data/templates/steps/setup/oar/oar_devel_prereq_install.yaml +5 -0
- data/templates/steps/setup/oar/oar_git_install.yaml +21 -0
- data/templates/steps/setup/ubuntu/configure_apt.yaml +67 -0
- data/templates/ubuntu-12.04-desktop.yaml +25 -0
- data/templates/ubuntu-12.04.yaml +128 -0
- data/templates/ubuntu-14.04-desktop.yaml +27 -0
- data/templates/ubuntu-14.04.yaml +25 -0
- data/templates/vagrant-debian7.yaml +31 -0
- data/version.txt +1 -1
- metadata +155 -28
- checksums.yaml +0 -7
- data/templates/checkpoints/qcow2.yaml +0 -44
- data/templates/fedora-docker.yaml +0 -96
- data/templates/steps/bootstrap/fedora/docker_bootstrap.yaml +0 -25
- data/templates/steps/bootstrap/fedora/yum_bootstrap.yaml +0 -22
- data/templates/steps/bootstrap/prepare_appliance_with_nbd.yaml +0 -93
- data/templates/steps/export/build_appliance_from_docker.yaml +0 -105
- data/templates/steps/export/save_appliance_from_nbd.yaml +0 -54
- data/templates/steps/setup/debian/kernel_install.yaml +0 -20
- data/templates/steps/setup/debian/software_install.yaml +0 -15
- data/templates/steps/setup/fedora/kernel_install.yaml +0 -27
- data/templates/steps/setup/fedora/software_install.yaml +0 -10
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
- install_recommends: false
|
3
|
+
- dist_upgrade: true
|
4
|
+
|
5
|
+
- exec_in: |
|
6
|
+
if [ $$install_recommends = false ]; then
|
7
|
+
INSTALL_RECOMMENDS="--no-install-recommends"
|
8
|
+
fi
|
9
|
+
|
10
|
+
- upgrade_system:
|
11
|
+
- exec_in: apt-get -y --force-yes $INSTALL_RECOMMENDS upgrade 2>&1
|
12
|
+
- exec_in: |
|
13
|
+
if [ $$dist_upgrade = false ]; then
|
14
|
+
apt-get -y --force-yes $INSTALL_RECOMMENDS dist-upgrade 2>&1
|
15
|
+
fi
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Network config for Archlinux
|
2
|
+
#
|
3
|
+
# This should work for every systemd powered system
|
4
|
+
- mtu: "1492"
|
5
|
+
|
6
|
+
- set_hostname:
|
7
|
+
- exec_in: echo $$hostname > /etc/hostname
|
8
|
+
|
9
|
+
- enable_network:
|
10
|
+
- exec_in: chkconfig network on
|
11
|
+
|
12
|
+
- set_host:
|
13
|
+
- exec_in: echo "127.0.0.1 localhost $$hostname" > /etc/hosts
|
14
|
+
|
15
|
+
- set_interface:
|
16
|
+
- write_in:
|
17
|
+
- /etc/sysconfig/network-scripts/ifcfg-eth0
|
18
|
+
- |
|
19
|
+
DEVICE=eth0
|
20
|
+
BOOTPROTO=dhcp
|
21
|
+
ONBOOT=yes
|
22
|
+
HOSTNAME=$$hostname
|
23
|
+
NM_CONTROLLED=no
|
24
|
+
TYPE=Ethernet
|
25
|
+
MTU=$$mtu
|
26
|
+
- write_in:
|
27
|
+
- /etc/sysconfig/network
|
28
|
+
- |
|
29
|
+
NETWORKING=yes
|
30
|
+
HOSTNAME=$$hostname
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# System configuration for Archlinux
|
2
|
+
#
|
3
|
+
# This will set the locals and the timezone
|
4
|
+
|
5
|
+
- set_locales:
|
6
|
+
# uncomment the locales
|
7
|
+
- exec_in: |
|
8
|
+
echo $$locales | tr ' ' '\n' | xargs -I {} localedef -v -c -i {} -i {} -f UTF-8 $$lang 2>&1 || :
|
9
|
+
|
10
|
+
- set_timezone:
|
11
|
+
- exec_in: ln -sf /usr/share/zoneinfo/$$timezone /etc/localtime
|
12
|
+
|
13
|
+
- set_wheel_sudo:
|
14
|
+
- exec_in: echo "%wheel ALL=(ALL) ALL" >> /etc/sudoers
|
15
|
+
|
16
|
+
- reinstall_extlinux:
|
17
|
+
- exec_in: VMLINUZ=$(echo /boot/vmlinuz-* | tr ' ' '\n' | head -n 1)
|
18
|
+
- exec_in: VMLINUZ_VERSION=$(echo $VMLINUZ | sed 's/\/boot\/vmlinuz-//g')
|
19
|
+
- exec_in: INITRAMFS="$(echo $VMLINUZ | sed 's/vmlinuz/initramfs/g').img"
|
20
|
+
- exec_in: depmod -a $VMLINUZ_VERSION
|
21
|
+
- exec_in: dracut -f $INITRAMFS $VMLINUZ_VERSION
|
22
|
+
- exec_in: extlinux --install /boot/extlinux 2>&1
|
23
|
+
- exec_in: |
|
24
|
+
MBR_PATH=
|
25
|
+
PATHS=("/usr/share/syslinux/mbr.bin"
|
26
|
+
"/usr/lib/bios/syslinux/mbr.bin"
|
27
|
+
"/usr/lib/syslinux/bios/mbr.bin"
|
28
|
+
"/usr/lib/extlinux/mbr.bin"
|
29
|
+
"/usr/lib/syslinux/mbr.bin")
|
30
|
+
for element in "${PATHS[@]}"
|
31
|
+
do
|
32
|
+
if [ -f "$element" ]; then
|
33
|
+
MBR_PATH="$element"
|
34
|
+
break
|
35
|
+
fi
|
36
|
+
done
|
37
|
+
if [ "$MBR_PATH" == "" ]; then
|
38
|
+
fail "unable to locate the extlinux mbr"
|
39
|
+
else
|
40
|
+
dd if="$MBR_PATH" of="/dev/vda" bs=440 2>&1
|
41
|
+
fi
|
42
|
+
- write_in:
|
43
|
+
- /boot/extlinux/extlinux.conf
|
44
|
+
- |
|
45
|
+
menu autoboot Welcome to Fedora $$release $${arch} . Automatic boot in # second{,s}. Press a key for options.
|
46
|
+
menu title Fedora-$${release}-$${arch} Boot Options.
|
47
|
+
default Fedora-$${release}-$${arch}
|
48
|
+
timeout 10
|
49
|
+
totaltimeout 600
|
50
|
+
|
51
|
+
label Fedora-$${release}-$${arch} ($VMLINUZ_VERSION)
|
52
|
+
kernel ../`basename $VMLINUZ`
|
53
|
+
append ro root=UUID=`blkid -s UUID -o value /dev/vda1` console=tty1 console=ttyS0,115200n8
|
54
|
+
initrd ../`basename $INITRAMFS`
|
55
|
+
|
56
|
+
label Fedora-$${release}-$${arch}-kameleon ($(uname -r))
|
57
|
+
kernel ../vmlinuz
|
58
|
+
append ro root=UUID=`blkid -s UUID -o value /dev/vda1` console=tty1 console=ttyS0,115200n8
|
59
|
+
initrd ../initrd.img
|
@@ -0,0 +1,10 @@
|
|
1
|
+
- update_system:
|
2
|
+
- exec_in: yum update yum -y
|
3
|
+
- exec_in: yum groupupdate 'Minimal Install' -y
|
4
|
+
- exec_in: yum clean all
|
5
|
+
- exec_in: yum update -y
|
6
|
+
- exec_in: yum --releasever=$$release distro-sync
|
7
|
+
|
8
|
+
- clean:
|
9
|
+
- on_setup_clean:
|
10
|
+
- exec_in: yum clean all
|
@@ -0,0 +1,21 @@
|
|
1
|
+
- update_hostfile:
|
2
|
+
- append_in:
|
3
|
+
- /etc/hosts
|
4
|
+
- |
|
5
|
+
127.0.0.2 node1 node2
|
6
|
+
|
7
|
+
- create_resources:
|
8
|
+
- exec_in: /usr/local/sbin/oarproperty -a core
|
9
|
+
- exec_in: /usr/local/sbin/oarproperty -a cpu
|
10
|
+
- exec_in: /usr/local/sbin/oarnodesetting -a -h node1 -p cpu=0 -p core=0 -p cpuset=0
|
11
|
+
- exec_in: /usr/local/sbin/oarnodesetting -a -h node1 -p cpu=0 -p core=1 -p cpuset=0
|
12
|
+
- exec_in: /usr/local/sbin/oarnodesetting -a -h node1 -p cpu=1 -p core=2 -p cpuset=0
|
13
|
+
- exec_in: /usr/local/sbin/oarnodesetting -a -h node1 -p cpu=1 -p core=3 -p cpuset=0
|
14
|
+
- exec_in: /usr/local/sbin/oarnodesetting -a -h node2 -p cpu=2 -p core=4 -p cpuset=0
|
15
|
+
- exec_in: /usr/local/sbin/oarnodesetting -a -h node2 -p cpu=2 -p core=5 -p cpuset=0
|
16
|
+
- exec_in: /usr/local/sbin/oarnodesetting -a -h node2 -p cpu=3 -p core=6 -p cpuset=0
|
17
|
+
- exec_in: /usr/local/sbin/oarnodesetting -a -h node2 -p cpu=3 -p core=7 -p cpuset=0
|
18
|
+
|
19
|
+
- modify_job_resource_manager:
|
20
|
+
- exec_in: sed -e 's/#exit/exit/' -i /etc/oar/job_resource_manager.pl
|
21
|
+
- exec_in: sed -i 's/job_resource_manager_cgroups\.pl/job_resource_manager\.pl/g' /etc/oar/oar.conf
|
@@ -0,0 +1,38 @@
|
|
1
|
+
- configure_monika:
|
2
|
+
- exec_in: sed -e "s/^\(username.*\)oar.*/\1oar_ro/" -i /etc/oar/monika.conf
|
3
|
+
- exec_in: sed -e "s/^\(password.*\)oar.*/\1oar_ro/" -i /etc/oar/monika.conf
|
4
|
+
- exec_in: sed -e "s/^\(dbtype.*\)mysql.*/\1psql/" -i /etc/oar/monika.conf
|
5
|
+
- exec_in: sed -e "s/^\(dbport.*\)3306.*/\15432/" -i /etc/oar/monika.conf
|
6
|
+
|
7
|
+
- configure_drawgantt_svg:
|
8
|
+
- exec_in: |
|
9
|
+
sed -i "s/\$CONF\['db_type'\]=\"mysql\"/\$CONF\['db_type'\]=\"pg\"/g" /etc/oar/drawgantt-config.inc.php
|
10
|
+
sed -i "s/\$CONF\['db_port'\]=\"3306\"/\$CONF\['db_port'\]=\"5432\"/g" /etc/oar/drawgantt-config.inc.php
|
11
|
+
|
12
|
+
- configure_open_api:
|
13
|
+
- exec_in: perl -pi -e "s/Deny from all/#Deny from all/" /etc/oar/apache2/oar-restful-api.conf
|
14
|
+
|
15
|
+
- configure_basic_auth_api_priv:
|
16
|
+
- write_in:
|
17
|
+
- /etc/oar/apache2/oar-restful-api-priv.conf
|
18
|
+
- |
|
19
|
+
ScriptAlias /oarapi-priv $$oar_prefix_install/lib/cgi-bin/oarapi/oarapi.cgi
|
20
|
+
ScriptAlias /oarapi-priv-debug $$oar_prefix_install/lib/cgi-bin/oarapi/oarapi.cgi
|
21
|
+
<Location /oarapi-priv>
|
22
|
+
Options ExecCGI -MultiViews FollowSymLinks
|
23
|
+
AuthType basic
|
24
|
+
AuthUserfile /etc/oar/api-users
|
25
|
+
AuthName "OAR API authentication"
|
26
|
+
Require valid-user
|
27
|
+
#RequestHeader set X_REMOTE_IDENT %{REMOTE_USER}e
|
28
|
+
RewriteEngine On
|
29
|
+
RewriteCond %{REMOTE_USER} (.*)
|
30
|
+
RewriteRule .* - [E=MY_REMOTE_IDENT:%1]
|
31
|
+
RequestHeader add X-REMOTE_IDENT %{MY_REMOTE_IDENT}e
|
32
|
+
</Location>
|
33
|
+
- exec_in: htpasswd -b -c /etc/oar/api-users $$user_name $$user_name
|
34
|
+
- exec_in: htpasswd -b /etc/oar/api-users oar $$user_name
|
35
|
+
|
36
|
+
- install_chandler:
|
37
|
+
- exec_in: gem install naturalsort --no-ri --no-rdoc
|
38
|
+
- exec_in: cp /home/$$user_name/oar/sources/api/examples/chandler.rb /usr/local/bin/chandler
|
@@ -0,0 +1,25 @@
|
|
1
|
+
- configure_oar_log_level:
|
2
|
+
- exec_in: sed -e 's/^LOG_LEVEL\=\"2\"/LOG_LEVEL\=\"3\"/' -i /etc/oar/oar.conf
|
3
|
+
|
4
|
+
- configure_taktuk:
|
5
|
+
- exec_in: sed -e 's/^#\(TAKTUK_CMD\=\"\/usr\/bin\/taktuk \-t 30 \-s\".*\)/\1/' -i /etc/oar/oar.conf
|
6
|
+
- exec_in: sed -e 's/^#\(PINGCHECKER_TAKTUK_ARG_COMMAND\=\"broadcast exec timeout 5 kill 9 \[ true \]\".*\)/\1/' -i /etc/oar/oar.conf
|
7
|
+
|
8
|
+
- configure_db_type:
|
9
|
+
- exec_in: sed -e 's/^\(DB_TYPE\)=.*/\1="Pg"/' -i /etc/oar/oar.conf
|
10
|
+
- exec_in: sed -e 's/^\(DB_PORT\)=.*/\1="5432"/' -i /etc/oar/oar.conf
|
11
|
+
|
12
|
+
- configure_cpuset:
|
13
|
+
- exec_in: sed -e 's/^#\(JOB_RESOURCE_MANAGER_PROPERTY_DB_FIELD\=\"cpuset\".*\)/\1/' -i /etc/oar/oar.conf
|
14
|
+
- exec_in: sed -e 's/^#\(JOB_RESOURCE_MANAGER_FILE\=\"\/etc\/oar\/job_resource_manager\.pl\".*\)/\1/' -i /etc/oar/oar.conf
|
15
|
+
- exec_in: sed -e 's/^#\(CPUSET_PATH\=\"\/oar\".*\)/\1/' -i /etc/oar/oar.conf
|
16
|
+
|
17
|
+
- configure_database:
|
18
|
+
- exec_in: su postgres -c "psql -c 'DROP DATABASE IF EXISTS oar'"
|
19
|
+
- exec_in: su postgres -c "psql -c 'DROP USER IF EXISTS oar'"
|
20
|
+
- exec_in: su postgres -c "psql -c 'DROP USER IF EXISTS oar_ro'"
|
21
|
+
- exec_in: sed -e 's/^\(DB_BASE_PASSWD\)=.*/\1="oar"/' -i /etc/oar/oar.conf
|
22
|
+
- exec_in: sed -e 's/^\(DB_BASE_LOGIN\)=.*/\1="oar"/' -i /etc/oar/oar.conf
|
23
|
+
- exec_in: sed -e 's/^\(DB_BASE_PASSWD_RO\)=.*/\1="oar_ro"/' -i /etc/oar/oar.conf
|
24
|
+
- exec_in: sed -e 's/^\(DB_BASE_LOGIN_RO\)=.*/\1="oar_ro"/' -i /etc/oar/oar.conf
|
25
|
+
- exec_in: /usr/local/sbin/oar-database --create --db-is-local --db-admin-user root
|
@@ -0,0 +1,34 @@
|
|
1
|
+
- setup_fuse:
|
2
|
+
- exec_in: usermod -a -G fuse $$user_name
|
3
|
+
- append_in:
|
4
|
+
- /etc/fuse.conf
|
5
|
+
- |
|
6
|
+
user_allow_other
|
7
|
+
- motd_config:
|
8
|
+
- write_in:
|
9
|
+
- /etc/motd
|
10
|
+
- |
|
11
|
+
|
12
|
+
************************** WELCOME TO THE OAR APPLIANCE ************************
|
13
|
+
We created 2 fake nodes pointing to localhost (node1 and node2)
|
14
|
+
* You can, for example, submit an interactive job:
|
15
|
+
$ oarsub -I
|
16
|
+
* Or check the API:
|
17
|
+
$ wget -O - http://localhost/oarapi/resources.yaml
|
18
|
+
* Check the API more deeply, submitting a job as the "$$user_name" user:
|
19
|
+
$ curl -i -X POST http://$$user_name:$$user_name@localhost/oarapi-priv/jobs.json \
|
20
|
+
-H'Content-Type: application/json' \
|
21
|
+
-d '{"resource":"/nodes=1,walltime=00:10:00", "command":"sleep 600"}'
|
22
|
+
* Launch the tests:
|
23
|
+
$ cd oar/tests/rspec && make
|
24
|
+
* Mount your local git repository for coding:
|
25
|
+
$ mkdir git
|
26
|
+
$ sshfs -o allow_root your_login@10.0.2.2:git git
|
27
|
+
|
28
|
+
Notes:
|
29
|
+
- if you want to change the keyboard mapping, use:
|
30
|
+
'loadkeys <2_letters_country_code>'
|
31
|
+
- root password is: $$user_name
|
32
|
+
|
33
|
+
********************************************************************************
|
34
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
- fetch_repository:
|
2
|
+
- exec_in: mkdir -p $$oar_git_directory
|
3
|
+
- exec_in: git init $$oar_git_directory
|
4
|
+
- exec_in: git --git-dir $$oar_git_directory/.git --work-tree $$oar_git_directory fetch --depth 0 $$oar_git_repository $$oar_git_treeish
|
5
|
+
- exec_in: git --git-dir $$oar_git_directory/.git --work-tree $$oar_git_directory checkout FETCH_HEAD
|
6
|
+
- exec_in: make -C $$oar_git_directory clean
|
7
|
+
|
8
|
+
- node:
|
9
|
+
- exec_in: make -C $$oar_git_directory PREFIX=$$oar_prefix_install node-build
|
10
|
+
- exec_in: make -C $$oar_git_directory PREFIX=$$oar_prefix_install node-install
|
11
|
+
- exec_in: make -C $$oar_git_directory PREFIX=$$oar_prefix_install node-setup
|
12
|
+
|
13
|
+
- frontend:
|
14
|
+
- exec_in: make -C $$oar_git_directory PREFIX=$$oar_prefix_install user-build tools-build
|
15
|
+
- exec_in: make -C $$oar_git_directory PREFIX=$$oar_prefix_install user-install drawgantt-svg-install monika-install www-conf-install api-install tools-install
|
16
|
+
- exec_in: make -C $$oar_git_directory PREFIX=$$oar_prefix_install user-setup drawgantt-svg-setup monika-setup www-conf-setup api-setup tools-setup
|
17
|
+
|
18
|
+
- server:
|
19
|
+
- exec_in: make -C $$oar_git_directory PREFIX=$$oar_prefix_install server-build
|
20
|
+
- exec_in: make -C $$oar_git_directory PREFIX=$$oar_prefix_install server-install
|
21
|
+
- exec_in: make -C $$oar_git_directory PREFIX=$$oar_prefix_install server-setup
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# Software Install
|
2
|
+
- enable_restricted: true
|
3
|
+
- install_recommends: false
|
4
|
+
|
5
|
+
- configure_apt_to_use_less_disk_space:
|
6
|
+
- write_in:
|
7
|
+
- /etc/apt/apt.conf.d/02compress_indexes
|
8
|
+
- |
|
9
|
+
Acquire::GzipIndexes "true";
|
10
|
+
Acquire::CompressionTypes::Order:: "gz";
|
11
|
+
- exec_in: |
|
12
|
+
if [ $$install_recommends = false ]; then
|
13
|
+
echo 'APT::Install-Recommends "0";' > /etc/apt/apt.conf.d/01norecommend
|
14
|
+
echo 'APT::Install-Suggests "0";' >> /etc/apt/apt.conf.d/01norecommend
|
15
|
+
fi
|
16
|
+
- write_in:
|
17
|
+
- /etc/apt/apt.conf.d/02nocache
|
18
|
+
- |
|
19
|
+
Dir::Cache {
|
20
|
+
srcpkgcache "";
|
21
|
+
pkgcache "";
|
22
|
+
}
|
23
|
+
- write_in:
|
24
|
+
- /etc/dpkg/dpkg.cfg.d/01_nodoc
|
25
|
+
- |
|
26
|
+
path-exclude /usr/share/doc/*
|
27
|
+
# we need to keep copyright files for legal reasons
|
28
|
+
path-include /usr/share/doc/*/copyright
|
29
|
+
path-exclude /usr/share/man/*
|
30
|
+
path-exclude /usr/share/groff/*
|
31
|
+
path-exclude /usr/share/info/*
|
32
|
+
# lintian stuff is small, but really unnecessary
|
33
|
+
path-exclude /usr/share/lintian/*
|
34
|
+
path-exclude /usr/share/linda/*
|
35
|
+
path-exclude /usr/share/locale/*
|
36
|
+
path-include /usr/share/locale/en*
|
37
|
+
- write_in:
|
38
|
+
- /etc/locale.nopurge
|
39
|
+
- |
|
40
|
+
MANDELETE
|
41
|
+
DONTBOTHERNEWLOCALE
|
42
|
+
SHOWFREEDSPACE
|
43
|
+
#QUICKNDIRTYCALC
|
44
|
+
#VERBOSE
|
45
|
+
|
46
|
+
- enable_universe_and_multiverse:
|
47
|
+
- write_out:
|
48
|
+
- $$rootfs_download_path/etc/apt/sources.list
|
49
|
+
- |
|
50
|
+
deb $$repository $$release main restricted universe multiverse
|
51
|
+
|
52
|
+
- enable_restricted:
|
53
|
+
- exec_in: |
|
54
|
+
if [ $$enable_restricted = true ]; then
|
55
|
+
REPO_RESTRICTED="restricted"
|
56
|
+
fi
|
57
|
+
- exec_in: perl -pi -e "s/multiverse$/multiverse $REPO_RESTRICTED/" /etc/apt/sources.list
|
58
|
+
|
59
|
+
- update_repositories:
|
60
|
+
- exec_in: apt-get -y --force-yes update
|
61
|
+
- exec_in: apt-get -y --force-yes install localepurge
|
62
|
+
- on_setup_clean:
|
63
|
+
- exec_in: apt-get -y --force-yes autoclean
|
64
|
+
- exec_in: apt-get -y --force-yes clean
|
65
|
+
- exec_in: apt-get -y --force-yes autoremove
|
66
|
+
- exec_in: localepurge
|
67
|
+
|
@@ -0,0 +1,25 @@
|
|
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.
|
6
|
+
#
|
7
|
+
#==============================================================================
|
8
|
+
|
9
|
+
---
|
10
|
+
extend: ubuntu-12.04
|
11
|
+
|
12
|
+
global:
|
13
|
+
# Apt options
|
14
|
+
apt_install_recommends: true
|
15
|
+
|
16
|
+
bootstrap:
|
17
|
+
- @base
|
18
|
+
|
19
|
+
setup:
|
20
|
+
- @base
|
21
|
+
- install_software:
|
22
|
+
- packages: ubuntu-desktop
|
23
|
+
|
24
|
+
export:
|
25
|
+
- @base
|
@@ -0,0 +1,128 @@
|
|
1
|
+
#==============================================================================
|
2
|
+
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
|
3
|
+
#==============================================================================
|
4
|
+
#
|
5
|
+
# DESCRIPTION: Ubuntu 12.04 LTS (Precise Pangolin) base system.
|
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: ubuntu
|
22
|
+
release: precise
|
23
|
+
arch: amd64
|
24
|
+
|
25
|
+
## QEMU options
|
26
|
+
qemu_enable_kvm: true
|
27
|
+
qemu_cpu: 2
|
28
|
+
qemu_memory_size: 512
|
29
|
+
qemu_monitor_port: 10023
|
30
|
+
qemu_ssh_port: 55423
|
31
|
+
qemu_arch: x86_64
|
32
|
+
|
33
|
+
## Disk options
|
34
|
+
nbd_device: /dev/nbd1
|
35
|
+
image_disk: $$kameleon_cwd/base_$$kameleon_recipe_name.qcow2
|
36
|
+
image_size: 10G
|
37
|
+
filesystem_type: ext4
|
38
|
+
|
39
|
+
# rootfs options
|
40
|
+
rootfs: $$kameleon_cwd/rootfs
|
41
|
+
rootfs_download_path: /var/cache/kameleon/$$distrib/$$release/$$arch/rootfs
|
42
|
+
|
43
|
+
# Apt options
|
44
|
+
apt_repository: http://archive.ubuntu.com/ubuntu/
|
45
|
+
apt_enable_restricted: true
|
46
|
+
apt_install_recommends: false
|
47
|
+
|
48
|
+
## System variables. Required by kameleon engine
|
49
|
+
# Include specific steps
|
50
|
+
include_steps:
|
51
|
+
- $$distrib/$$release
|
52
|
+
- $$distrib
|
53
|
+
- debian
|
54
|
+
|
55
|
+
# Shell session from where we launch exec_out commands. There is often a
|
56
|
+
# local bash session, but it can be a remote shell on other machines or on
|
57
|
+
# any shell. (eg. bash, chroot, fakechroot, ssh, tmux, lxc...)
|
58
|
+
out_context:
|
59
|
+
cmd: bash
|
60
|
+
workdir: $$kameleon_cwd
|
61
|
+
|
62
|
+
# Shell session that allows us to connect to the building machine in order to
|
63
|
+
# configure it and setup additional programs
|
64
|
+
ssh_config_file: $$kameleon_cwd/ssh_config
|
65
|
+
in_context:
|
66
|
+
cmd: ssh -F $$ssh_config_file $$kameleon_recipe_name -t /bin/bash
|
67
|
+
workdir: /root/kameleon_workdir
|
68
|
+
|
69
|
+
#== Bootstrap the new system and create the 'in_context'
|
70
|
+
bootstrap:
|
71
|
+
- debootstrap:
|
72
|
+
- include_pkg: >
|
73
|
+
acpi-support kbd udev linux-image-virtual locales openssh-server
|
74
|
+
bzip2 linux-image-generic
|
75
|
+
- release: $$release
|
76
|
+
- arch: $$arch
|
77
|
+
- repository: $$apt_repository
|
78
|
+
- enable_cache: true
|
79
|
+
- initialize_disk_qemu
|
80
|
+
- prepare_qemu
|
81
|
+
- install_bootloader
|
82
|
+
- start_qemu
|
83
|
+
|
84
|
+
#== Install and configuration steps
|
85
|
+
# WARNING: this part should be independante from the out context (whenever
|
86
|
+
# possible...)
|
87
|
+
setup:
|
88
|
+
# Install
|
89
|
+
- configure_apt:
|
90
|
+
- repository: $$apt_repository
|
91
|
+
- enable_restricted: $$apt_enable_restricted
|
92
|
+
- install_recommends: $$apt_install_recommends
|
93
|
+
- upgrade_system:
|
94
|
+
- dist_upgrade: true
|
95
|
+
- install_software:
|
96
|
+
- packages: >
|
97
|
+
apt-transport-https ca-certificates rsync sudo less bash-completion
|
98
|
+
curl nano vim psmisc language-pack-en
|
99
|
+
- configure_kernel:
|
100
|
+
- arch: $$arch
|
101
|
+
# Configuration
|
102
|
+
- configure_system:
|
103
|
+
- locales: POSIX C en_US fr_FR de_DE
|
104
|
+
- lang: en_US.UTF-8
|
105
|
+
- timezone: UTC
|
106
|
+
- configure_keyboard:
|
107
|
+
- layout: "us,fr,de"
|
108
|
+
- configure_network:
|
109
|
+
- hostname: kameleon-$$distrib
|
110
|
+
- create_group:
|
111
|
+
- name: admin
|
112
|
+
- create_user:
|
113
|
+
- name: $$user_name
|
114
|
+
- groups: sudo admin
|
115
|
+
- password: $$user_password
|
116
|
+
|
117
|
+
#== Export the generated appliance in the format of your choice
|
118
|
+
export:
|
119
|
+
- save_appliance:
|
120
|
+
- input: $$image_disk
|
121
|
+
- output: $$kameleon_cwd/$$kameleon_recipe_name
|
122
|
+
- save_as_qcow2
|
123
|
+
# - save_as_qed
|
124
|
+
# - save_as_tgz
|
125
|
+
# - save_as_raw
|
126
|
+
# - save_as_vmdk
|
127
|
+
# - save_as_vdi
|
128
|
+
|