The Eucalyptus Management Console is a web-based interface to a local Eucalyptus cloud and/or AWS services.
- EC2
- Auto Scaling
- CloudWatch
- IAM
Prior to installing Pyramid and it's dependencies, you may need to install the following libraries...
- libevent-dev (required by gevent)
- openssl (required by M2Crypto)
- gcc, python development headers, swig (required to install Python libraries)
Ubuntu:
apt-get install openssl build-essential python-dev swig
Fedora:
yum install openssl-devel python-devel swig; yum groupinstall 'Development tools'
OS X:
Install homebrew, then run brew install libevent openssl swig
Run python setup.py develop to set up the development environment. This only needs to be run once or when the "requires" package versions in setup.py are modified.
Note: It is strongly recommended to set up the development environment in a virtualenv.
If setup.py fails with an M2Crypto error and you're on a yum-based system (Fedora, CentOS, RHEL), download the M2Crypto package at https://pypi.python.org/pypi/M2Crypto and install via fedora_setup.sh install
The CSS files are pre-processed using Sass, so you'll need to set up a Sass-to-CSS watcher to output CSS.
To set up Compass as the file watcher...
sudo gem install compass cd koala/static compass watch .
Once you have installed compass, there's a handy shortcut to enable the watcher. From the repo root...
make watch
To run the server, you will need to specify the path to the config file (console.ini). Copy the default ini file to the application root. At the repo root...
cp conf/console.default.ini ./console.ini
The default settings assume an SSL environment. To disable SSL, set session.secure to false in console.ini
session.secure = false
Run the server with
./launcher.sh
launcher.sh is provided as an alias for pserve console.ini --reload
The launcher.sh script runs the application with gunicorn and gevent, closely matching the production deployment setup.
To have Pyramid automatically detect modifications to templates and views,
- Change the reload_templates setting to true in console.ini: pyramid.reload_templates = true
- Run the server with the --reload flag: pserve console.ini --reload
The --reload flag instructs Pyramid to automatically watch for changes in the view callables.
The Pyramid Debug Toolbar can be enabled by adding pyramid_debugtoolbar to the app:main section of console.ini
[app:main] # ... pyramid.includes = pyramid_beaker pyramid_chameleon pyramid_debugtoolbar pyramid_layout
You may also find it useful to set the logging level to DEBUG in the console.ini config file...
[logger_root] # ... handlers = logfile, screen_debug
The management console assumes an SSL setup. To disable SSL for development purposes, set session.secure = false in the config file (console.ini)
A production deployment assumes an SSL setup, requiring nginx. To configure nginx...
- Copy the nginx.conf file at conf/nginx.conf to your system's nginx.conf location
- Location is usually /etc/nginx/nginx.conf on Linux and /usr/local/etc/nginx/nginx.conf on OS X
- Configure the location of the static folder (location /static/.*)
- Configure SSL (specify paths to certificate and key files)
The unit tests are based on Python's standard unittest library.
To run all tests, run the following at the repo root:
python setup.py test
To run the tests with nose and report test coverage:
python setup.py nosetests --with-coverage
Note that you will need to pip install nose, coverage, nose-cov to use nose with coverage
- Pyramid
- Boto
- Zurb Foundation
- AngularJS
- Beaker and pyramid_beaker (server-side cache/sessions)
- Chameleon (server-side templates)
- pyramid_layout (layout/themes for Pyramid)
- Waitress or gunicorn (WSGI server)
- WTForms (server-side forms and validation)