f37712f94a61dd082be8976ea3f971b12353a80a
[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
31 ### 3rd-party code used
32 * (none)
33
34
35 ### Project structure
36
37 * **src/emuvim/** all emulator code 
38  * **api/** Data center API endpoint implementations (zerorpc, OpenStack REST, ...)
39  * **cli/** CLI client to interact with a running emulator
40  * **dcemulator/** Dockernet wrapper that introduces the notion of data centers and API endpoints
41  * **examples/** Example topology scripts
42  * **test/** Unit tests
43 * **ansible/** Ansible install scripts
44 * **util/** helper scripts
45
46 ### Installation
47 Automatic installation is provide through Ansible playbooks.
48
49 * Requires: Ubuntu 14.04 LTS
50 * `sudo apt-get install ansible git`
51 * `sudo vim /etc/ansible/hosts`
52 * Add: `localhost ansible_connection=local`
53
54 #### 1. Dockernet
55 * `cd`
56 * `git clone -b dockernet-sonata https://github.com/mpeuster/dockernet.git`
57 * `cd ~/dockernet/ansible`
58 * `sudo ansible-playbook install.yml`
59 * Wait (and have a coffee) ...
60
61 #### 2. Emulator
62 * Fork the repository.
63 * `cd`
64 * `git clone https://github.com/<user>/son-emu.git`
65 * `cd ~/son-emu/ansible`
66 * `sudo ansible-playbook install.yml`
67
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  * `dockernet> 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` (equivalent to `python setup.py test -v --addopts 'src/emuvim'` but with direct access to the commandline arguments)
92
93 ### CLI
94 * [Full CLI command documentation](https://github.com/sonata-nfv/son-emu/wiki/CLI-Command-Overview)
95