<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>msimonin@github.io</title>
    <description></description>
    <link>http://msimonin.github.io/</link>
    <atom:link href="http://msimonin.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Wed, 20 Dec 2017 13:06:38 +0000</pubDate>
    <lastBuildDate>Wed, 20 Dec 2017 13:06:38 +0000</lastBuildDate>
    <generator>Jekyll v3.6.2</generator>
    
      <item>
        <title>Vagrant-g5k goes parallel</title>
        <description>&lt;p&gt;Version &lt;a href=&quot;https://github.com/msimonin/vagrant-g5k/tree/0.0.15&quot;&gt;0.0.15&lt;/a&gt; introduces the ability to boot VMs in parallel. Let’s have an example&lt;/p&gt;

&lt;h2 id=&quot;vagrantfile&quot;&gt;Vagrantfile&lt;/h2&gt;

&lt;p&gt;The following Vagrantfile starts one VM per site.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;no&quot;&gt;SITES&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'rennes'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'nancy'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'nantes'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'lille'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'luxembourg'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'grenoble'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'lyon'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;no&quot;&gt;Vagrant&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;configure&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;config&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;    &lt;span class=&quot;no&quot;&gt;SITES&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;each&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;site&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;      &lt;span class=&quot;n&quot;&gt;config&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;vm&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;define&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;vm-&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;site&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;my&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;        &lt;span class=&quot;n&quot;&gt;my&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;vm&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;box&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;dummy&quot;&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;        &lt;span class=&quot;n&quot;&gt;my&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;ssh&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;username&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;root&quot;&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;        &lt;span class=&quot;n&quot;&gt;my&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;ssh&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;password&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;        &lt;span class=&quot;n&quot;&gt;my&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;vm&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;provider&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;g5k&quot;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;g5k&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;          &lt;span class=&quot;n&quot;&gt;g5k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;project_id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;vagrant-g5k&quot;&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;          &lt;span class=&quot;n&quot;&gt;g5k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;site&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;site&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;          &lt;span class=&quot;n&quot;&gt;g5k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;gateway&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;access.grid5000.fr&quot;&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;          &lt;span class=&quot;n&quot;&gt;g5k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;image&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;             &lt;span class=&quot;s2&quot;&gt;&quot;pool&quot;&lt;/span&gt;     &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;msimonin_rbds&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;             &lt;span class=&quot;s2&quot;&gt;&quot;rbd&quot;&lt;/span&gt;      &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;bases/alpine_docker&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;             &lt;span class=&quot;s2&quot;&gt;&quot;snapshot&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;parent&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;             &lt;span class=&quot;s2&quot;&gt;&quot;id&quot;&lt;/span&gt;       &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;$USER&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;             &lt;span class=&quot;s2&quot;&gt;&quot;conf&quot;&lt;/span&gt;     &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;$HOME/.ceph/config&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;             &lt;span class=&quot;s2&quot;&gt;&quot;backing&quot;&lt;/span&gt;  &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;snapshot&quot;&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;           &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;          &lt;span class=&quot;n&quot;&gt;g5k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;ports&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'2222-:22'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;          &lt;span class=&quot;n&quot;&gt;g5k&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;oar&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;virtual != 'none'&quot;&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;        &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;#g5k&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;      &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;#vm&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# each&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;output&quot;&gt;Output&lt;/h2&gt;

