added lead dev contacts to README.md like decided in Wp3 call
[osm/vim-emu.git] / README.md
1 # Distributed Cloud Emulator
2
3 Lead developers (able to merge pull requests):
4
5 * Manuel Peuster <manuel.peuster@upb.de>
6 * Steven Van Rossem <steven.vanrossem@intec.ugent.be>
7
8
9 ### Requirements
10 * needs the latest [Dockernet](https://github.com/mpeuster/dockernet) to be installed on the system
11  * the emulator is implemented against Dockernet's APIs
12 * The emulator uses ZeroMQ based RPC to for communication between demo CLI client and cloud-like APIs
13  * `pip install zerorpc`
14  * (This will be replaced / extended by a REST API later)
15
16 ### Project structure
17 * **src/emuvim/** all emulator code 
18  * **api/** Data center API endpoint implementations (zerorpc, OpenStack REST, ...)
19  * **cli/** CLI client to interact with a running emulator
20  * **dcemulator/** Dockernet wrapper that introduces the notion of data centers and API endpoints
21  * **test/** Unit tests
22  * **example_topology.py** An example topology script to show how topologies can be specified
23
24 ### Installation
25 Automatic installation is provide through Ansible playbooks.
26 * Requires: Ubuntu 14.04 LTS
27 * `sudo apt-get install ansible git`
28 * `sudo vim /etc/ansible/hosts`
29 * Add: `localhost ansible_connection=local`
30
31 #### 1. Dockernet
32 * `cd`
33 * `git clone -b dockernet-sonata https://github.com/mpeuster/dockernet.git`
34 * `cd ~/dockernet/ansible`
35 * `sudo ansible-playbook install.yml`
36 * Wait (and have a coffee) ...
37
38 #### 2. Emulator
39 * Fork the repository.
40 * `cd`
41 * `git clone https://github.com/<user>/son-emu.git`
42 * `cd ~/son-emu/ansible`
43 * `sudo ansible-playbook install.yml`
44
45
46 ### Run
47
48 In the `~/son-emu` directory:
49
50 * During development:
51  * `python setup.py develop`
52 * Otherwise, for a classic installation:
53  * `python setup.py install`
54 * First terminal:
55  * `sudo python src/emuvim/example_topology.py`
56 * Second terminal:
57  * `son-emu-cli compute start -d datacenter1 -n vnf1`
58  * `son-emu-cli compute start -d datacenter1 -n vnf2`
59  * `son-emu-cli compute list`
60 * First terminal:
61  * `dockernet> vnf1 ping -c 2 vnf2`
62 * Second terminal:
63  *  `son-emu-cli monitor get_rate -vnf vnf1`
64
65 #### Example scripts:
66  * `./start_dcnetwork` starts an example datacenter network with monitoring api endpoint
67  * `./start_example_chain` sets up an example service chain, using the example docker container from `package_samples` https://github.com/sonata-nfv/packaging_samples/tree/master/VNFs
68
69 ### Run Unit Tests
70 * `cd ~/son-emu`
71 * `sudo py.test -v src/emuvim` (equivalent to `python setup.py test -v --addopts 'src/emuvim'` but with direct access to the commandline arguments)
72
73 ### CLI
74 * [Full CLI command documentation](https://github.com/sonata-nfv/son-emu/wiki/CLI-Command-Overview)
75