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.
Files changed (157) hide show
  1. data/.editorconfig +0 -0
  2. data/.env +63 -15
  3. data/.gitignore +1 -0
  4. data/README.rst +4 -2
  5. data/Vagrantfile +13 -52
  6. data/bin/kameleon +5 -0
  7. data/completion/_kameleon.zsh +18 -0
  8. data/completion/kameleon.bash +13 -0
  9. data/completion/kameleon.fish +10 -0
  10. data/contrib/polipo_env.sh +2 -0
  11. data/contrib/steps/export/save_as_g5k.yaml +63 -0
  12. data/contrib/steps/setup/add_to_sudoers.yaml +5 -0
  13. data/docs/Makefile +10 -6
  14. data/docs/README.md +17 -0
  15. data/docs/source/_static/kameleon-logo.png +0 -0
  16. data/docs/source/_static/kameleon-logo.xcf +0 -0
  17. data/docs/source/_static/kameleon-long.png +0 -0
  18. data/docs/source/aliases.rst +4 -2
  19. data/docs/source/checkpoint.rst +2 -0
  20. data/docs/source/commands.rst +4 -3
  21. data/docs/source/conf.py +15 -7
  22. data/docs/source/context.rst +7 -4
  23. data/docs/source/faq.rst +39 -1
  24. data/docs/source/getting_started.rst +227 -1
  25. data/docs/source/grid5000_tutorial.rst +110 -0
  26. data/docs/source/index.rst +7 -2
  27. data/docs/source/installation.rst +12 -4
  28. data/docs/source/persistent_cache.rst +34 -0
  29. data/docs/source/recipe.rst +23 -16
  30. data/docs/source/use_cases.rst +93 -0
  31. data/docs/source/workspace.rst +2 -0
  32. data/kameleon-builder.gemspec +7 -1
  33. data/lib/kameleon.rb +3 -6
  34. data/lib/kameleon/cli.rb +104 -50
  35. data/lib/kameleon/compat.rb +39 -0
  36. data/lib/kameleon/context.rb +43 -13
  37. data/lib/kameleon/engine.rb +118 -77
  38. data/lib/kameleon/environment.rb +3 -5
  39. data/lib/kameleon/error.rb +15 -9
  40. data/lib/kameleon/logger.rb +7 -4
  41. data/lib/kameleon/persistent_cache.rb +139 -0
  42. data/lib/kameleon/recipe.rb +200 -81
  43. data/lib/kameleon/shell.rb +51 -16
  44. data/omnibus/.gitignore +11 -0
  45. data/omnibus/.kitchen.yml +25 -0
  46. data/omnibus/Berksfile +9 -0
  47. data/omnibus/Berksfile.lock +25 -0
  48. data/omnibus/Gemfile +12 -0
  49. data/omnibus/README.md +94 -0
  50. data/omnibus/config/projects/kameleon.rb +23 -0
  51. data/omnibus/config/software/kameleon.rb +24 -0
  52. data/omnibus/config/software/polipo.rb +30 -0
  53. data/omnibus/config/software/ruby.rb +158 -0
  54. data/omnibus/files/mac_dmg/Resources/background.png +0 -0
  55. data/omnibus/files/mac_dmg/Resources/icon.png +0 -0
  56. data/omnibus/files/mac_pkg/Resources/background.png +0 -0
  57. data/omnibus/files/mac_pkg/Resources/license.html +1 -0
  58. data/omnibus/files/mac_pkg/Resources/welcome.html +9 -0
  59. data/omnibus/omnibus.rb +27 -0
  60. data/omnibus/package-scripts/kameleon/makeselfinst +27 -0
  61. data/omnibus/package-scripts/kameleon/postrm +9 -0
  62. data/templates/archlinux-desktop.yaml +25 -0
  63. data/templates/archlinux.yaml +106 -0
  64. data/templates/debian-testing.yaml +25 -0
  65. data/templates/debian7-desktop.yaml +25 -0
  66. data/templates/{debian-wheezy-docker.yaml → debian7-docker.yaml} +30 -16
  67. data/templates/debian7-g5k.yaml +97 -0
  68. data/templates/debian7-oar-dev.yaml +51 -0
  69. data/templates/debian7.yaml +128 -0
  70. data/templates/extend.erb +23 -0
  71. data/templates/fedora-rawhide.yaml +30 -0
  72. data/templates/fedora20-desktop.yaml +21 -0
  73. data/templates/fedora20.yaml +105 -0
  74. data/templates/{debian-wheezy-chroot.yaml → old-debian7.yaml} +51 -38
  75. data/templates/{aliases → steps/aliases}/defaults.yaml +37 -12
  76. data/templates/steps/bootstrap/archlinux/arch_bootstrap.yaml +219 -0
  77. data/templates/steps/bootstrap/archlinux/install_bootloader.yaml +46 -0
  78. data/templates/steps/bootstrap/archlinux/populate_disk.yaml +39 -0
  79. data/templates/steps/bootstrap/debian/debootstrap.yaml +18 -10
  80. data/templates/steps/bootstrap/debian/debootstrap_arm.yaml +31 -0
  81. data/templates/steps/bootstrap/fedora/liveos_bootstrap.yaml +123 -0
  82. data/templates/steps/bootstrap/g5k_reserv.yaml +70 -0
  83. data/templates/steps/bootstrap/initialize_disk_chroot.yaml +84 -0
  84. data/templates/steps/bootstrap/initialize_disk_qemu.yaml +72 -0
  85. data/templates/steps/bootstrap/install_bootloader.yaml +42 -0
  86. data/templates/steps/bootstrap/prepare_chroot.yaml +126 -0
  87. data/templates/steps/bootstrap/prepare_docker.yaml +19 -8
  88. data/templates/steps/bootstrap/prepare_qemu.yaml +47 -0
  89. data/templates/steps/bootstrap/start_chroot.yaml +11 -2
  90. data/templates/steps/bootstrap/start_docker.yaml +2 -2
  91. data/templates/steps/bootstrap/start_qemu.yaml +75 -0
  92. data/templates/steps/bootstrap/ubuntu/debootstrap.yaml +27 -0
  93. data/templates/steps/breakpoint.yaml +2 -0
  94. data/templates/{checkpoints → steps/checkpoints}/docker.yaml +0 -0
  95. data/templates/steps/checkpoints/qcow2.yaml +38 -0
  96. data/templates/steps/checkpoints/qemu.yaml +39 -0
  97. data/templates/steps/export/clean_appliance.yaml +7 -1
  98. data/templates/steps/export/compact_qcow_img.yaml +12 -0
  99. data/templates/steps/export/save_appliance.yaml +58 -0
  100. data/templates/steps/export/save_appliance_from_g5k.yaml +47 -0
  101. data/templates/steps/export/save_vagrant_box.yaml +29 -0
  102. data/templates/steps/setup/archlinux/configure_keyboard.yaml +9 -0
  103. data/templates/steps/setup/archlinux/configure_network.yaml +9 -0
  104. data/templates/steps/setup/archlinux/configure_ruby.yaml +7 -0
  105. data/templates/steps/setup/archlinux/configure_system.yaml +20 -0
  106. data/templates/steps/setup/archlinux/install_dev_tools.yaml +18 -0
  107. data/templates/steps/setup/archlinux/install_gnome.yaml +27 -0
  108. data/templates/steps/setup/archlinux/install_software.yaml +9 -0
  109. data/templates/steps/setup/archlinux/install_yaourt.yaml +29 -0
  110. data/templates/steps/setup/autologin.yaml +16 -0
  111. data/templates/steps/setup/create_group.yaml +12 -0
  112. data/templates/steps/setup/create_user.yaml +9 -10
  113. data/templates/steps/setup/debian/configure_apt.yaml +65 -0
  114. data/templates/steps/setup/debian/configure_kernel.yaml +18 -0
  115. data/templates/steps/setup/debian/{keyboard_config.yaml → configure_keyboard.yaml} +1 -1
  116. data/templates/steps/setup/debian/{network_config.yaml → configure_network.yaml} +0 -0
  117. data/templates/steps/setup/debian/{system_config.yaml → configure_system.yaml} +0 -0
  118. data/templates/steps/setup/debian/install_gnome.yaml +13 -0
  119. data/templates/steps/setup/debian/install_kde.yaml +13 -0
  120. data/templates/steps/setup/debian/install_software.yaml +2 -0
  121. data/templates/steps/setup/debian/oar/oar_debian_config_frontend.yaml +8 -0
  122. data/templates/steps/setup/debian/oar/oar_debian_config_node.yaml +5 -0
  123. data/templates/steps/setup/debian/oar/oar_debian_config_server.yaml +5 -0
  124. data/templates/steps/setup/debian/oar/oar_prereq_install.yaml +16 -0
  125. data/templates/steps/setup/debian/setup_vagrant_box.yaml +52 -0
  126. data/templates/steps/setup/debian/upgrade_system.yaml +15 -0
  127. data/templates/steps/setup/fedora/configure_network.yaml +30 -0
  128. data/templates/steps/setup/fedora/configure_system.yaml +59 -0
  129. data/templates/steps/setup/fedora/install_software.yaml +3 -0
  130. data/templates/steps/setup/fedora/update_system.yaml +10 -0
  131. data/templates/steps/setup/oar/oar_config_devel.yaml +21 -0
  132. data/templates/steps/setup/oar/oar_config_frontend.yaml +38 -0
  133. data/templates/steps/setup/oar/oar_config_node.yaml +4 -0
  134. data/templates/steps/setup/oar/oar_config_server.yaml +25 -0
  135. data/templates/steps/setup/oar/oar_config_system.yaml +34 -0
  136. data/templates/steps/setup/oar/oar_devel_prereq_install.yaml +5 -0
  137. data/templates/steps/setup/oar/oar_git_install.yaml +21 -0
  138. data/templates/steps/setup/ubuntu/configure_apt.yaml +67 -0
  139. data/templates/ubuntu-12.04-desktop.yaml +25 -0
  140. data/templates/ubuntu-12.04.yaml +128 -0
  141. data/templates/ubuntu-14.04-desktop.yaml +27 -0
  142. data/templates/ubuntu-14.04.yaml +25 -0
  143. data/templates/vagrant-debian7.yaml +31 -0
  144. data/version.txt +1 -1
  145. metadata +155 -28
  146. checksums.yaml +0 -7
  147. data/templates/checkpoints/qcow2.yaml +0 -44
  148. data/templates/fedora-docker.yaml +0 -96
  149. data/templates/steps/bootstrap/fedora/docker_bootstrap.yaml +0 -25
  150. data/templates/steps/bootstrap/fedora/yum_bootstrap.yaml +0 -22
  151. data/templates/steps/bootstrap/prepare_appliance_with_nbd.yaml +0 -93
  152. data/templates/steps/export/build_appliance_from_docker.yaml +0 -105
  153. data/templates/steps/export/save_appliance_from_nbd.yaml +0 -54
  154. data/templates/steps/setup/debian/kernel_install.yaml +0 -20
  155. data/templates/steps/setup/debian/software_install.yaml +0 -15
  156. data/templates/steps/setup/fedora/kernel_install.yaml +0 -27
  157. data/templates/steps/setup/fedora/software_install.yaml +0 -10