&lt;p&gt;The output shows that the different boot sequences are interleaved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It took 10s to have all the VMs running&lt;/strong&gt;.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;Bringing machine &lt;span class=&quot;s1&quot;&gt;'vm-rennes'&lt;/span&gt; up with &lt;span class=&quot;s1&quot;&gt;'g5k'&lt;/span&gt; provider...&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;Bringing machine &lt;span class=&quot;s1&quot;&gt;'vm-nancy'&lt;/span&gt; up with &lt;span class=&quot;s1&quot;&gt;'g5k'&lt;/span&gt; provider...&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;Bringing machine &lt;span class=&quot;s1&quot;&gt;'vm-nantes'&lt;/span&gt; up with &lt;span class=&quot;s1&quot;&gt;'g5k'&lt;/span&gt; provider...&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;Bringing machine &lt;span class=&quot;s1&quot;&gt;'vm-lille'&lt;/span&gt; up with &lt;span class=&quot;s1&quot;&gt;'g5k'&lt;/span&gt; provider...&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;Bringing machine &lt;span class=&quot;s1&quot;&gt;'vm-luxembourg'&lt;/span&gt; up with &lt;span class=&quot;s1&quot;&gt;'g5k'&lt;/span&gt; provider...&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;Bringing machine &lt;span class=&quot;s1&quot;&gt;'vm-grenoble'&lt;/span&gt; up with &lt;span class=&quot;s1&quot;&gt;'g5k'&lt;/span&gt; provider...&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;Bringing machine &lt;span class=&quot;s1&quot;&gt;'vm-lyon'&lt;/span&gt; up with &lt;span class=&quot;s1&quot;&gt;'g5k'&lt;/span&gt; provider...&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-nantes: Launching the VM on nantes&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-lyon: Launching the VM on lyon&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-rennes: Launching the VM on rennes&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-grenoble: Launching the VM on grenoble&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-luxembourg: Launching the VM on luxembourg&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-nancy: Launching the VM on nancy&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-lille: Launching the VM on lille&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-nantes: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-grenoble: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-luxembourg: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-nancy: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-lyon: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-rennes: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-nantes: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-lille: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-grenoble: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-nancy: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-luxembourg: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-rennes: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-lyon: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-nantes: booted @nantes on econome-8.nantes.grid5000.fr&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-grenoble: booted @grenoble on genepi-33.grenoble.grid5000.fr&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-nancy: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-luxembourg: booted @luxembourg on petitprince-9.luxembourg.grid5000.fr&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-lille: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-rennes: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-lyon: booted @lyon on taurus-4.lyon.grid5000.fr&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-nancy: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-lille: booted @lille on chimint-7.lille.grid5000.fr&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-rennes: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-nancy: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-rennes: booted @rennes on parapluie-8.rennes.grid5000.fr&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-nancy: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-nancy: Waiting &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the job to be running&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;o&quot;&gt;==&amp;gt;&lt;/span&gt; vm-nancy: booted @nancy on griffon-9.nancy.grid5000.fr&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

</description>
        <pubDate>Mon, 10 Oct 2016 06:30:00 +0000</pubDate>
        <link>http://msimonin.github.io/2016/10/10/vagrant-g5k-goes-parallel.html</link>
        <guid isPermaLink="true">http://msimonin.github.io/2016/10/10/vagrant-g5k-goes-parallel.html</guid>
        
        
      </item>
    
      <item>
        <title>Booting Virtual Machines on Grid'5000 using Vagrant</title>
        <description>&lt;h1 id=&quot;rationale&quot;&gt;Rationale&lt;/h1&gt;

&lt;p&gt;On the &lt;a href=&quot;https://www.grid5000.fr&quot;&gt;platform&lt;/a&gt;, having a customized environment is
usually provided by the &lt;a href=&quot;http://kadeploy3.gforge.inria.fr/&quot;&gt;Kadepoy3&lt;/a&gt; tool. It
provides bare-metal provisionning of a limited number of Linux distributions
(including Debian, Ubuntu) that can be adapted to the user need.&lt;/p&gt;

&lt;p&gt;Some time ago, booting virtual machines in the production environment has been
enabled.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;It’s fast : we just need to get a job from the scheduler and run a
&lt;em&gt;kvm&lt;/em&gt; process inside. Usually few seconds are required to have a virtual
machine ready.&lt;/li&gt;
  &lt;li&gt;It’s flexible : theorically &lt;em&gt;any&lt;/em&gt; virtual machine can be
used.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In addition to that, a ceph cluster is now available.  This can be used to
store virtual machine images.&lt;/p&gt;

&lt;h1 id=&quot;vagrant-g5k&quot;&gt;Vagrant-g5k&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/msimonin/vagrant-g5k&quot;&gt;Vagrant-g5k&lt;/a&gt; is a plugin for vagrant
to easily deploy virtual machines on Grid’5000.  From a high level point of
view, each &lt;em&gt;kvm&lt;/em&gt; process is run on a physical node after being scheduled by
&lt;a href=&quot;https://oar.imag.fr/&quot;&gt;OAR&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The plugin is far from perfect : ideas, contribution are very welcome. Let’s
take a look to its main features. An example of Vagrantfile can be found
&lt;a href=&quot;https://github.com/msimonin/vagrant-g5k/blob/master/Vagrantfile&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h1 id=&quot;disk-image&quot;&gt;Disk image&lt;/h1&gt;

