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