Added bibtex to readme
[osm/vim-emu.git] / README.md
1 <!--
2 # Copyright (c) 2017 SONATA-NFV and Paderborn University
3 # ALL RIGHTS RESERVED.
4
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #    http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17 # Neither the name of the SONATA-NFV, Paderborn University
18 # nor the names of its contributors may be used to endorse or promote
19 # products derived from this software without specific prior written
20 # permission.
21 #
22 # This work has been performed in the framework of the SONATA project,
23 # funded by the European Commission under Grant number 671517 through
24 # the Horizon 2020 and 5G-PPP programmes. The authors would like to
25 # acknowledge the contributions of their colleagues of the SONATA
26 # partner consortium (www.sonata-nfv.eu).
27 -->
28
29 # vim-emu: A NFV multi-PoP emulation platform
30
31 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).
32
33 The emulation platform `vim-emu` is developed as part of OSM's DevOps MDG.
34
35 ### Acknowledgments
36
37 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.
38
39 ### Cite this work
40
41 If you use the emulation platform for your research and/or other publications, please cite the following paper to reference our work:
42
43 * 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)
44
45 Bibtex:
46
47 ```bibtex
48 @inproceedings{peuster2016medicine, 
49     author={M. Peuster and H. Karl and S. van Rossem}, 
50     booktitle={2016 IEEE Conference on Network Function Virtualization and Software Defined Networks (NFV-SDN)}, 
51     title={MeDICINE: Rapid prototyping of production-ready network services in multi-PoP environments}, 
52     year={2016}, 
53     volume={}, 
54     number={}, 
55     pages={148-153}, 
56     doi={10.1109/NFV-SDN.2016.7919490},
57     month={Nov}
58 }
59 ```
60
61 ## Installation
62
63 There are multiple ways to install and use the emulation platform. The easiest way is the automated installation using the OSM installer. The bare-metal installation requires a freshly installed Ubuntu 16.04 LTS and is done by an ansible playbook. Another option is to use a nested Docker environment to run the emulator inside a Docker container.
64
65 ### Automated installation (recommended)
66
67 ```sh
68 ./install_osm.sh --lxdimages --vimemu
69 ```
70
71 This command will install OSM (as LXC containers) as well as the emulator (as a Docker container) on a local machine. It is recommended to use a machine with Ubuntu 16.04.
72
73 ### Manual installation
74
75 #### Option 1: Bare-metal installation
76
77 ```sh
78 sudo apt-get install ansible git aptitude
79 ```
80
81 ##### Step 1. Containernet installation
82
83 ```sh
84 cd
85 git clone https://github.com/containernet/containernet.git
86 cd ~/containernet/ansible
87 sudo ansible-playbook -i "localhost," -c local install.yml
88 ```
89
90 ##### Step 2. vim-emu installation
91
92 ```sh
93 cd
94 git clone https://osm.etsi.org/gerrit/osm/vim-emu.git
95 cd ~/vim-emu/ansible
96 sudo ansible-playbook -i "localhost," -c local install.yml
97 ```
98
99 #### Option 2: Nested Docker Deployment
100 This option requires a Docker installation on the host machine on which the emulator should be deployed.
101
102 ```sh
103 git clone https://osm.etsi.org/gerrit/osm/vim-emu.git</code>
104 cd ~/vim-emu</code>
105 # build the container:
106 docker build -t vim-emu-img .
107 # run the (interactive) container:
108 docker run --name vim-emu -it --rm --privileged --pid='host' -v /var/run/docker.sock:/var/run/docker.sock vim-emu-img /bin/bash
109 ```
110
111
112 ## Usage
113
114 ### Example
115
116 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.
117
118 * First terminal (start the emulation platform):
119     * `sudo python examples/default_single_dc_topology.py`
120 * Second terminal (use `docker exec vim-emu <command>` for nested Docker deployment):
121     * `vim-emu compute start -d dc1 -n vnf1`
122     * `vim-emu compute start -d dc1 -n vnf2`
123     * `vim-emu compute list`
124 * First terminal:
125     * `containernet> vnf1 ifconfig`
126     * `containernet> vnf1 ping -c 2 vnf2`
127
128 A more advanced example that includes OSM can be found in the [official vim-emu documentation in the OSM wiki](https://osm.etsi.org/wikipub/index.php/VIM_emulator).
129
130 ### Further documentation and useful links
131
132 * [Official vim-emu documentation in the OSM wiki](https://osm.etsi.org/wikipub/index.php/VIM_emulator)
133 * [Full CLI command documentation](https://github.com/sonata-nfv/son-emu/wiki/CLI-Command-Overview)
134 * [Requirements for Docker containers executed by the emulator](https://github.com/sonata-nfv/son-emu/wiki/Container-Requirements)
135 * [REST API](https://github.com/sonata-nfv/son-emu/wiki/APIs)
136 * [Mininet](http://mininet.org)
137 * [Containernet](https://containernet.github.io)
138 * [Maxinet](https://maxinet.github.io)
139
140 ## Development
141
142 ### How to contribute?
143
144 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.
145
146 ### Testing
147
148 To run the unit tests do:
149
150 * `cd ~/vim-emu`
151 * `sudo pytest -v`
152 * (To force Python2: `sudo python2 -m  pytest -v`)
153
154 ## Seed code contributors:
155
156 ### Lead:
157
158 * Manuel Peuster (https://github.com/mpeuster)
159 * Steven Van Rossem (https://github.com/stevenvanrossem)
160
161 ### Contributors
162
163 * Hadi Razzaghi Kouchaksaraei (https://github.com/hadik3r)
164 * Wouter Tavernier (https://github.com/wtaverni)
165 * Geoffroy Chollon (https://github.com/cgeoffroy)
166 * Eduard Maas (https://github.com/edmaas)
167 * Malte Splietker (https://github.com/splietker)
168 * Johannes Kampmeyer (https://github.com/xschlef)
169 * Stefan Schneider (https://github.com/StefanUPB)
170
171 ## License
172
173 The emulation platform is published under Apache 2.0 license. Please see the LICENSE file for more details.
174
175 ## Contact
176
177 Manuel Peuster (Paderborn University) <manuel@peuster.de>
178