&lt;p&gt;The virtual machine uses a base disk image that can be back by the frontend
filesystem or by a RBD stored in the Ceph cluster. The plugin exposes different
strategies to manage the disk :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;copy&lt;/code&gt; : will copy the disk to a dedicated location. The copy will be created
in your home directory on the frontend or in the same pool as the original
image.
This mimics the behaviour of vagrant which imports the base box in the
&lt;em&gt;.vagrant&lt;/em&gt; directory of your project.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;cow&lt;/code&gt; : will create a Copy On Write clone of the base image. The original
 image will be used in read-only mode.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;snapshot&lt;/code&gt; : will create an ephemeral
 Copy On Write clone of the base image.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;direct&lt;/code&gt; : will use the base image in
read-write mode.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;network&quot;&gt;Network&lt;/h1&gt;

&lt;p&gt;In the current implementation, network traffic from the virtual machine is
NATed to the outside world. Inter virtual machines SSH communication could be added
in a near future using Grid’5000 subnets. Ports can be forwarded from the
virtual machine to its host machine. &lt;code class=&quot;highlighter-rouge&quot;&gt;vagrant ssh&lt;/code&gt; command tunnels
automatically SSH communication from your local machine to the virtual machine.&lt;/p&gt;

&lt;h1 id=&quot;job--virtual-machine&quot;&gt;Job / virtual machine&lt;/h1&gt;

&lt;p&gt;The plugin is build based on the idea that one virtual machine correspond to
one OAR job. &lt;code class=&quot;highlighter-rouge&quot;&gt;vagrant up&lt;/code&gt; will submit a job to the platform. When the job is
ready it will execute the kvm process. &lt;code class=&quot;highlighter-rouge&quot;&gt;vagrant halt&lt;/code&gt; will delete the job.
Termination signals is trapped to gracefully shutdown the virtual machine. 
&lt;code class=&quot;highlighter-rouge&quot;&gt;vagrant destroy&lt;/code&gt; will additionally destroy the virtual machine disk image.&lt;/p&gt;

&lt;p&gt;Currently a whole node is reserved and the virtual machine CPU/RAM is set to
the maximum available. In the future a virtual machine resource demand could be
map to a more complex resource selection to let the scheduler assign them.&lt;/p&gt;

&lt;h1 id=&quot;wish-list&quot;&gt;Wish list&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Automatic port forwarding to your local machine is appealing. Except for SSH,
you still need to create manually a tunnel from your local machine and the
physical host (ports are forwarded from the physical host to the virtual machine by kvm)&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Support for parallel operation. The thread safety of the current
implementation is questionnable.  Adding this we should be able to start a mass
of virtual machines and manage them with Vagrant.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Support for CPU/RAM customization.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Support for inter virtual machines communication&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Improve code quality - be more idiomatic.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;thanks&quot;&gt;Thanks&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;https://pmorillon.github.io/&quot;&gt;pmorillon&lt;/a&gt; for (among other things) maintaining
the Ceph cluster, and providing inputs to this project (especially the wrapper
script around kvm)&lt;/p&gt;
</description>
        <pubDate>Mon, 19 Sep 2016 10:30:00 +0000</pubDate>
        <link>http://msimonin.github.io/2016/09/19/vagrant-g5k.html</link>
        <guid isPermaLink="true">http://msimonin.github.io/2016/09/19/vagrant-g5k.html</guid>
        
        
      </item>
    
      <item>
        <title>Puppetized environment on Grid'5000</title>
        <description>&lt;p&gt;Lately, the project &lt;a href=&quot;https://github.com/grid5000/xp5k-openstack&quot;&gt;xp5k-openstack&lt;/a&gt; has been
released.  It deploys OpenStack on &lt;a href=&quot;https://www.grid5000.fr&quot;&gt;Grid’5000&lt;/a&gt; and acts as a wrapper around two
main components :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;The Grid’5000 REST API&lt;/li&gt;
  &lt;li&gt;The Openstack Puppet modules&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Under the hood it uses Rake to describe the deployment workflow.&lt;/p&gt;

&lt;h2 id=&quot;openstack-generic-deployment&quot;&gt;Openstack generic deployment&lt;/h2&gt;

&lt;p&gt;The project offers to the Grid’5000 community a simple but efficient mecanism to
plug different deployment scenarios. Two scenarios are shipped with the repo :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Starter Kit (all in one deployment)&lt;/li&gt;
  &lt;li&gt;Multinode&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Users can then add their own scenarios to fit their needs (extra services to add,
different topology, custom configuration, …)&lt;/p&gt;

&lt;h2 id=&quot;-and-beyond&quot;&gt;… and beyond&lt;/h2&gt;

