8290afcd4d5d77218207b60c90f2506f588bb864
[osm/vim-emu.git] / README.md
1 # vim-emu: A NFV multi-PoP emulation platform
2
3 This emulation platform was created to support network service developers to locally prototype and test their network services in realistic end-to-end multi-PoP scenarios. It allows the execution of real network functions, packaged as Docker containers, in emulated network topologies running locally on the developer's machine. The emulation platform also offers OpenStack-like APIs for each emulated PoP so that it can integrate with MANO solutions, like OSM. The core of the emulation platform is based on [Containernet](https://containernet.github.io).
4
5 The emulation platform `vim-emu` is developed as part of OSM's DevOps MDG.
6
7 ### Acknowledgments
8
9 This software was originally developed by the [SONATA project](http://www.sonata-nfv.eu), funded by the European Commission under grant number 671517 through the Horizon 2020 and 5G-PPP programs.
10
11 ### Cite this work
12
13 If you use the emulation platform for your research and/or other publications, please cite the following paper to reference our work:
14
15 * M. Peuster, H. Karl, and S. v. Rossem: [MeDICINE: Rapid Prototyping of Production-Ready Network Services in Multi-PoP Environments](http://ieeexplore.ieee.org/document/7919490/). IEEE Conference on Network Function Virtualization and Software Defined Networks (NFV-SDN), Palo Alto, CA, USA, pp. 148-153. doi: 10.1109/NFV-SDN.2016.7919490. (2016)
16
17 ## Installation
18
19 There are three ways to install and use the emulation platform. The bare-metal installation requires a freshly installed Ubuntu 16.04 LTS and is done by an ansible playbook. The second option is to use a nested Docker environment to run the emulator inside a Docker container. The third option is to use Vagrant to create a VirtualBox-based VM on your machine that contains the pre-installed and configured emulator.
20
21 ### Option 1: Bare-metal installation
22
23 * Requires: Ubuntu 16.04 LTS
24 * `sudo apt-get install ansible git aptitude`
25
26 #### 1. Containernet
27
28 * `cd`
29 * `git clone https://github.com/containernet/containernet.git`
30 * `cd ~/containernet/ansible`
31 * `sudo ansible-playbook -i "localhost," -c local install.yml`
32
33 #### 2. vim-emu
34
35 * `cd`
36 * `git clone https://osm.etsi.org/gerrit/osm/vim-emu.git`
37 * `cd ~/vim-emu/ansible`
38 * `sudo ansible-playbook -i "localhost," -c local install.yml`
39
40 ### Option 2: Nested Docker Deployment
41 This option requires a Docker installation on the host machine on which the emulator should be deployed.
42
43 * `git clone https://osm.etsi.org/gerrit/osm/vim-emu.git`
44 * `cd ~/vim-emu`
45 * Build the container: `docker build -t vim-emu-img .`
46 * Run the (interactive) container: `docker run --name vim-emu -it --rm --privileged --pid='host' -v /var/run/docker.sock:/var/run/docker.sock vim-emu-img /bin/bash`
47
48 ### Option 3: Vagrant Installation
49 * Request VirtualBox and Vagrant to be installed on the system.
50 * `git clone https://osm.etsi.org/gerrit/osm/vim-emu.git`
51 * `cd ~/vim-emu`
52 * `vagrant up`
53 * `vagrant ssh` to enter the new VM in which the emulator is installed.
54
55 ## Usage
56
57 ### Example
58
59 This simple example shows how to start the emulator with a simple topology (terminal 1) and how to start (terminal 2) some empty VNF containers in the emulated datacenters (PoPs) by using the vim-emu CLI.
60
61 * First terminal (start the emulation platform):
62     * `sudo python examples/default_single_dc_topology.py`
63 * Second terminal (use `docker exec vim-emu <command>` for nested Docker deployment):
64     * `vim-emu compute start -d dc1 -n vnf1`
65     * `vim-emu compute start -d dc1 -n vnf2`
66     * `vim-emu compute list`
67 * First terminal:
68     * `containernet> vnf1 ifconfig`
69     * `containernet> vnf1 ping -c 2 vnf2`
70
71 ### Further documentation and useful links
72
73 * [Full CLI command documentation](https://github.com/sonata-nfv/son-emu/wiki/CLI-Command-Overview)
74 * [Requirements for Docker containers executed by the emulator](https://github.com/sonata-nfv/son-emu/wiki/Container-Requirements)
75 * [REST API](https://github.com/sonata-nfv/son-emu/wiki/APIs)
76 * [Mininet](http://mininet.org)
77 * [Containernet](https://containernet.github.io)
78 * [Maxinet](https://maxinet.github.io)
79
80 ## Development
81
82 ### How to contribute?
83
84 Please check [this OSM wiki page](https://osm.etsi.org/wikipub/index.php/Workflow_with_OSM_tools) to learn how to contribute to a OSM module.
85
86 ### Testing
87
88 To run the unit tests do:
89
90 * `cd ~/vim-emu`
91 * `sudo py.test -v src/emuvim/test/unittests`
92 (To force Python2: `python2 -m  pytest -v src/emuvim/test/unittests`)
93
94 ## Seed code contributors:
95
96 ### Lead:
97
98 * Manuel Peuster (https://github.com/mpeuster)
99 * Steven Van Rossem (https://github.com/stevenvanrossem)
100
101 ### Contributors
102
103 * Hadi Razzaghi Kouchaksaraei (https://github.com/hadik3r)
104 * Wouter Tavernier (https://github.com/wtaverni)
105 * Geoffroy Chollon (https://github.com/cgeoffroy)
106 * Eduard Maas (https://github.com/edmaas)
107 * Malte Splietker (https://github.com/splietker)
108 * Johannes Kampmeyer (https://github.com/xschlef)
109
110 ## License
111
112 The emulation platform is published under Apache 2.0 license. Please see the LICENSE file for more details.
113
114 ## Contact
115
116 Manuel Peuster (Paderborn University) <manuel@peuster.de>
117