Pylabs 5.1

Pylabs is the ideal framework for easy datacenter automation and for rapid application development.


In /opt/qbase5 (default)

Before you can install Pylabs 5.1, you have to make sure that your system meets the following requirements:

  • Ubuntu 11.10 64-bit (Oneiric Ocelot) - Desktop/Server Edition
  • Internet Connection

Also, for this install you need root privileges. Run these commands as root:

  1. Download the latest sandbox: wget "http://files.incubaid.com/pub/qbase/5.1/sandboxes/pylabs5.1-linux-amd64-v5.1.0.latest.tar.gz"
  2. Extract the sandbox to /opt: tar -xzf pylabs5.1-linux-amd64-v5.1.0.latest.tar.gz -C /opt/
  3. Execute the installer script: python /opt/qbase5/utils/installer/installer.py
  4. You will be asked to enter the password of a Bitbucket user with access to the Q-Package 5 metadata repositories.

    wget "http://files.incubaid.com/pub/qbase/5.1/sandboxes/pylabs5.1-linux-amd64-v5.1.0.latest.tar.gz" tar -xzf pylabs5.1-linux-amd64-v5.1.0.latest.tar.gz -C /opt/ python /opt/qbase5/utils/installer/installer.py

In a Virtualenv (experimental)

This install method can be used if you cannot or do not wish to run Pylabs 5.1 as root. By running inside a Virtualenv we can avoid root dependencies by installing the required Python dependencies with the pip utility. Read the Virtualenv documentation to learn how this works.

Run these commands as your own user (not root):

  1. Download the latest sandbox: wget "http://files.incubaid.com/pub/qbase/5.1/sandboxes/pylabs5.1-linux-amd64-v5.1.0.latest.tar.gz"
  2. Extract the sandbox: tar -xzf pylabs5.1-linux-amd64-v5.1.0.latest.tar.gz
  3. Execute the custom virtualenv script: python qbase5/utils/virtualenv/pylabs_virtualenv.py

Don't forget that you need to source the bin/activate script in your Virtualenv from every terminal that you want to use with your Pylabs 5.1 install:

cd /path/of/your/qbase5/
source bin/activate

To deactivate the Virtualenv, execute deactivate.

Running the tests

To run the tests, make sure you have installed Pylabs 5.1 in /opt/qbase5 or your Pylabs 5.1 virtualenv is active. If you did not install in a Virtualenv, you need to install the "python-nose" Q-Package from the qpackages5 domain. Execute this line in /opt/qbase5/qshell:

i.qp.find(name="python-nose", domain="qpackages5").install()

From the root of the Pylabs 5.1 code repository, run the tests as follows:

nosetests -e cmdb test/

Read the Nose documentation if you want to select specific tests or change the output of the nosetests command.