&lt;p&gt;The deployment process is divided in two parts :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;the generic part during which a puppet cluster is deployed.&lt;/li&gt;
  &lt;li&gt;the specific part during which the specific scenario is deployed. It executes
the tasks &lt;code class=&quot;highlighter-rouge&quot;&gt;scenario:main&lt;/code&gt; where all the specific code resides.
For instance in the multinode setup it appends some key/values to the hiera database,
 runs the puppet agent on the different nodes and bootstraps the installation
(add cirros images, create networks, modify default security-group …)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Recently I had to deploy Mesos (more precisely to update an old deployment script)
on Grid’5000. Since I wrote some puppet code to manage the deployment, I realized
that I could plug this in &lt;code class=&quot;highlighter-rouge&quot;&gt;xp5k-openstack&lt;/code&gt;. This releaved me from writing all
the code that handle the job reservation/deployment and the puppet cluster preparation.&lt;/p&gt;

&lt;p&gt;The &lt;code class=&quot;highlighter-rouge&quot;&gt;mesos&lt;/code&gt; scenario is available : &lt;a href=&quot;https://github.com/msimonin/xp5k-mesos&quot;&gt;https://github.com/msimonin/xp5k-mesos&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;More generally &lt;code class=&quot;highlighter-rouge&quot;&gt;xp5k-openstack&lt;/code&gt; should be able to manage all deployments
 that require puppet. Maybe we should remove &lt;code class=&quot;highlighter-rouge&quot;&gt;openstack&lt;/code&gt; in the name ?&lt;/p&gt;
