3 ##Quick Start on the same machine:
5 Tested on Ubuntu 14.04 and OS X El Capitan
8 git clone https://gerrit.opnfv.org/gerrit/domino
9 sudo apt-get install python-pip
10 sudo pip install tosca-parser
11 sudo pip install heat-translator
14 Proceed to the domino folder and run a smoke test that checks APIs
20 If "internal error" message is received, a python library is missing
22 Clean the server side database:
26 Make sure that all the existing domino server and client processes are killed.
27 kill $(pgrep -f "DominoServer.py")
28 kill $(pgrep -f "DominoClient.py")
30 ###Start Domino Server:
31 ./DominoServer.py --log=DEBUG
33 ###Start the first Domino Client:
34 ./DominoClient.py -p 9091 --cliport 9100 --log=DEBUG
36 Note: if --log option is ommitted, the default logging level is Warning messages
38 ###Start the second Domino Client:
39 ./DominoClient.py -p 9092 --cliport 9200 --log=DEBUG
41 ##CLI at the Domino Client:
44 python domino-cli.py <cliport> heartbeat
46 ###Subscribe for policy labels
47 python domino-cli.py <cliport> subscribe -l/--label <policytype>:properties:key:value
50 First checkout the tosca file "./tosca-templates/tosca_helloworld_nfv.yaml" and see how policy types and rules are defined. Then, for the first Domino Client, use subscribe command as:
52 python domino-cli.py 9100 subscribe --label tosca.policies.Placement.Geolocation:properties:region:us-west-1
54 ###Publish default template file under tosca-templates
55 python domino-cli.py <cliport> publish --tosca-file <path_to_toscafile>
58 Run the following command for the second Domino Client:
60 python domino-cli.py 9200 publish --tosca-file ./tosca-templates/tosca_helloworld_nfv.yaml
62 Now, inspect the files generated under ./toscafiles, where the original file as well as parts sent to each Domino Client are shown (each part identified by UDID assigned to that client)
64 ###Query published tosca-templates for each client
65 python domino-cli.py <cliport> list-tuids
68 Run the following command for the second Domino Client:
69 python domino-cli.py 9200 list-tuids
71 ###Change the published template for a specific Template Unique ID (TUID)
72 python domino-cli.py <cliport> publish -t ./tosca-templates/tosca_helloworld_nfv.yaml -k <TUID>
75 Run the following command for the second Domino Client:
76 TUID=$(python domino-cli.py 9200 list-tuids | cut -c3-34)
77 python domino-cli.py 9200 publish -t ./tosca-templates/tosca_helloworld_nfv.yaml -k "$TUID"
80 If accidentally you start DominoClient before DominoServer, don't panic. First start the DominoServer and then input the command on the DominoClient side: