Merge remote-tracking branch 'upstream/master' into dev-sonata-dummy-gatekeeper
[osm/vim-emu.git] / README.md
1 [![Build Status](http://jenkins.sonata-nfv.eu/buildStatus/icon?job=son-emu)](http://jenkins.sonata-nfv.eu/job/son-emu)
2
3 # Distributed Cloud Emulator
4
5 ## Lead Developers
6 The following lead developers are responsible for this repository and have admin rights. They can, for example, merge pull requests.
7
8
9 * Manuel Peuster (mpeuster)
10 * Steven Van Rossem (stevenvanrossem)
11
12
13 ### Dependencies
14 * needs the latest [Dockernet](https://github.com/mpeuster/dockernet) to be installed on the system
15 * pyaml
16 * zerorpc
17 * tabulate
18 * argparse
19 * networkx
20 * six>=1.9
21 * ryu
22 * oslo.config
23 * pytest
24 * pytest-runner
25 * Flask
26 * flask_restful
27
28 ### Project structure
29
30 * **src/emuvim/** all emulator code 
31  * **api/** Data center API endpoint implementations (zerorpc, OpenStack REST, ...)
32  * **cli/** CLI client to interact with a running emulator
33  * **dcemulator/** Dockernet wrapper that introduces the notion of data centers and API endpoints
34  * **examples/** Example topology scripts
35  * **test/** Unit tests
36 * **ansible/** Ansible install scripts
37 * **util/** helper scripts
38
39 ### Installation
40 Automatic installation is provide through Ansible playbooks.
41
42 * Requires: Ubuntu 14.04 LTS
43 * `sudo apt-get install ansible git`
44 * `sudo vim /etc/ansible/hosts`
45 * Add: `localhost ansible_connection=local`
46
47 #### 1. Dockernet
48 * `cd`
49 * `git clone -b dockernet-sonata https://github.com/mpeuster/dockernet.git`
50 * `cd ~/dockernet/ansible`
51 * `sudo ansible-playbook install.yml`
52 * Wait (and have a coffee) ...
53
54 #### 2. Emulator
55 * Fork the repository.
56 * `cd`
57 * `git clone https://github.com/<user>/son-emu.git`
58 * `cd ~/son-emu/ansible`
59 * `sudo ansible-playbook install.yml`
60
61
62 ### Run
63
64 In the `~/son-emu` directory:
65
66 * During development:
67  * `python setup.py develop`
68 * Otherwise, for a classic installation:
69  * `python setup.py install`
70 * First terminal:
71  * `sudo python src/emuvim/examples/simple_topology.py 
72 `
73 * Second terminal:
74  * `son-emu-cli compute start -d datacenter1 -n vnf1`
75  * `son-emu-cli compute start -d datacenter1 -n vnf2`
76  * `son-emu-cli compute list`
77 * First terminal:
78  * `dockernet> vnf1 ping -c 2 vnf2`
79 * Second terminal:
80  *  `son-emu-cli monitor get_rate -vnf vnf1`
81
82 ### Run Unit Tests
83 * `cd ~/son-emu`
84 * `sudo py.test -v src/emuvim` (equivalent to `python setup.py test -v --addopts 'src/emuvim'` but with direct access to the commandline arguments)
85
86 ### CLI
87 * [Full CLI command documentation](https://github.com/sonata-nfv/son-emu/wiki/CLI-Command-Overview)
88