a little nicer wrt pep8
[sfa.git] / sfa / dummy / README.txt
1 ######################################  DUMMY TESTBED DRIVER FOR SFA ############################################
2
3 In order to make easy the adoption of SFA by the testbed owners, we decided to implement this DUMMY TESTBED DRIVER FOR SFA which represent one flavour of SFA (dummy).
4
5 Testbed owners deciding to wrap their testbed with SFA, can follow this small step-by-step guide to know how SFA works, how it interact with the testbed and what are the needed pieces to glue SFA and the testbed.
6
7
8 STEP-BY-STEP GUIDE :
9
10 1. Install SFA (http://svn.planet-lab.org/wiki/SFATutorialInstall#InstallingSFA) 
11 (On RPM based OS, the SFA sources go here : /usr/lib/python2.7/site-packages/sfa )
12
13 2. Launch the Dummy testbed XML-RPC API:
14
15 # python /usr/lib/python2.7/site-packages/sfa/dummy/dummy_testbed_api.py
16
17 3. Configure SFA to the "dummy" flavour as follow :
18
19 # sfa-config-tty
20 Enter command (u for usual changes, w to save, ? for help) u
21 == sfa_generic_flavour : [dummy] dummy ("dummy" flavour)
22 == sfa_interface_hrn : [pla] topdomain   (Choose your Authority name)           
23 == sfa_registry_root_auth : [pla] topdomain (Choose your Authority name)
24 == sfa_registry_host : [localhost] localhost
25 == sfa_aggregate_host : [localhost] localhost
26 == sfa_sm_host : [localhost] localhost
27 == sfa_db_host : [localhost] localhost
28 == sfa_dummy_url : [http://127.0.0.1:8080] 
29 Enter command (u for usual changes, w to save, ? for help) w
30 Wrote /etc/sfa/configs/site_config
31 Merged
32         /etc/sfa/default_config.xml
33 and     /etc/sfa/configs/site_config
34 into    /etc/sfa/sfa_config
35 You might want to type 'r' (restart sfa), 'R' (reload sfa) or 'q' (quit)
36 Enter command (u for usual changes, w to save, ? for help) r
37 ==================== Stopping sfa
38 Shutting down SFA                                          [  OK  ]
39 ==================== Starting sfa
40 SFA: Checking for PostgreSQL server                        [  OK  ]
41 SFA: installing peer certs                                 [  OK  ]
42 SFA: Registry                                              [  OK  ]
43 SFA: Aggregate                                             [  OK  ]
44 SFA: SliceMgr                                              [  OK  ]
45 Enter command (u for usual changes, w to save, ? for help) q
46
47 5. Import Dummy testbed data to SFA (users, slices, nodes):
48
49 # sfaadmin.py reg import_registry
50
51 5. Create a user and a slice:
52
53 # sfaadmin.py reg register -t user -x topdomain.dummy.bob -k /root/.ssh/id_rsa.pub -e bob@dummy.net
54 # sfaadmin.py reg register -t slice -x topdomain.dummy.bob_slice -r topdomain.dummy.bob
55
56 6. Configure you SFI client (http://svn.planet-lab.org/wiki/SFATutorialConfigureSFA#ConfigureSFAClientSFI)
57 Example of sfi_config:
58 [sfi]
59 auth = topdomain.dummy
60 user = topdomain.dummy.bob
61 registry = http://localhost:12345/
62 sm = http://localhost:12346/
63
64 7. Make a test: 
65 update the following command with your already configured Authority name. 
66
67 # sfi.py list topdomain.dummy 
68
69 8. Now continue testing SFA, have a look at the dummy driver code and write your testbed driver for SFA... Enjoy.
70
71