RETIRED, OpenStack Health Dashboard
Go to file
Matthew Treinish 6b636200f5
Add a temporary version cap on subunit2sql
This commit adds a temporary version cap on subunit2sql to be < 1.0.0.
The 1.0.0 release includes a very large database migration which will
be slow to execute. The python DB api from >=v1.0.0 will not work with
a database that doesn't have the updated schema. So while the migration
is running let's cap the version we install to prevent everything from
breaking while the migration is running. (which might take days)

Change-Id: Ieadcc6847a1648bc247fd840ec95653f438be664
2015-11-23 15:55:45 -05:00
app Merge "Add Metrics Service" 2015-11-18 19:42:24 +00:00
doc/source Remove mockups for implemented pages 2015-10-12 15:47:50 -04:00
etc Add new `config.json` and associated ConfigService. 2015-10-09 13:43:04 -06:00
gulp Enable Protractor end-to-end testing. 2015-11-11 17:02:27 -07:00
openstack_health Refactor project api and ui to make them generic 2015-11-18 10:39:25 -02:00
test Merge "Add Metrics Service" 2015-11-18 19:42:24 +00:00
.eslintignore Fix log error 2015-10-20 12:59:51 -02:00
.eslintrc Fix JavaScript lint errors 2015-10-15 14:32:14 -03:00
.gitignore Add charts from mockup to home view. 2015-09-16 17:25:45 +00:00
.gitreview Add .gitreview file 2015-09-14 15:58:27 -06:00
.jshintrc Add jshint configuration. 2015-09-02 15:49:18 -06:00
.testr.conf Add python bits to the repo 2015-09-14 19:06:08 -04:00
CONTRIBUTING.rst Rename to openstack-health 2015-09-14 14:16:34 -06:00
HACKING.rst Remove all remaining references to stackviz template. 2015-09-14 16:43:16 -06:00
LICENSE Add some missing base files from cookiecutter (LICENSE, manifest, setuptools config) 2015-08-03 09:11:51 -06:00
README.rst Include rapid test instructions on README 2015-11-11 12:09:37 -02:00
gulpfile.js Add Angular boilerplate from `angularjs-gulp-browserify-boilerplate` 2015-08-31 15:18:45 -06:00
package.json Enable Protractor end-to-end testing. 2015-11-11 17:02:27 -07:00
requirements.txt Add a temporary version cap on subunit2sql 2015-11-23 15:55:45 -05:00
setup.cfg Fix wsgi_script entry point 2015-10-10 00:39:36 -04:00
setup.py Add python bits to the repo 2015-09-14 19:06:08 -04:00
test-requirements.txt Add unit tests for rest api and fix docs 2015-09-15 23:39:20 -04:00
tox.ini Add npm envs to tox 2015-11-09 17:11:38 -02:00

README.rst

openstack-health

webclient for visualizing test results of OpenStack CI jobs.

Installation

API

Make sure the python dependencies are installed preferably in a virtualenv if doing development work:

pip install -r requirements.txt

Frontend

Installation of the frontend requires Node.js and Gulp.

Ubuntu:

sudo apt-get install nodejs npm nodejs-legacy
sudo npm -g install npm@2
sudo npm -g config set prefix /usr/local
sudo npm -g install npm
sudo npm -g install gulp

OSX (via HomeBrew, note no sudo):

brew install nodejs
npm install -g gulp

Then, install the Node modules by running, from the project directory:

npm install

Usage - Development

API

To run the REST API for development you can install the openstack_health python package in development mode and start the API service with:

python setup.py develop
openstack_health_api <config_file>

or alternatively just can just run the api.py file manually. For example, from the top of the repo you would run:

python2 openstack_health/api.py <config_file>

A sample of <config_file> can be found in etc/openstack-health-api.conf. This will start up a local webserver listening on localhost. You can then send requests to the specified port on stdout to see the response.

Frontend

A development server can be run as follows:

gulp dev

This will open a web browser and reload code automatically as it changes on the filesystem.

Usage - Production

API

The rest api is a flask application so any of the methods for deploying a flask application can be used. The standalone entrypoint used for development isn't suitable for production because it's single threaded. You should use a wsgi container, something like uwsgi, gunicorn, or mod_wsgi to deploy it for real. For example, running the API with uwsgi standalone you can do something like:

uwsgi -s /tmp/uwsgi.sock --module openstack_health.api --callable app --pyargv config_file --http :5000

That will startup a uwsgi server running the rest api on port 5000.

Frontend

The production application can be build using:

gulp prod

The result will be written to ./build and should be appropriate for distribution. Note that all files are not required:

  • Directory structure (js/, css/, fonts/, images/): required.
  • Static resources (fonts/, images/): required.
  • Core files (index.html, js/main.js, css/main.css): required unless gzipped versions are used.
  • Gzipped versions of core files (*.gz): not required, but preferred. Use instead of plain core files to save on disk usage and bandwidth.
  • Source maps (js/main.js.map, js/main.js.map.gz): only required for debugging purposes.

Testing

API

To test python code, run:

tox -e py27

Frontend

To test javascript code, run:

npm test

Alternatively, you can start the karma server and have it watch for changes in your files so that tests are run every time they change, allowing for much faster feedback:

./node_modules/karma/bin/karma start test/karma.conf.js --no-single-run