With the recent flurry of FlyScript and now FlyScript Portal releases, we have one more to help make everything easier to get up and running ... Introducing FlyScript-vm-config. Fresh on the GitHub repos, this project provides the basic configuration scripts to quickly and easily get a brand new virtual machine running with FlyScript, FlyScript Portal, and IPython Notebook installed and configured.

 

After installing some prerequisites, one command will initialize a fresh VM, download all of the necessary packages, and perform (almost) all of the necessary configuration for you.

 

Initialize and Setup

 

To start, you will need to download and install the following software packages for your local machine:

 

 

Once those are in place, clone the github repo flyscript-vm-config to your machine, download a barebones linux VM, and run a command to initialize it:

$ vagrant box add FlyscriptVM http://files.vagrantup.com/precise32.box

$ git clone git://github.com/riverbed/flyscript-vm-config.git

$ cd flyscript-vm-config
$ vagrant up

 

The time this process takes will vary based on the speed of your local machine and your network connection, but generally should complete within 10 - 20 minutes.

 

Once it finishes, you will have a brand new virtual machine with FlyScript, FlyScript Portal, and IPython installed.

 

Configure FlyScript Portal

 

  • One more configuration to do before the portal is ready for use, you will need to update the portal with your own Riverbed devices:

$ vagrant ssh
vagrant@precise32:~$ cd /flyscript/flyscript_portal
vagrant@precise32:/flyscript/flyscript_portal$ vim config/devices.py
  <edit your hosts and username/passwords for a Profiler and Shark appliance>

vagrant@precise32:/flyscript/flyscript_portal$ sudo python manage.py reload

 

 

Run IPython Notebooks

 

  • To get IPython Notebooks running, login to the machine, and start a fresh IPython notebook instance:
$ vagrant ssh
vagrant@precise32:~$ ipython notebook --ip=`facter ipaddress` --pylab=inline
[NotebookApp] Created profile dir: u'/home/vagrant/.ipython/profile_default'
[NotebookApp] Serving notebooks from /home/vagrant
[NotebookApp] The IPython Notebook is running at: http://<ipaddress>:8888/
[NotebookApp] Use Control-C to stop this server and shut down all kernels.
[NotebookApp] No web browser found: could not locate runnable browser.

 

  • On a browser on the host machine, head to the following url: http://127.0.0.1:38888.
  • A notebook instance should be visible.
  • Any notebooks created, will be saved to the directory where the command was started from.  In the example above, this would be the home directory for the user `vagrant` (the default user for new virtual machines).
  • For a more in depth introduction to IPython notebooks, there are several examples included in the documentation:
vagrant@precise32:~$ cd /usr/local/share/doc/ipython/examples/notebooks
vagrant@precise32:/.../examples/notebooks$ ipython notebook --ip=`facter ipaddress` --pylab=inline
[NotebookApp] Using existing profile dir: u'/home/vagrant/.ipython/profile_default'
[NotebookApp] Serving notebooks from /usr/local/share/doc/ipython/examples/notebooks
[NotebookApp] The IPython Notebook is running at: http://10.0.2.15:8888/
[NotebookApp] Use Control-C to stop this server and shut down all kernels.
[NotebookApp] No web browser found: could not locate runnable browser.
  • Now opening the same URL as in step 2 will show several pre-generated example scripts you can walk through. You won't be able to save changes here, but that should make experimentation a little easier too.

 

Note: this notebook will be accessible to anyone on your LAN, if additional security is required, learn more about adding passwords and encryption here in the documentation.

 

Note: An earlier version of this post mistakenly referred to the localhost url for accessing the Portal as 127.0.0.1:38888, when it should have been 127.0.0.1:30080.  The post has been corrected.