~psivaa/uci-engine/lander-jenkins-plugin

« back to all changes in this revision

Viewing changes to image-builder/README.imagebuilder

  • Committer: Paul Larson
  • Date: 2013-12-12 05:20:33 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: paul.larson@canonical.com-20131212052033-c4oouv82qrze3yty
Stub APIs and restish framework for image-builder

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Local Development
 
2
-----------------
 
3
 
 
4
Development environments can be set of using the setup.py files in the
 
5
projects you wish to work on. The easiest approach is to use python-virtualenv::
 
6
 
 
7
  virtualenv /tmp/venv
 
8
  . /tmp/venv/bin/activate
 
9
  ./setup.py develop
 
10
 
 
11
Unit-testing can be done with::
 
12
 
 
13
  python -m unittest imagebuilder.tests.test_api_v1
 
14
 
 
15
Running under the python wsgi server can be done with::
 
16
 
 
17
  ./imagebuilder/wsgi.py
 
18
 
 
19
Running under gunicorn can be done with::
 
20
 
 
21
  # need gunicorn:
 
22
  pip install gunicorn
 
23
 
 
24
  # TIP: by setting max-requests=1 you can make changes to the source code
 
25
  # and they'll be picked up in the next http request you make!!
 
26
  gunicorn --max-requests 1 imagebuilder.wsgi:app
 
27
 
 
28
Juju Testing
 
29
------------
 
30
 
 
31
Each service should include a juju-deployer config under the juju-deployer
 
32
directory.