Add license to the release documentation and requirements doc
[promise.git] / docs / configguide / featureconfig.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3
4 Promise Feature Configuration Overview
5 ======================================
6
7 Promise installation
8 --------------------
9
10 Install nodejs, npm and promise
11
12 .. code-block:: bash
13
14     curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
15     sudo apt-get install -y nodejs
16     sudo npm -g install npm@latest
17     git clone https://github.com/opnfv/promise.git
18     cd promise
19     npm install
20
21 Please note that the last command 'npm install' will install all needed dependencies
22 for promise (including yangforge and mocha)
23
24 Testing
25 -------
26 Please perform the following preparation steps:
27
28 1. Set OpenStack environment parameters properly (e.g. source openrc admin demo
29    in DevStack)
30 2. Create OpenStack tenant (e.g. promise) and tenant user (e.g. promiser)
31 3. Create a flavor in Nova with 1 vCPU and 512 MB RAM
32 4. Create a private network, subnet and router in Neutron
33 5. Create an image in Glance
34
35 Once done, the promise test script can be invoked as follows (as a single line
36 command):
37
38 .. code-block:: bash
39
40    NODE_ENV=mytest \
41    OS_TENANT_NAME=promise \
42    OS_USERNAME=promiser \
43    OS_PASSWORD=<user password from Step 2> \
44    OS_TEST_FLAVOR=<flavor ID from Step 3> \
45    OS_TEST_NETWORK=<network ID from Step 4> \
46    OS_TEST_IMAGE=<image ID from Step 5> \
47    npm run -s test -- --reporter json > promise-results.json
48
49 The results of the tests will be stored in the promise-results.json file.
50
51 The results can also be seen in the console ("npm run -s test")
52
53 .. figure:: images/screenshot_promise.png
54    :name: figure1
55    :width: 90%
56
57 All 33 tests passing?!
58 Congratulations, promise has been successfully installed and configured.