1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
7 Install nodejs, npm and promise
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
19 Please note that the last command 'npm ls' will list all needed dependencies
20 for promise (including yangforge and mocha)
22 .. figure:: images/screenshot_promise_install.png
29 Please perform the following preparation steps:
31 1. Set OpenStack environment parameters properly (e.g. source openrc admin demo
33 2. Create OpenStack project (e.g. promise) and user (e.g. myuser) in e.g. the
35 3. Create a flavor in Nova with 1 vCPU and 512 MB RAM
36 4. Create a private network, subnet and router in Neutron
37 5. Create an image in Glance
39 Once done, the promise test script can be invoked as follows:
43 export OS_PROJECT_NAME=promise
44 export OS_TENANT_NAME=promise
45 export OS_PROJECT_DOMAIN_NAME=Default
46 export OS_USERNAME=myuser
47 export OS_USER_DOMAIN_NAME=Default
48 export OS_PASSWORD=<user password from Step 2>
49 export OS_TEST_FLAVOR=<flavor ID from Step 3>
50 export OS_TEST_NETWORK=<network ID from Step 4>
51 export OS_TEST_IMAGE=<image ID from Step 5>
52 npm run -s test -- --reporter json > promise-results.json
54 The results of the tests will be stored in the promise-results.json file.
56 The results can also be seen in the console ("npm run -s test")
58 .. figure:: images/screenshot_promise.png
62 All 33 tests passing?!
63 Congratulations, Promise has been successfully installed and configured.