X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=README.md;h=e0f3cfae11f22c23cf1793f45e58194efa29ed9c;hb=b9c8637d857bc250ef5318f5ecf05de447816035;hp=7b8fe6041a5806153c95a77257622154475f3eef;hpb=4883119e2b702cbc7a5a1f8251778ece25afcce4;p=osm%2Fvim-emu.git diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 7b8fe60..e0f3cfa --- a/README.md +++ b/README.md @@ -1,36 +1,94 @@ -# emulator-strawman - -(c) 2015 by Manuel Peuster - - -## emu-vim - -### Requirements -* needs the latest Dockernet to be installed in the system - * the wrapper uses standard Python imports to use the Dockernet modules -* Uses ZeroMQ based RPC to open a cloud-like interface that can be used by a demo CLI client - * pip install import zerorpc - * This will be replaced / extended by a REST API later - -### TODO -* DCemulator - * correctly start and connect new compute resources at runtime - * remove and disconnect compute resources at runtime - * list active compute resources -* Cloud-like reference API with CLI for demonstrations - * Write CLI client - * Start compute - * Stop compute -* Re-factor endpoint API so that API objects can be more or less statless (ask DCEmulator for available DCs instead of maintaining a own list) -* Create an Ansible-based automatic installation routine -* Add resource constraints to datacenters -* Check if we can use the Mininet GUI to visualize our DCs? - - -### Features -* Define a topology (Python script) - * Add data centers - * Add switches and links between the, -* Define API endpoints in topology - * call startAPI from topology definition and start it in a own thread - * make it possible to start different API endpoints for different DCs +[![Build Status](http://jenkins.sonata-nfv.eu/buildStatus/icon?job=son-emu)](http://jenkins.sonata-nfv.eu/job/son-emu) + +# Distributed Cloud Emulator + +### Lead Developers +The following lead developers are responsible for this repository and have admin rights. They can, for example, merge pull requests. + +* Manuel Peuster (mpeuster) +* Steven Van Rossem (stevenvanrossem) + +### Environment +* Python 2.7 +* Latest [Containernet](https://github.com/mpeuster/containernet) installed on the system + +### Dependencies +* pyaml (public domain) +* zerorpc (MIT) +* tabulate (public domain) +* argparse (Python software foundation license) +* networkx (BSD) +* six>=1.9 (MIT) +* ryu (Apache 2.0) +* oslo.config (Apache 2.0) +* pytest (MIT) +* pytest-runner (MIT) +* Flask (BSD) +* flask_restful (BSD) +* requests (Apache 2.0) +* docker-py (Apache 2.0) +* paramiko (LGPL) + +### 3rd-party code used +* (none) + + +### Project structure + +* **src/emuvim/** all emulator code + * **api/** Data center API endpoint implementations (zerorpc, OpenStack REST, ...) + * **cli/** CLI client to interact with a running emulator + * **dcemulator/** Containernet wrapper that introduces the notion of data centers and API endpoints + * **examples/** Example topology scripts + * **test/** Unit tests +* **ansible/** Ansible install scripts +* **util/** helper scripts + +### Installation +Automatic installation is provide through Ansible playbooks. + +* Requires: Ubuntu 14.04 LTS +* `sudo apt-get install ansible git` +* `sudo vim /etc/ansible/hosts` +* Add: `localhost ansible_connection=local` + +#### 1. Containernet +* `cd` +* `git clone https://github.com/mpeuster/containernet.git` +* `cd ~/containernet/ansible` +* `sudo ansible-playbook install.yml` +* Wait (and have a coffee) ... + +#### 2. Emulator +* Fork the repository. +* `cd` +* `git clone https://github.com//son-emu.git` +* `cd ~/son-emu/ansible` +* `sudo ansible-playbook install.yml` + +### Run + +In the `~/son-emu` directory: + +* During development: + * `python setup.py develop` +* Otherwise, for a classic installation: + * `python setup.py install` +* First terminal: + * `sudo python src/emuvim/examples/simple_topology.py +` +* Second terminal: + * `son-emu-cli compute start -d datacenter1 -n vnf1` + * `son-emu-cli compute start -d datacenter1 -n vnf2` + * `son-emu-cli compute list` +* First terminal: + * `containernet> vnf1 ping -c 2 vnf2` +* Second terminal: + * `son-emu-cli monitor get_rate -vnf vnf1` + +### Run Unit Tests +* `cd ~/son-emu` +* `sudo py.test -v src/emuvim/test/unittests` + +### CLI +* [Full CLI command documentation](https://github.com/sonata-nfv/son-emu/wiki/CLI-Command-Overview)