ad1df0ee0cfb7d7eb5e1bcf84f3281ebe9a47eab
[promise.git] / docs / release / configguide / feature.configuration.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 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://gerrit.opnfv.org/gerrit/promise
15     cd promise/source
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 .. figure:: images/screenshot_promise_install.png
22    :name: figure1
23       :width: 90%
24
25
26 Validation
27 ==========
28 Please perform the following preparation steps:
29
30 1. Set OpenStack environment parameters properly (e.g. source openrc admin demo
31    in DevStack)
32 2. Create OpenStack tenant (e.g. promise) and tenant user (e.g. promiser)
33 3. Create a flavor in Nova with 1 vCPU and 512 MB RAM
34 4. Create a private network, subnet and router in Neutron
35 5. Create an image in Glance
36
37 Once done, the promise test script can be invoked as follows (as a single line
38 command):
39
40 .. code-block:: bash
41
42    NODE_ENV=mytest \
43    OS_TENANT_NAME=promise \
44    OS_USERNAME=promiser \
45    OS_PASSWORD=<user password from Step 2> \
46    OS_TEST_FLAVOR=<flavor ID from Step 3> \
47    OS_TEST_NETWORK=<network ID from Step 4> \
48    OS_TEST_IMAGE=<image ID from Step 5> \
49    npm run -s test -- --reporter json > promise-results.json
50
51 The results of the tests will be stored in the promise-results.json file.
52
53 The results can also be seen in the console ("npm run -s test")
54
55 .. figure:: images/screenshot_promise.png
56    :name: figure2
57    :width: 90%
58
59 All 33 tests passing?!
60 Congratulations, promise has been successfully installed and configured.