data/.editorconfig CHANGED
File without changes
data/.env CHANGED
@@ -1,10 +1,19 @@
1
+ #!/usr/bin/env bash
2
+
3
+ export QEMU_AUDIO_DRV=alsa
1
4
  export GIT_PROJECT=kameleon
2
5
  export ROOT_PROJECT=$(dirname $(readlink -f ${BASH_SOURCE[0]}))
3
6
 
4
7
  export KAMELEON_LOG=${KAMELEON_LOG:-"info"}
5
8
 
9
+ # enable kameleon autocompletion
10
+ source $ROOT_PROJECT/completion/kameleon.bash
11
+
12
+ QEMU_MONITOR_PORT=11023
13
+
14
+
6
15
  function kameleon {
7
- BUNDLE_GEMFILE=$ROOT_PROJECT/Gemfile sudo -E bundle exec kameleon $@
16
+ sudo -E BUNDLE_GEMFILE=$ROOT_PROJECT/Gemfile bundle exec kameleon $@
8
17
  }
9
18
 
10
19
  function runtest {
@@ -21,31 +30,70 @@ function devrun_chroot_clean() {
21
30
 
22
31
 
23
32
  function devrun_clear() {
24
- KAMELEON_WORKSPACE=${KAMELEON_WORKSPACE:-"/tmp/kameleon/"}
33
+ KAMELEON_WORKDIR=${KAMELEON_WORKDIR:-"/tmp/kameleon/"}
25
34
  RECIPE_DEV_NAME=${RECIPE_DEV_NAME:-"mymachine"}
26
35
  devrun_chroot_clean
27
- kameleon clear $RECIPE_DEV_NAME -w $KAMELEON_WORKSPACE
28
- if [ -d "$KAMELEON_WORKSPACE/builds" ]; then
29
- sudo rm "$KAMELEON_WORKSPACE/builds" -fr 2> /dev/null
36
+ cd $KAMELEON_WORKDIR
37
+ kameleon clear $RECIPE_DEV_NAME.yaml
38
+ if [ -d "$KAMELEON_WORKDIR/build" ]; then
39
+ sudo rm "$KAMELEON_WORKDIR/build" -fr 2> /dev/null
30
40
  fi
31
41
  }
32
42
 
43
+ function devrun_qemu_stop() {
44
+ if nc -w 0 -z localhost $QEMU_MONITOR_PORT 2>/dev/null
45
+ then
46
+ echo "Shutting down qemu virtual machine"
47
+ echo "system_reset" | nc localhost $QEMU_MONITOR_PORT
48
+ echo ""
49
+ fi
50
+ while nc -w 0 -z localhost $QEMU_MONITOR_PORT
51
+ do
52
+ sleep 0.5
53
+ echo -n "."
54
+ done
55
+ echo " ~> OK"
56
+ }
57
+
33
58
  function devrun_qemu() {
34
- KAMELEON_WORKSPACE=${KAMELEON_WORKSPACE:-"/tmp/kameleon/"}
59
+ KAMELEON_WORKDIR=${KAMELEON_WORKDIR:-"/tmp/kameleon/"}
35
60
  RECIPE_DEV_NAME=${RECIPE_DEV_NAME:-"mymachine"}
36
- path="$KAMELEON_WORKSPACE/builds/$RECIPE_DEV_NAME/${RECIPE_DEV_NAME}.qcow2"
37
- sudo qemu-system-x86_64 -enable-kvm $path
61
+ DRIVE="$KAMELEON_WORKDIR/build/$RECIPE_DEV_NAME/${RECIPE_DEV_NAME}.qcow2"
62
+ RAM_COUNT=2048
63
+ SPICE_PORT=5900
64
+ CPU_COUNT=2
65
+ sudo qemu-system-x86_64 \
66
+ -name "$VM_NAME" \
67
+ -machine pc-1.2,accel=kvm,usb=off -m 2048 -realtime mlock=off \
68
+ -smp $CPU_COUNT \
69
+ -drive file="$DRIVE",cache=none,media=disk,if=virtio,id=drive0 \
70
+ -m $RAM_COUNT \
71
+ -no-reboot \
72
+ -rtc base=utc \
73
+ -soundhw ac97 \
74
+ -net nic,model=virtio -net user \
75
+ -usb \
76
+ -usbdevice tablet \
77
+ -vga qxl \
78
+ -spice port=$SPICE_PORT,addr=127.0.0.1,disable-ticketing,image-compression=auto_lz \
79
+ -device virtio-serial-pci \
80
+ -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 \
81
+ -chardev spicevmc,id=spicechannel0,name=vdagent \
82
+ -monitor tcp::$QEMU_MONITOR_PORT,server,nowait \
83
+ -daemonize
84
+ spicec -h 127.0.0.1 -p $SPICE_PORT --title "$VM_NAME" || :
85
+ devrun_qemu_stop
38
86
  }
39
87
 
40
88
  function devrun_build() {
41
- KAMELEON_WORKSPACE=${KAMELEON_WORKSPACE:-"/tmp/kameleon/"}
89
+ KAMELEON_WORKDIR=${KAMELEON_WORKDIR:-"/tmp/kameleon/"}
42
90
  RECIPE_DEV_NAME=${RECIPE_DEV_NAME:-"mymachine"}
43
- TEMPLATE=${1:-"debian-wheezy-chroot"}
44
- devrun_chroot_clean
45
- cmd="kameleon new $RECIPE_DEV_NAME -t $TEMPLATE -w $KAMELEON_WORKSPACE \
46
- && kameleon build $RECIPE_DEV_NAME -w $KAMELEON_WORKSPACE"
91
+ TEMPLATE=${1:-"debian7"}
92
+ mkdir -p $KAMELEON_WORKDIR && cd $KAMELEON_WORKDIR
93
+ cmd="kameleon new $RECIPE_DEV_NAME $TEMPLATE \
94
+ && kameleon build $RECIPE_DEV_NAME.yaml"
47
95
  eval "$cmd"
48
- if [ -d "$KAMELEON_WORKSPACE/builds/$RECIPE_DEV_NAME" ]; then
49
- cd "$KAMELEON_WORKSPACE/builds/$RECIPE_DEV_NAME"
96
+ if [ -d "$KAMELEON_WORKDIR/build/$RECIPE_DEV_NAME" ]; then
97
+ cd "$KAMELEON_WORKDIR/build/$RECIPE_DEV_NAME"
50
98
  fi
51
99
  }
data/.gitignore CHANGED
@@ -20,3 +20,4 @@ coverage
20
20
  # Vagrant local workspace
21
21
  .vagrant
22
22
  *.log
23
+ bin/*
data/README.rst CHANGED
@@ -80,8 +80,10 @@ Then build your new recipe with the build command:
80
80
 
81
81
  A `builds` directory was created and contains your new image!
82
82
 
83
- To go further, it is highly recommended you start with the :doc:`getting_started`
84
- guide.
83
+ To go further, it is highly recommended you start with the `Getting Started`_ guide.
84
+
85
+
86
+ .. _Getting Started: http://kameleon.readthedocs.org/en/latest/getting_started.html
85
87
 
86
88
  ------------
87
89
  Contributing
data/Vagrantfile CHANGED
@@ -2,66 +2,27 @@
2
2
  # vi: set ft=ruby :
3
3
 
4
4
 
5
+ # Require vagrant-kvm plugin
6
+ ENV['VAGRANT_DEFAULT_PROVIDER'] = 'kvm'
7
+
5
8
  Vagrant.configure("2") do |config|
6
- config.vm.box = "debian7-dev"
7
- config.vm.box_url = "http://cdn.quicker.fr/vagrant/virtualbox/debian7-dev.box"
9
+ config.vm.box = "oar-team/kameleon-dev"
8
10
  config.vm.hostname = "kameleon-devel"
9
11
 
10
- # Config provider
11
- config.vm.provider :virtualbox do |vm|
12
- vm.memory = 2024
13
- vm.cpus = 2
14
- end
15
-
16
- # shared folders
17
- config.vm.synced_folder ".", "/vagrant", :nfs => true
18
-
19
- # Provision
20
- config.vm.provision "shell", privileged: true, inline: <<-EOF
21
- export DEBIAN_FRONTEND=noninteractive
22
- apt-get update
23
- apt-get -y --force-yes install git python-pip debootstrap \
24
- rsync sed qemu-utils
25
-
26
- apt-get -y --force-yes install ruby1.9.1 ruby1.9.1-dev \
27
- rubygems1.9.1 irb1.9.1 ri1.9.1 rdoc1.9.1 \
28
- build-essential libopenssl-ruby1.9.1 libssl-dev zlib1g-dev
29
-
30
- update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.9.1 400 \
31
- --slave /usr/share/man/man1/ruby.1.gz ruby.1.gz \
32
- /usr/share/man/man1/ruby1.9.1.1.gz \
33
- --slave /usr/bin/ri ri /usr/bin/ri1.9.1 \
34
- --slave /usr/bin/irb irb /usr/bin/irb1.9.1 \
35
- --slave /usr/bin/rdoc rdoc /usr/bin/rdoc1.9.1
12
+ config.vm.provision "docker", images: ["scratch"]
36
13
 
37
- # choose your interpreter
38
- # changes symlinks for /usr/bin/ruby , /usr/bin/gem
39
- # /usr/bin/irb, /usr/bin/ri and man (1) ruby
40
- update-alternatives --set ruby /usr/bin/ruby1.9.1
14
+ config.ssh.forward_x11 = true
15
+ config.ssh.forward_agent = true
41
16
 
42
- gem install bundle
17
+ config.vm.provider :kvm do |kvm|
18
+ kvm.memory_size = "2GiB"
19
+ kvm.core_number = 2
20
+ end
43
21
 
44
- # Helpful tools
45
- pip install pyped
46
- EOF
22
+ config.vm.synced_folder ".", "/home/vagrant/kameleon"
47
23
 
48
24
  config.vm.provision "shell", privileged: false, inline: <<-EOF
49
- cat > ~/.bash_profile <<< "
50
- export FORCE_AUTOENV=1
51
- source ~/.profile
52
- source /vagrant/.env
53
- cd /vagrant
54
- "
55
- cd /vagrant && git stash && bundle install && git stash pop
25
+ cd /home/vagrant/kameleon && bundle install
56
26
  EOF
57
27
 
58
- # shared folders
59
- if File.exists? File.expand_path('~/.dotfiles')
60
- config.vm.synced_folder "~/.dotfiles", "/home/vagrant/.dotfiles", :nfs => true
61
- config.vm.provision "shell", privileged: false, inline: "python /home/vagrant/.dotfiles/install.py"
62
- end
63
-
64
- # Network
65
- config.ssh.forward_agent = true
66
- config.vm.network :private_network, ip: "10.10.10.120"
67
28
  end
data/bin/kameleon CHANGED
@@ -7,6 +7,11 @@ Signal.trap("INT") { exit 1 }
7
7
  $stdout.sync = true
8
8
  $stderr.sync = true
9
9
 
10
+ require 'log4r-color'
11
+ require 'log4r-color/configurator'
12
+
13
+ # This is how we specify our levels
14
+ Log4r::Configurator.custom_levels "DEBUG", "INFO", "PROGRESS_INFO", "NOTICE", "PROGRESS_NOTICE", "WARN", "ERROR", "PROGRESS_ERROR", "FATAL"
10
15
  require 'kameleon'
11
16
 
12
17
  require 'kameleon/cli'
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env zsh
2
+
3
+ if [[ ! -o interactive ]]; then
4
+ return
5
+ fi
6
+
7
+ compctl -f -K _kameleon kameleon
8
+
9
+ _kameleon() {
10
+ local words completions
11
+ read -cA words
12
+
13
+ if [ "${#words}" -eq 2 ]; then
14
+ completions="$(kameleon commands)"
15
+ fi
16
+
17
+ reply=("${(ps:\n:)completions}")
18
+ }
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env bash
2
+
3
+ _kameleon() {
4
+ COMPREPLY=()
5
+ local word="${COMP_WORDS[COMP_CWORD]}"
6
+
7
+ if [ "$COMP_CWORD" -eq 1 ]; then
8
+ local commands="$(compgen -W "$(kameleon commands)" -- "$word")"
9
+ COMPREPLY=( $commands $projects )
10
+ fi
11
+ }
12
+
13
+ complete -o default -F _kameleon kameleon
@@ -0,0 +1,10 @@
1
+ complete -c kameleon -l help --description "Describe available commands or one specific command" \
2
+ -a 'help new templates version build checkpoints clear'
3
+
4
+ complete -c kameleon -l build --description "Builds the appliance from the recipe"
5
+ complete -c kameleon -l clean --description "Cleaning 'out' and 'local' context and removing all checkpoints"
6
+ complete -c kameleon -l checkpoints --description "Lists all availables checkpoints"
7
+ complete -c kameleon -l version --description "Prints the Kameleon's version information"
8
+ complete -c kameleon -l new --description "Creates a new recipe"
9
+ complete -c kameleon -l import --description "Imports the given template"
10
+ complete -c kameleon -l templates --description "Lists all defined templates"
@@ -0,0 +1,2 @@
1
+ export http_proxy=http://10.0.2.2:<%= @cache.polipo_port %>
2
+ export ftp_proxy=http://10.0.2.2:<%= @cache.polipo_port %>
@@ -0,0 +1,63 @@
1
+ # Save as a g5k
2
+ # Export a Grid5000 compliant tar gz image and create the kadeploy config
3
+ - save_as_g5k:
4
+ - in2out:
5
+ - /etc/fstab
6
+ - ./fstab.bak
7
+ - on_clean:
8
+ - exec_out: rm -f ./fstab.bak
9
+ - exec_in: apt-get -f install -y --force-yes ssh libmlx4-1 libmlx4-dev
10
+ - write_in:
11
+ - /etc/fstab
12
+ - |
13
+ # UNCONFIGURED FSTAB FOR BASE SYSTEM
14
+ - write_in:
15
+ - /etc/apt/apt.conf
16
+ - |
17
+ APT::Get::AllowUnauthenticated "true";
18
+ - write_in:
19
+ - /etc/modules
20
+ - |
21
+ ib_ipoib
22
+ ib_uverbs
23
+ ib_umad
24
+ ib_addr
25
+ mlx4_ib
26
+ ib_mthca
27
+ - exec_in: wget --no-check-certificate https://gforge.inria.fr/frs/download.php/28557/tgz-g5k_1.0.7_all.deb
28
+ - exec_in: dpkg -i ./tgz-g5k_1.0.7_all.deb
29
+ - exec_in: rm ./tgz-g5k_1.0.7_all.deb
30
+ - exec_in: tgz-g5k /tmp/$$filename.tar.gz
31
+ - in2out:
32
+ - /tmp/$$filename.tar.gz
33
+ - $$filename.tar.gz
34
+ - out2in:
35
+ - ./fstab.bak
36
+ - /etc/fstab
37
+ - exec_out: |
38
+ echo "Saved tar.gz appliance to $(pwd)/$$filename.tar.gz"
39
+ - write_out:
40
+ - $${kameleon_recipe_name}_img.yaml
41
+ - |
42
+ #
43
+ # Kameleon generated $$distrib $$release kadeploy description file
44
+ #
45
+ ---
46
+ name: $${kameleon_recipe_name}
47
+
48
+ version: 1
49
+
50
+ os: linux
51
+
52
+ image:
53
+ file: $$g5k_img_path/$$filename.tar.gz
54
+ kind: tar
55
+ compression: gzip
56
+
57
+ boot:
58
+ kernel: /boot/`basename $$rootfs/boot/vmlinu*`
59
+ initrd: /boot/`basename $$rootfs/boot/init*`
60
+
61
+ filesystem: $$filesystem
62
+
63
+
@@ -0,0 +1,5 @@
1
+ - add_group_to_sudoers:
2
+ - append_in:
3
+ - /etc/sudoers
4
+ - |
5
+ %$$group ALL=(ALL:ALL) ALL
data/docs/Makefile CHANGED
@@ -64,6 +64,10 @@ singlehtml:
64
64
  @echo
65
65
  @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
66
66
 
67
+ publish: html
68
+ rsync -avh -e "ssh" $(BUILDDIR)/html/ kameleon.website:~/www
69
+
70
+
67
71
  pickle:
68
72
  $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
69
73
  @echo
@@ -78,13 +82,13 @@ htmlhelp:
78
82
  $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
79
83
  @echo
80
84
  @echo "Build finished; now you can run HTML Help Workshop with the" \
81
- ".hhp project file in $(BUILDDIR)/htmlhelp."
85
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
82
86
 
83
87
  qthelp:
84
88
  $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
85
89
  @echo
86
90
  @echo "Build finished; now you can run "qcollectiongenerator" with the" \
87
- ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
91
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
88
92
  @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Kameleon.qhcp"
89
93
  @echo "To view the help file:"
90
94
  @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Kameleon.qhc"
@@ -108,7 +112,7 @@ latex:
108
112
  @echo
109
113
  @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
110
114
  @echo "Run \`make' in that directory to run these through (pdf)latex" \
111
- "(use \`make latexpdf' here to do that automatically)."
115
+ "(use \`make latexpdf' here to do that automatically)."
112
116
 
113
117
  latexpdf:
114
118
  $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@@ -137,7 +141,7 @@ texinfo:
137
141
  @echo
138
142
  @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
139
143
  @echo "Run \`make' in that directory to run these through makeinfo" \
140
- "(use \`make info' here to do that automatically)."
144
+ "(use \`make info' here to do that automatically)."
141
145
 
142
146
  info:
143
147
  $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@@ -159,12 +163,12 @@ linkcheck:
159
163
  $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
160
164
  @echo
161
165
  @echo "Link check complete; look for any errors in the above output " \
162
- "or in $(BUILDDIR)/linkcheck/output.txt."
166
+ "or in $(BUILDDIR)/linkcheck/output.txt."
163
167
 
164
168
  doctest:
165
169
  $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
166
170
  @echo "Testing of doctests in the sources finished, look at the " \
167
- "results in $(BUILDDIR)/doctest/output.txt."
171
+ "results in $(BUILDDIR)/doctest/output.txt."
168
172
 
169
173
  xml:
170
174
  $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
data/docs/README.md ADDED
@@ -0,0 +1,17 @@
1
+ Kameleon documentation
2
+ ======================
3
+
4
+ The Kameleon documentation is written in ReStructured Text (.rst) format.
5
+ You can generate a documentaion from the rst source file to (almost) any
6
+ format with Sphinx. To do so, just
7
+ [install Sphinx](http://sphinx-doc.org/latest/install.html) and run for example:
8
+ ```
9
+ make html
10
+ ```
11
+ Now you can visualise the created documentation like this:
12
+ ```
13
+ firefox ./build/html/index.html
14
+ ```
15
+
16
+ An online version of this documentation can be found at this adresse:
17
+ <http://kameleon.readthedocs.org>
@@ -1,3 +1,5 @@
1
+ .. _`aliases`:
2
+
1
3
  -------
2
4
  Aliases
3
5
  -------
@@ -6,10 +8,10 @@ The aliases can be used anywhere instead of a Kameleon command. Some aliases
6
8
  are provided with the templates in the ``aliases/defaults.yaml`` files within
7
9
  your workspace. You can add your own aliases in this file.
8
10
 
9
- An alias is define by his name as a key and a list of commands as a value. You
11
+ An alias is define by its name as a key and a list of commands as a value. You
10
12
  can call an alias with any number of arguments given in a list.
11
13
 
12
- The alias access to this arguments using the ``@arg_index`` notation. The
14
+ The alias access this arguments using the ``@arg_index`` notation. The
13
15
  argument index start at 1. So, ``@1`` is the first argument ``@2`` is the
14
16
  second ans so on.
15
17