Menu

Home

lonestep
      BRIEF INTRO

Mrlab is a light-weighted opensource site powered by Python,django and jquery to make an easy management and sharing of you lab machines.
There're two parts of the work: The server side, the client side.
with python 2.6+ installed, both it's server and client side support windows and some of the *nix like operating systems.

Some OS has been tested(with python 2.6+):

WINDOWS 7,SERVER 2008 R2
Ubuntu 12.04 LTS, Ubuntu 12.10
CentOS 5.x 6.x
Some of the Solaris OS

To extend mrlab to support other platforms, you can modify the client side python codes.

Source codes can be found at sourceforge: http://sourceforge.net/projects/mrlab
To checkout source code,try this command:
svn checkout svn://svn.code.sf.net/p/mrlab/code-0/trunk mrlab

Release History:
2013/4/5/ mrlab-0.1 "panzer" released

      MRLAB SERVER SETUP

Requirement: Django 1.5.1
All mrlab codes are developed under the framework Django 1.5.1,
so before making a server to be mrlab server, you need to install
Django 1.5.1:

'pip' is a python package installation tool, if your server has no pip installed,try:

[---------------[CODE]-------------------->
wget http://python-distribute.org/distribute_setup.py
sudo python distribute_setup.py
wget https://github.com/pypa/pip/raw/master/contrib/get-pip.py
sudo python get-pip.py
<-------------------------------------------]
and then:
[---------------[CODE]-------------------->
pip install Django==1.5.1
<-------------------------------------------]

After django's installed,maybe you are wondering where is the django files, try this command:

python -c "
import sys
sys.path = sys.path[1:]
import django
print(django.path)"

go to the django directory(output of the above command)
edit this file to fit your requirement: .\django\conf\global_settings.py
There're something can be customized:
TIME_ZONE = 'America/Chicago' #All choices can be found here:http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
USE_TZ = True #Set to True if mrlab is to be used by multiple timezone users
LANGUAGE_CODE = 'en-us' #All choices can be found here:http://www.i18nguy.com/unicode/language-identifiers.html
SERVER_EMAIL = 'example@example.com' # Email address that error messages come from.
EMAIL_HOST = 'smtp.example.com'
EMAIL_PORT = 25
EMAIL_HOST_USER = 'email_login'
EMAIL_HOST_PASSWORD = 'email_password'
DEFAULT_FROM_EMAIL = 'example@example.com'
AUTH_USER_MODEL = 'User' #Required, Please modify this field to be AUTH_USER_MODEL = 'lab.MrLabUser'

You should provide valid email information so that mrlab can send out email notification.
and if mrlab is to be used by multiple timezone users,USE_TZ should be set to 'True'.
AUTH_USER_MODEL is MANDATORY to be set to 'lab.MrLabUser'.

Important:
After the steps above, please edit .\django\contrib\auth\forms.py
Change 'User' to be 'get_user_model()':
'model = User' to be 'model = get_user_model()'
'UserModle = User' to be 'UserModel = get_user_model()'
'User._default_manager.get' to be 'get_user_model()._default_manager.get'
'User.DoesNotExist' to be 'get_user_model().DoesNotExist'

This step is NOT introduced by mrlab, but the issue of django(from django 1.5 they announce the feature to customize UserModel,
but seems the forms.py is not updated accordingly).

After mrlab-0.1-panzer is downloaded, extract it, run init.py:
[---------------[CODE]-------------------->
cd .\trunk\socket\server
sudo python InstallServer.py
cd ../../django
python init.py
<-------------------------------------------]

This step will install the server side deamon,setup an admin user, input your port(generally 80 port), and startup the server.

OK, open the browser, http://your_server_ip:your_port_just_input/lab/
the admin backend is http://your_server_ip:your_port_just_input/admin/
Enjoy!

*Note:
* You can use apache and wsgi to run the server as deamon,instead of running it in terminal
* for this topic, please refer to: https://docs.djangoproject.com/en/1.5/howto/deployment/wsgi/modwsgi/
*

      MRLAB CLIENT

After the server's startup,you may wanna make one client managed by mrlab.
Here's the steps:
download the mrlab-client.tar.gz(or mrlab-client.zip), it's generally in http://your_server/static/mrlab-client.tar.gz
and http://your_server/static/mrlab-client.zip(for windows).
and run 'sudo python InstallClient.py'
[---------------[CODE]-------------------->
wget http://your_server/static/mrlab-client.tar.gz
tar -zxvf mrlab-client.tar.gz
chmod -R +x mrlab-client
cd mrlab-client
sudo python InstallClient.py
<-------------------------------------------]

Project Admins: