| 1 |
Vagrant |
| 2 |
======= |
| 3 |
|
| 4 |
The intent of the Vagrant directory is to provide multiple examples of installing PyEZ using tools such as Ansible, Puppet, and Chef. The host and guest operating systems will vary based on capability of each provisioner, and updates are provided as best effort. |
| 5 |
|
| 6 |
---------- |
| 7 |
|
| 8 |
|
| 9 |
Prerequisites |
| 10 |
--------- |
| 11 |
|
| 12 |
|
| 13 |
- **[vagrant](http://www.vagrantup.com) 1.5** |
| 14 |
- **[virtualbox](http://www.virtualbox.org) 4.3** |
| 15 |
|
| 16 |
#### `vagrant status` |
| 17 |
|
| 18 |
Display status of configured machines. |
| 19 |
|
| 20 |
#### <i class="icon-up"></i> `vagrant up` or `vagrant up <boxname>` |
| 21 |
|
| 22 |
This will bring up a new virtual machine, after downloading the image from [Opscode's Bento project](https://github.com/opscode/bento). |
| 23 |
|
| 24 |
#### `vagrant ssh <boxname>` |
| 25 |
|
| 26 |
Creates an SSH session to the VM |
| 27 |
|
| 28 |
#### `vagrant halt` or `vagrant halt <boxname>` |
| 29 |
|
| 30 |
Stop the VM(s). Leaving the machine name out will perform the action on all created VMs. This doesn't work with all commands. |
| 31 |
|
| 32 |
#### `vagrant destroy` or `vagrant destory <boxname>` |
| 33 |
|
| 34 |
Delete the virtual machines from your system. The actual base box files will remain in `.vagrant.d` in your home directory, and can be listed with `vagrant box list`, and removed with `vagrant box delete <boxname>`. |
| 35 |
|
| 36 |
#### `vagrant provision <boxname>` |
| 37 |
|
| 38 |
Provisions a VM, e.g. installs prerequisites and builds/installs py-junos-eznc. *(Runs automatically after vagrant up. Only needed when something fails. Safe to run multiple times (idempotent))* |
| 39 |
|
| 40 |
|
| 41 |
> **NOTE:** See [<i class="icon-share"></i> the official Vagrant documentation](http://docs.vagrantup.com/v2/) for a more detailed information |
| 42 |
|
| 43 |
|
| 44 |
---------- |
| 45 |
|
| 46 |
|
| 47 |
Usage |
| 48 |
--------------- |
| 49 |
|
| 50 |
- Manually testing the build against different host platforms |
| 51 |
- Creating builders that can be called from [jenkins-ci](http://jenkins-ci.org/) |
| 52 |
- Determining the best practices for prerequisite and Python installs, e.g. CentOS 6 only supports Python up to 2.6 with [EPEL](http://fedoraproject.org/wiki/EPEL), so Python should be installed from source, with [pyenv](https://github.com/yyuu/pyenv) (as the local user, not system-wide), etc. |
| 53 |
- The Vagrantfile can be very easily modified to use cloud environments or VMware, as opposed to virtualbox |