<div dir="ltr">Hi All,<div><br></div><div>Here is a very easy way for all to setup a Gluster Developement and Test environment.</div><div>This currently works only on Fedora 22, Fedora 23.</div><div><br></div><div><br></div><div>What you get:</div><div>* A use and throw VM on your laptop on which you can perform all your Gluster development(and run tests!)</div><div>* This introduces a mechanism using which a developer could easily test the Gluster code in a VM environment.</div><div>* Also, it will help bring uniformity in the environments used by various developers.</div><div><br></div><div>How to use:<br></div><div><div>1. git checkout -b custom-branch-name</div><div>2. Make changes</div><div>3. Execute ./run-tests-in-vagrant.sh</div></div><div><br></div><div>Now you will get prompt for installing vagrant, vagrant-libvirt and ansible packages on your laptop.<br></div><div>The first you do this it will take long time because you would be downloading VM image files etc.</div><div><br></div><div><div><br></div><div>What happens in the background:</div><div>1. A new directory is created:</div><div>    tests/vagrant/vagrant-custom-branch-name</div><div><br></div><div>   It will serve as the Vagrant dir which has the</div><div>   Vagrantfile and related ansible playbooks.</div><div><br></div><div>   The VM is started using Vagrant and provisioned</div><div>   using ansible.</div><div><br></div><div>2. The source dir is recursively copied over to the</div><div>   VM under /home/vagrant/glusterfs.</div><div><br></div><div>3. Gluster is source installed in VM.</div><div><br></div><div>What happens in the foreground:</div><div>1. run-tests.sh is executed in VM using ssh and output is displayed</div><div>   in the same terminal with option to use ctrl-c to interrupt the test</div><div>   midway. The VM would still persist and you could ssh into it.</div><div><br></div><div>Also, you can checkout a different branch elsewhere and execute</div><div>run-tests-in-vagrant.sh there to get another VM which would</div><div>execute tests on that code.</div><div><br></div><div>If you wish to make some changes in the code, you could:</div><div>a. Change the code in host and run the script again to repeat</div><div>   the whole process.</div><div><br></div><div>OR</div><div><br></div><div>b. cd tests/vagrant/&lt;git-branch-name&gt; &amp;&amp; vagrant ssh </div></div><div>    Now you would placed in the VM and debug as you would on a normal machine.</div><div><br></div><div><br></div><div>With a little effort though you could make it work on all systems running linux.<br></div><div><div>Feedback welcome on the documentation.</div><div>Feedback and patches welcome on the code.</div></div><div><br></div><div>I will document all this is developer docs after consolidating your questions and feedback.</div><div><br></div><div>Thanks,</div><div>Raghavendra Talur</div><div><br></div></div>