Merge pull request #5 from mpeuster/master
[osm/vim-emu.git] / README.md
1 # Distributed Cloud Emulator
2
3 Contributors:
4
5 * Manuel Peuster <manuel.peuster@upb.de>
6
7
8 ### Requirements
9 * needs the latest [Dockernet](https://github.com/mpeuster/dockernet) to be installed on the system
10  * the emulator is implemented against Dockernet's APIs
11 * The emulator uses ZeroMQ based RPC to for communication between demo CLI client and cloud-like APIs
12  * `pip install zerorpc`
13  * (This will be replaced / extended by a REST API later)
14
15 ### Project structure
16 * **emuvim/** all emulator code 
17  * **api/** Data center API endpoint implementations (zerorpc, OpenStack REST, ...)
18  * **cli/** CLI client to interact with a running emulator
19  * **dcemulator/** Dockernet wrapper that introduces the notion of data centers and API endpoints
20  * **test/** Unit tests
21  * **example_topology.py** An example topology script to show how topologies can be specified
22
23 ### Installation
24 Automatic installation is provide through Ansible playbooks.
25 * Requires: Ubuntu 14.04 LTS
26 * `sudo apt-get install ansible git`
27 * `sudo vim /etc/ansible/hosts`
28 * Add: `localhost ansible_connection=local`
29
30 #### 1. Dockernet
31 * `cd`
32 * `git clone https://github.com/mpeuster/dockernet.git`
33 * `cd ~/dockernet/ansible`
34 * `sudo ansible-playbook install.yml`
35 * Wait (and have a coffee) ...
36
37 #### 2. Emulator
38 * Fork the repository.
39 * `cd`
40 * `git clone https://github.com/<user>/son-emu.git`
41 * `cd ~/son-emu/ansible`
42 * `sudo ansible-playbook install.yml`
43
44
45 ### Run
46 * First terminal:
47  * `cd ~/son-emu/emuvim`
48  * `sudo python example_topology.py`
49 * Second terminal:
50  * `cd ~/son-emu/emuvim/cli`
51  * `./son-emu-cli compute start -d dc1 -n vnf1`
52  * `./son-emu-cli compute start -d dc1 -n vnf2`
53  * `./son-emu-cli compute list`
54 * First terminal:
55  * `dockernet> vnf1 ping -c 2 vnf2`
56
57 ### Run Unit Tests
58 * `cd ~/son-emu/emuvim`
59 * `sudo python test` or `sudo python test -v` for more outputs
60
61
62 ### TODO
63 * DCemulator
64  * Advanced network model
65   * improve network management, multiple interfaces per container
66   * API to create multiple networks (per DC?)
67 * SDN Controller
68  * simple API to chain running VNFs
69 * Add resource constraints to datacenters
70 * Check if we can use the Mininet GUI to visualize our DCs?
71 * (Unit tests for zerorpc API endpoint, and any other new endpoint)
72
73
74 ### Features / Done
75 * Define a topology (Python script)
76  * Add data centers
77  * Add switches and links between the,
78 * Define API endpoints in topology
79  * call startAPI from topology definition and start it in a own thread
80  * make it possible to start different API endpoints for different DCs
81 * DCemulator
82  * correctly start and connect new compute resources at runtime
83  * remove and disconnect compute resources at runtime
84  * do IP management for new containers
85  * list active compute resources
86 * Cloud-like reference API with CLI for demonstrations
87  * Write CLI client
88  * Start compute (name, DC, image, network)
89  * Stop compute
90 * Create an Ansible-based automatic installation routine
91 * Unit tests
92