Update Install doc
* downgrade tox (https://bugs.launchpad.net/openstack-ci/+bug/1274135) * remove sample data Change-Id: I5324e0f3ceb9a438d57a79105a81ed4dae285767
This commit is contained in:
parent
1d9632bae0
commit
ce32ea4877
@ -22,8 +22,17 @@ Setting up a local environment for development can be done with tox::
|
||||
|
||||
$ sudo pip install virtualenv setuptools-git flake8 tox
|
||||
|
||||
You may need to downgrade tox, due to an issue described here: https://bugs.launchpad.net/openstack-ci/+bug/1274135::
|
||||
|
||||
$ sudo pip uninstall --yes tox virtualenv
|
||||
$ sudo rm -rf /tmp/pip-build-* /usr/local/lib/python2.7/dist-packages/tox \
|
||||
/usr/local/lib/python2.7/dist-packages/virtualenv \
|
||||
/usr/local/bin/tox /usr/local/bin/virtualenv
|
||||
$ sudo pip install -U tox==1.6.1 virtualenv==1.10.1'
|
||||
|
||||
Now create your virtualenv:
|
||||
|
||||
$ cd <your_src_dir>/tuskar
|
||||
# create virtualenv
|
||||
$ tox -e py27
|
||||
|
||||
Note: if ``pip install`` fails due to an outdated setuptools, you can try to update it first::
|
||||
@ -56,8 +65,8 @@ Note: replace these values with credentials for our undercloud OpenStack. If
|
||||
you're using `Devstack <http://devstack.org/>`_, the username and password are
|
||||
printed out when `stack.sh` finishes its job.
|
||||
|
||||
You will need a local checkout of the tripleo-heat-templates. A
|
||||
configuration entry is defined for this purpose: tht_local_dir should point
|
||||
You will need a local checkout of the tripleo-heat-templates. Uncomment the
|
||||
configuration entry that is defined for this purpose: tht_local_dir should point
|
||||
to your local copy of the tripleo-heat-templates.
|
||||
|
||||
tht_local_dir = "/etc/tuskar/tripleo-heat-templates/"
|
||||
@ -80,26 +89,17 @@ We need to initialise the database schema::
|
||||
You can verify this was successful (in addition to seeing no error
|
||||
output) with::
|
||||
|
||||
$ sqlite3 tuskar.sqlite .schema
|
||||
$ sqlite3 tuskar/openstack/common/db/tuskar.sqlite .schema
|
||||
|
||||
Then, launch the app and try curl to see if it works::
|
||||
|
||||
$ tuskar-api --config-file etc/tuskar/tuskar.conf
|
||||
$ curl -v -X GET -H 'Accept: application/json' http://0.0.0.0:8585/v1/resource_classes/ | python -mjson.tool
|
||||
$ curl -v -X GET -H 'Accept: application/json' http://0.0.0.0:8585/v1/overclouds/ | python -mjson.tool
|
||||
|
||||
Assuming this is your first time running with a new database, you should
|
||||
simply get '[]' back from curl above. Currently the api supports only
|
||||
json return type, so we request that in the example call.
|
||||
|
||||
Next, you can run a script to populate the DB with some sample data::
|
||||
|
||||
$ python tools/sample_data.py
|
||||
|
||||
This will create 2 Resource Classes and three Racks. You need to have the Tuskar
|
||||
API server running. You can see more examples of using the API at our `cURL
|
||||
Commands page <docs/api/curl.rst>`_.
|
||||
|
||||
|
||||
Running Tuskar API
|
||||
------------------
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user