Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Commit

Permalink
Vagrantfile fixes & install docs
Browse files Browse the repository at this point in the history
  • Loading branch information
routelastresort committed Apr 7, 2015
1 parent c9e2971 commit 6f00286
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 23 deletions.
12 changes: 4 additions & 8 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ require "vagrant-junos"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "ndo", primary: true do |ndo|
ndo.vm.box = "juniper/netdevops-ubuntu1404"
ndo.vm.box_version = ">= 0.2.6"
ndo.vm.hostname = "NetDevOps-Student"
ndo.vm.network "private_network",
ip: "172.16.0.10",
virtualbox__intnet: "NetDevOps-StudentInternal"
config.vm.synced_folder "", "/vagrant"
config.ssh.password = "vagrant"
ndo.vm.synced_folder "", "/vagrant"
ndo.ssh.password = "vagrant"

ndo.vm.provider "virtualbox" do |v|
# comment out to disable gui from starting
Expand All @@ -34,11 +33,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

config.vm.define "srx" do |srx|
srx.vm.box = "juniper/ffp-12.1X47-D20.7"
srx.vm.box_version = ">= 0.5.0"
srx.vm.hostname = "NetDevOps-SRX01"
srx.vm.provider "virtualbox" do |v|
v.check_guest_additions = false
end
srx.vm.network "private_network",
ip: "172.16.0.1",
nic_type: 'virtio',
Expand All @@ -52,11 +47,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# increase RAM to support AppFW and IPS
# comment out to make it run at 2GB
v.customize ["modifyvm", :id, "--memory", "3072"]
v.check_guest_additions = false
end

srx.vm.provision "file", source: "scripts/srx-setup.sh", destination: "/tmp/srx-setup.sh"
srx.vm.provision :host_shell do |host_shell|
# provides the inital configuration
# provides the inital configuration
host_shell.inline = 'vagrant ssh srx -c "/usr/sbin/cli -f /tmp/srx-setup.sh"'
end
end
Expand Down
60 changes: 45 additions & 15 deletions docs/installingsoftware.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,52 +21,82 @@ Vagrant is a virtual machine management tool. It manages the downloading, provis

**Installation Instructions**

A copy of Vagrant is available for installation on your USB thumb drive, located at `windows_software\vagrant_1.7.2.msi`, or `mac_software/vagrant_1.7.2.dmg`.

Install this executable on your operating system of choice just as you would any software for that platform. On Windows, you will need to reboot, but you can wait until after VirtualBox is installed.

### Vagrant Plugins

Newer versions of the vSRX boxes require two plugins, namely: TODO explain what file to grab from the link and how to install "better"
The vSRX boxes require two plugins, namely:

