[Pulp-list] [devel] Introducing Vagrant

Randy Barlow rbarlow at redhat.com
Mon Apr 20 20:40:09 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hello!

I spent some time this weekend making a Vagrantfile for our pulp
repository. With Vagrant, it is now easier than ever to contribute to
Pulp. Has there been a bug that's been bugging you, but you haven't
had the time to get started with writing a patch? Vagrant is a nice
developer tool that makes it easy to have a development environment. I
haven't added documentation for it yet, but if you want to try it out,
you only need to do these things:

0) $ yum install vagrant-libvirt
1) for r in {pulp,pulp_rpm,<whatever other repos you want>}; do git
clone git at github.com:<your github account>/$r.git
2) cd pulp
3) vagrant up

After a while, you will have a running VM with Pulp installed and
running. It'll even have a synchronized zoo repo! You can ssh to the
box like this:

$ vagrant ssh

All of the code is synchronized into /home/vagrant/devel/. You should
edit the code on your own machine and rsync it over periodically
rather than working in there, until we figure NFS out.

The code is currently shared with the vm via rsync, which is not
ideal. I had some problems getting NFS working so far, but I've filed
an issue to fix that:

https://pulp.plan.io/issues/904

If you change the code in your checkout and you want the code on the
box to reflect it:

$ vagrant rsync

There's also a "vagrant rsync-auto" command which claims to run the
rsync whenever your files change, but I haven't tried that yet.

I've also filed this issue to significantly reduce the time it takes
for vagrant up to complete:

https://pulp.plan.io/issues/903

Enjoy, and feel free to submit PRs to improve it! Here are some ideas
I had:

* It would be nice to be able to pick an OS when typing vagrant up, so
that you can try things in different environments easily.
* It would similarly be nice to be able to choose the message broker
when typing vagrant up, so you can quickly try qpid or rabbit as you
please.
* It would be nice to be able to name the VM anything you like
(currently it seems to get named "pulp_default".)
* It would be nice to look into Oh-My-Vagrant and see how we can use
it with Pulp development
* It would be nice to use something that isn't a shell script to do
the provisioning.
* Obviously, solving the two issues I filed would be nice.

I'm new at Vagrant, so perhaps some of the above are pretty easy to
achieve.

Thanks to beav for the inspiration, and in particular for writing
dev-setup.sh which got me thinking about this a lot. Also, I stole a
lot of code from dev-setup.sh ☺

- -- 
Randy Barlow
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCgAGBQJVNWQpAAoJEIyFaKUJtmpiWVsP/00vQLu+tovxSuMS40u4lzSx
CnMpp9j/TPpvzofALhfQRW3x0BaqEW6ncaWL78Oyhjq7W0YY1FzCiwNAtEMJP/82
R2hFA3KdlhQPoNCw2dLkqMbSJQ+/kMFfRQBeoV1kd0fWV92aKcZOIo3K4exlDXM2
0KOQkrqw9wgSExl9i1CURcCCcFhC8ICj9XmbmjgOp5MozTJ9/zuSGo2+bXlaRPSI
JeTg2ItmyGXwSgwqekjO3+bB64g0FJsPPYXopdJf6m6ytnidCv/3qKecFWI/9ip7
DNeXr712hIU3lBWQuE0ABYV8VudqztcM/YJtydwIRzIaHDJcs9cfbHIB8YoWDWcV
G2k0Td2YmyfE3w+vaMu81Vjzf+a9ODNUqN26Al94NplxKxT5xQu0Es/QqpG1KKHi
kSR7l6OkuDrTPXwJYcnlDHW0KTnIC5F7CSouFc7qDBTcPGm8WllmuSJw26nOLFth
WPAnoHd7ubgzRXVR3wyl3w3Hq2zmf2j+We20653JKR89nEv9lqzSXwQxrOJHOtj5
Qc9hMoaE33cM72WepqTvasfzvqTKQy+Rde8AcaXZ3YGUayWZXahOwDfCIaD3SVO2
2kOY//oEgCEomPdfYQiYkOSa8IZgigRPGEZ76OezzYHNme6fLu1MMv4R0lEbf4Y3
3sL/S491CPEKAQK9mtpL
=9z6n
-----END PGP SIGNATURE-----




More information about the Pulp-list mailing list