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