- [vagrant-junos](https://github.com/JNPRAutomate/vagrant-junos)
- [vagrant-host-shell](https://github.com/phinze/vagrant-host-shell)

these can be installed with the following commands:
These can be installed with the following commands (launch a command prompt on Windows (`cmd`), or a Terminal session on Mac (located in your Applications/Utilities folder):

```bash
vagrant plugin install vagrant-junos
vagrant plugin install vagrant-host-shell
#### Windows
(where `E:` is the drive where the SECSUMMIT USB thumb drive can be found)
```
vagrant plugin install E:\vagrant_plugins\vagrant-junos-0.2.0.gem
vagrant plugin install E:\vagrant_plugins\vagrant-host-shell-0.0.4.gem
```

#### Mac
```
vagrant plugin install /Volumes/SECSUMMIT/vagrant_plugins/vagrant-junos-0.2.0.gem
vagrant plugin install /Volumes/SECSUMMIT/vagrant_plugins/vagrant-host-shell-0.0.4.gem
```

A simple `vagrant plugin update` will freshen all installed plugins.
To check for updates in the future, a simple `vagrant plugin update` will ensure everything is up-to-date.


VirtualBox
===========

For the lab we will be using VirtualBox as our virtualization manager. This tool is free to use and most importantly it is free to use with Vagrant. It also offers some support that VMware Workstation or Fusion do not offer. This includes support for the VirtIO driver and the ability to more simply manage virtual networks.

When installing on Windows it typically will install a network driver. It will prompt you to click "Continue" to take this action. Please hit continue to install the driver.
When installing on Windows it will typically install a network driver. It will prompt you to click "Continue" to take this action. Please hit continue to install the driver.

- [Mac OS X](http://download.virtualbox.org/virtualbox/4.3.26/VirtualBox-4.3.26-98988-OSX.dmg)
- [Windows](http://download.virtualbox.org/virtualbox/4.3.26/VirtualBox-4.3.26-98988-Win.exe)
- [Linux 64-bit DEB](http://download.virtualbox.org/virtualbox/4.3.26/virtualbox-4.3_4.3.26-98988~Ubuntu~raring_amd64.deb)
- [Linux 32-bit DEB](http://download.virtualbox.org/virtualbox/4.3.26/virtualbox-4.3_4.3.26-98988~Ubuntu~raring_i386.deb)
- [Other Linux](https://www.virtualbox.org/wiki/Linux_Downloads)

Windows users: you will need to reboot your laptop before Vagrant and VirtualBox will both work.

**Installation Instructions**

A copy of VirtualBox is available for installation on your USB thumb drive, located at `windows_software\VirtualBox-4.3.26-98988-Win.exe`, or `mac_software/VirtualBox-4.3.26-98988-OSX.dmg`.

> Windows users: you will need to reboot your laptop before Vagrant and VirtualBox will both work.
Installing Boxes
================

- Vagrant stores boxes in `$HOME/vagrant.d` on Linux & Mac, or `%userprofile%\.vagrant.d\boxes` on Windows
> Normally, Vagrant boxes are added with `vagrant box add vendor/name` from the web, but for the size of this class, we need to install them locally. You will still be able to type `vagrant box outdated` to get new versions of these boxes in the future.
> NOTE: Vagrant stores boxes in `$HOME/vagrant.d` on Linux & Mac, or `%userprofile%\.vagrant.d\boxes` on Windows
Before class (install a box that can later be used):
```bash
vagrant box add juniper/netdevops-ubuntu1404
vagrant box add juniper/ffp-12.1X47-D20.7
Vagrant boxes can be installed with the following commands (launch a command prompt on Windows (`cmd`), or a Terminal session on Mac (located in your Applications/Utilities folder):

**Installation Instructions**

#### Windows:
(where `E:` is the drive where the SECSUMMIT USB thumb drive can be found)
```
cp E:\vagrant_boxes\*.box C:\
vagrant box add juniper/netdevops-ubuntu1404 C:\netdevops-0.5.0_ubuntu-14.04_virtualbox.box
vagrant box add juniper/ffp-12.1X47-D20.7 C:\junos-vsrx-X47-D20.7-virtualbox.box
```
You can now delete the box files in `C:\`.

#### Mac:
```
vagrant box add juniper/netdevops-ubuntu1404 /Volumes/SECSUMMIT/netdevops-0.5.0_ubuntu-14.04_virtualbox.box
vagrant box add juniper/ffp-12.1X47-D20.7 /Volumes/SECSUMMIT/junos-vsrx-X47-D20.7-virtualbox.box
```



Install and launch both (from the the JNPRAutomateDemo-Student folder):
(it's recommended that you only do this if you're ready for the boxes to be running)
Expand All @@ -79,8 +109,8 @@ Validating Install

- `vagrant version` should tell you that you're running 1.7.2, aka the latest and greatest
- `vagrant plugin list` should include:
- vagrant-host-shell` 0.0.4 or newer
- vagrant-junos` 0.2.0 or newer
- `vagrant-host-shell` 0.0.4 or newer
- `vagrant-junos` 0.2.0 or newer


Vagrant Global Status
Expand Down

0 comments on commit 6f00286

Please sign in to comment.