</description>
        <pubDate>Mon, 13 Jun 2016 10:30:00 +0000</pubDate>
        <link>http://msimonin.github.io/2016/06/13/puppetized_deployments_on_g5k.html</link>
        <guid isPermaLink="true">http://msimonin.github.io/2016/06/13/puppetized_deployments_on_g5k.html</guid>
        
        
      </item>
    
      <item>
        <title>The 7 colors game</title>
        <description>&lt;p&gt;The visualisation is available here : &lt;a href=&quot;/static/seven-colors&quot;&gt;The 7 colors game&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Direct links :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;/static/seven-colors/index.html#challenge&quot;&gt;Play agains the AI&lt;/a&gt; : Typescript version and D3js&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/static/seven-colors/simple-d3.html&quot;&gt;2 player (human) game&lt;/a&gt; : Pure D3 implementation&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/static/seven-colors/simple-d3-together.html&quot;&gt;Network game&lt;/a&gt; : Same as above + TogetherJS&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Sat, 13 Feb 2016 10:30:00 +0000</pubDate>
        <link>http://msimonin.github.io/2016/02/13/seven-colors.html</link>
        <guid isPermaLink="true">http://msimonin.github.io/2016/02/13/seven-colors.html</guid>
        
        
      </item>
    
      <item>
        <title>Grid5000 : 10 years jobs</title>
        <description>&lt;p&gt;The visualisation is available here : &lt;a href=&quot;/static/grid5000-10years-jobs&quot;&gt;grid5000-10years-jobs&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Tue, 02 Feb 2016 10:30:00 +0000</pubDate>
        <link>http://msimonin.github.io/grid5000/visualisation/d3/2016/02/02/grid5000-10years-jobs.html</link>
        <guid isPermaLink="true">http://msimonin.github.io/grid5000/visualisation/d3/2016/02/02/grid5000-10years-jobs.html</guid>
        
        
        <category>grid5000</category>
        
        <category>visualisation</category>
        
        <category>d3</category>
        
      </item>
    
      <item>
        <title>My experimentation notebook (on Grid'5000)</title>
        <description>&lt;p&gt;This articles shows a simple use of &lt;a href=&quot;https://github.com/SciRuby/iruby&quot;&gt;iruby
notebook&lt;/a&gt; for interacting with Grid’5000
ressources. The experimentation follows three steps :&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Get some ressources on Grid’5000&lt;/li&gt;
  &lt;li&gt;Get the uptime of all the nodes of the
reservation&lt;/li&gt;
  &lt;li&gt;Draw a bar plot showing the different uptime of the nodes&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Check the docker image for a quick try : &lt;a href=&quot;#installation&quot;&gt;Docker image&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;the-notebook&quot;&gt;The notebook&lt;/h2&gt;

&lt;p&gt;Here is the commented notebook.  Full rendered notebook is also available
  through &lt;a href=&quot;http://nbviewer.ipython.org/github/msimonin/msimonin.github.io/blob/master/notebooks/g5k-uptime.ipynb&quot;&gt;nbviewer service&lt;/a&gt;&lt;/p&gt;

&lt;!-- rendered using nbviewer --&gt;
&lt;iframe width=&quot;100%&quot; height=&quot;800px&quot; src=&quot;/notebooks/g5k-uptime.html&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;

&lt;p&gt;Here comes the tricky part (no so much actually). My setup was :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Ruby 2.1.2 IPython 4.0.1 with notebook installed&lt;/li&gt;
  &lt;li&gt;The Gemfile (&lt;code class=&quot;highlighter-rouge&quot;&gt;xp5k&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;restfully&lt;/code&gt; need a small patch each)&lt;/li&gt;
  &lt;li&gt;and … an account on Grid’5000.&lt;/li&gt;
&lt;/ul&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;source&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'https://rubygems.org'&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;n&quot;&gt;gem&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'restfully'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;  &lt;span class=&quot;ss&quot;&gt;:git&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'https://github.com/msimonin/restfully'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;  &lt;span class=&quot;ss&quot;&gt;:branch&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'ripl-update'&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;n&quot;&gt;gem&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'xp5k'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;  &lt;span class=&quot;ss&quot;&gt;:path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'https://github.com/msimonin/xp5k'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;  &lt;span class=&quot;ss&quot;&gt;:branch&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'dsl_capture'&lt;/span&gt;&lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;n&quot;&gt;gem&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'ffi-rzmq'&lt;/span&gt; &lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;n&quot;&gt;gem&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'iruby'&lt;/span&gt; &lt;br data-jekyll-commonmark-ghpages=&quot;&quot; /&gt;&lt;span class=&quot;n&quot;&gt;gem&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'nyaplot'&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h3 id=&quot;docker-image&quot;&gt;Docker image&lt;/h3&gt;

&lt;p&gt;A docker image is available and contains all the dependencies listed above.
Please follow the instructions in
&lt;a href=&quot;https://github.com/msimonin/g5k-notebook&quot;&gt;https://github.com/msimonin/g5k-notebook&lt;/a&gt;
to get started.&lt;/p&gt;
</description>
        <pubDate>Thu, 07 Jan 2016 10:30:00 +0000</pubDate>
        <link>http://msimonin.github.io/grid5000/notebook/ruby/2016/01/07/my_g5k_experimentation_notebook.html</link>
        <guid isPermaLink="true">http://msimonin.github.io/grid5000/notebook/ruby/2016/01/07/my_g5k_experimentation_notebook.html</guid>
        
        
        <category>grid5000</category>
        
        <category>notebook</category>
        
        <category>ruby</category>
        
      </item>
    
      <item>
        <title>Moving Thymio on a grid</title>
        <description>&lt;p&gt;I explore here a way of moving &lt;a href=&quot;https://thymio.org&quot;&gt;Thymio&lt;/a&gt; on a grid composed of square tiles (25cm x 25cm). From the user point of vue, moving Thymio on this kind of grid, leads to instruct Thymio the following orders (assuming for example Thymio is on the center of a tile):&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Move forward one tile&lt;/li&gt;
  &lt;li&gt;Move to the next tile on your right&lt;/li&gt;
  &lt;li&gt;Move to the next tile on your left&lt;/li&gt;
  &lt;li&gt;Go backward one tile&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One way to implement this would be to translate the previous specification :&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: right&quot;&gt;Movement&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt; &lt;/th&gt;
      &lt;th&gt;Order&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;Move forward one tile&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;—–&lt;/td&gt;
      &lt;td&gt;Move 25 cm forward&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;Move to the next tile on your right&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;—–&lt;/td&gt;
      &lt;td&gt;Turn 90° right and move 25cm forward&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;Move to the next tile on your left&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;—–&lt;/td&gt;
      &lt;td&gt;Turn 90° left and move 25cm forward&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;Go backward one tile&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;-—-&lt;/td&gt;
      &lt;td&gt;Turn 180° and move 25cm forward&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;But Thymio doesn’t support the instruction move exactly 25cm forward (and stop) nor turn exactly 90° left (or right). Having this kind of instruction would be great but would be very hard for the robot to handle (think of the motor calibration or the friction on the ground) and at the end would probably skew Thymio on the grid.&lt;/p&gt;

&lt;p&gt;Since Thymio excels at &lt;a href=&quot;https://www.thymio.org/en:thymiobehaviourinvestigator&quot;&gt;following lines&lt;/a&gt;, maybe we just help Thymio a little bit by provoding guides on the floor. I chose the following pattern :&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/moving-thymio-pattern.png&quot; alt=&quot;pattern&quot; /&gt;
&lt;img src=&quot;/images/moving-thymio-tile.png&quot; alt=&quot;pattern&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Assuming that Thymio is on the center of the tile (the black losange), we can translate the different movements :&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: right&quot;&gt;Movement&lt;/th&gt;
      &lt;th style=&quot;text-align: left&quot;&gt; &lt;/th&gt;
      &lt;th&gt;Order&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;Move forward one tile&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;–—&lt;/td&gt;
      &lt;td&gt;Search for the line in front of you and follow it until the next center&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;Move to the next tile on your right&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;–—&lt;/td&gt;
      &lt;td&gt;Search for a line on your right and follow it until the next tile&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;Move to the next tile on your left&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;—–&lt;/td&gt;
      &lt;td&gt;Search for a line on your left and follow it until the next tile&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;Go backward one tile&lt;/td&gt;
      &lt;td style=&quot;text-align: left&quot;&gt;–—&lt;/td&gt;
      &lt;td&gt;Make a U-turn, search for a line and follow it until the next tile&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;We can thus extract two main behaviours that Thymio has to learn :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Follow a black line and stop on a center of a tile&lt;/li&gt;
  &lt;li&gt;Search for a line (on left / right / bottom) from the center of a tile.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;follow-the-black-line-and-stop-on-a-center-of-a-tile&quot;&gt;Follow the black line and stop on a center of a tile&lt;/h1&gt;

&lt;p&gt;Note : The black lines are drawn so that it can fit between the two sensors below the robot.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/moving-thymio-follow-line.png&quot; alt=&quot;follow-line&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Thymio’s right sensor is on the line, it needs to move right a little bit. 
The idea is keep the angle between Thymio and Thymio small&lt;/li&gt;
  &lt;li&gt;Thymio’s left sensor is on the line,  it needs to move left a little bit&lt;/li&gt;
  &lt;li&gt;Both sensors are above a black region, we stop assuming that it can be only the
center of the tile. We change the internal state to reflect that Thymio is waitinga
 for a user interaction.&lt;/li&gt;
&lt;/ol&gt;

&lt;h1 id=&quot;search-for-on-the-right-from-the-center-of-a-tile&quot;&gt;Search for on the right from the center of a tile&lt;/h1&gt;

&lt;p&gt;&lt;img src=&quot;/images/moving-thymio-search-line-right.png&quot; alt=&quot;follow-line&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;When the right arrow is pressed we start the procedure that search the line on the right.
Thymio is instructed to turn right (rapidly). The first sensor to capture a
change is the right sensor which will detect a white region.&lt;/li&gt;
  &lt;li&gt;&amp;amp; 3. allow the right sensor to keep track of the border of the black region&lt;/li&gt;
  &lt;li&gt;Detects the first time the left sensor is above the white region, meaning
that the losange part is behind the robot and more importantly that Thymio just
found the line.&lt;/li&gt;
&lt;/ol&gt;

&lt;h1 id=&quot;downloads&quot;&gt;Downloads&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;/downloads/moving-thymio-grid.aesl&quot;&gt;moving-thymio-grid.aesl&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/downloads/moving-thymio-grid-pattern.pdf&quot;&gt;pattern.pdf&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Sun, 01 Nov 2015 10:30:00 +0000</pubDate>
        <link>http://msimonin.github.io/jekyll/update/2015/11/01/moving-thymio-on-a-grid.html</link>
        <guid isPermaLink="true">http://msimonin.github.io/jekyll/update/2015/11/01/moving-thymio-on-a-grid.html</guid>
        
        
        <category>jekyll</category>
        
        <category>update</category>
        
      </item>
    
      <item>
        <title>Digging openstack on Grid'5000</title>
        <description>&lt;p&gt;The visualisation is available here : &lt;a href=&quot;/static/digging-openstack-on-g5k&quot;&gt;digging-openstack-on-g5k&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Wed, 30 Sep 2015 10:30:00 +0000</pubDate>
        <link>http://msimonin.github.io/2015/09/30/digging-openstack-on-g5k.html</link>
        <guid isPermaLink="true">http://msimonin.github.io/2015/09/30/digging-openstack-on-g5k.html</guid>
        
        
      </item>
    
  </channel>
</rss>
