retest
[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 * Manuel Peuster (mpeuster)
9 * Steven Van Rossem (stevenvanrossem)
10
11 ### Environment
12 * Python 2.7
13 * Latest [Containernet](https://github.com/mpeuster/containernet) installed on the system
14
15 ### Dependencies
16 * pyaml (public domain)
17 * zerorpc (MIT)
18 * tabulate (public domain)
19 * argparse (Python software foundation license)
20 * networkx (BSD)
21 * six>=1.9 (MIT)
22 * ryu (Apache 2.0)
23 * oslo.config (Apache 2.0)
24 * pytest (MIT)
25 * pytest-runner (MIT)
26 * Flask (BSD)
27 * flask_restful (BSD)
28 * requests  (Apache 2.0)
29 * docker-py (Apache 2.0)
30 * paramiko (LGPL)
31
32 ### 3rd-party code used
33 * (none)
34
35
36 ### Project structure
37
38 * **src/emuvim/** all emulator code 
39  * **api/** Data center API endpoint implementations (zerorpc, OpenStack REST, ...)
40  * **cli/** CLI client to interact with a running emulator
41  * **dcemulator/** Containernet wrapper that introduces the notion of data centers and API endpoints
42  * **examples/** Example topology scripts
43  * **test/** Unit tests
44 * **ansible/** Ansible install scripts
45 * **util/** helper scripts
46
47 ### Installation
48 Automatic installation is provide through Ansible playbooks.
49
50 * Requires: Ubuntu 14.04 LTS
51 * `sudo apt-get install ansible git`
52 * `sudo vim /etc/ansible/hosts`
53 * Add: `localhost ansible_connection=local`
54
55 #### 1. Containernet
56 * `cd`
57 * `git clone https://github.com/mpeuster/containernet.git`
58 * `cd ~/containernet/ansible`
59 * `sudo ansible-playbook install.yml`
60 * Wait (and have a coffee) ...
61
62 #### 2. Emulator
63 * Fork the repository.
64 * `cd`
65 * `git clone https://github.com/<user>/son-emu.git`
66 * `cd ~/son-emu/ansible`
67 * `sudo ansible-playbook install.yml`
68
69 ### Run
70
71 In the `~/son-emu` directory:
72
73 * During development:
74  * `python setup.py develop`
75 * Otherwise, for a classic installation:
76  * `python setup.py install`
77 * First terminal:
78  * `sudo python src/emuvim/examples/simple_topology.py 
79 `
80 * Second terminal:
81  * `son-emu-cli compute start -d datacenter1 -n vnf1`
82  * `son-emu-cli compute start -d datacenter1 -n vnf2`
83  * `son-emu-cli compute list`
84 * First terminal:
85  * `containernet> vnf1 ping -c 2 vnf2`
86 * Second terminal:
87  *  `son-emu-cli monitor get_rate -vnf vnf1`
88
89 ### Run Unit Tests
90 * `cd ~/son-emu`
91 * `sudo py.test -v src/emuvim/test/unittests`
92
93 ### CLI
94 * [Full CLI command documentation](https://github.com/sonata-nfv/son-emu/wiki/CLI-Command-Overview)