Fix: Removing Python2 installation
[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
30 # vim-emu: A NFV multi-PoP emulation platform
31
32 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).
33
34 The emulation platform `vim-emu` is developed as part of OSM's DevOps MDG.
35
36 ---
37 ## Acknowledgments
38
39 This software was originally developed by the [SONATA project](http://www.sonata-nfv.eu) and the [5GTANGO project](https://5gtango.eu/), funded by the European Commission under grant number 671517 and 761493 through the Horizon 2020 and 5G-PPP programs.
40
41 ## Cite this work
42
43 If you use the emulation platform for your research and/or other publications, please cite the following paper to reference our work:
44
45 * 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)
46
47 Bibtex:
48
49 ```bibtex
50 @inproceedings{peuster2016medicine, 
51     author={M. Peuster and H. Karl and S. van Rossem}, 
52     booktitle={2016 IEEE Conference on Network Function Virtualization and Software Defined Networks (NFV-SDN)}, 
53     title={MeDICINE: Rapid prototyping of production-ready network services in multi-PoP environments}, 
54     year={2016}, 
55     volume={}, 
56     number={}, 
57     pages={148-153}, 
58     doi={10.1109/NFV-SDN.2016.7919490},
59     month={Nov}
60 }
61 ```
62
63 ---
64 ## Installation
65
66 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 18.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.
67
68 ### Automated OSM installation
69
70 This installation option applies if you want to use vim-emu in combination with OSM.
71
72 ```sh
73 ./install_osm.sh --vimemu
74 ```
75
76 This command will install OSM as well as the emulator (as a Docker container) on a local machine. It is recommended to use a machine with Ubuntu 18.04 LTS. More details about this installation option can be found in the [OSM wiki](https://osm.etsi.org/wikipub/index.php/VIM_emulator).
77
78 ### Standalone installation
79
80 #### Option 1: Bare-metal installation
81
82 ```sh
83 sudo apt-get install ansible git aptitude
84 ```
85
86 ##### Step 1. Containernet installation
87
88 ```sh
89 cd
90 git clone https://github.com/containernet/containernet.git
91 cd ~/containernet/ansible
92 sudo ansible-playbook -i "localhost," -c local install.yml
93 cd ..
94 sudo make develop
95 ```
96
97 ##### Step 2. vim-emu installation
98
99 ```sh
100 cd
101 git clone https://osm.etsi.org/gerrit/osm/vim-emu.git
102 cd ~/vim-emu/ansible
103 sudo ansible-playbook -i "localhost," -c local install.yml
104 cd ..
105 sudo python3 setup.py develop
106 ```
107
108 #### Option 2: Nested Docker Deployment
109 This option requires a Docker installation on the host machine on which the emulator should be deployed.
110
111 Build:
112 ```sh
113 git clone https://osm.etsi.org/gerrit/osm/vim-emu.git
114 cd ~/vim-emu
115 # build the container:
116 docker build -t vim-emu-img .
117 ```
118
119 Run:
120 ```sh
121 # run the (interactive) container:
122 docker run --name vim-emu -it --rm --privileged --pid='host' -v /var/run/docker.sock:/var/run/docker.sock vim-emu-img /bin/bash
123 ```
124
125 ---
126 ## Usage
127
128 ### Example
129
130 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.
131
132 First terminal:
133 ```sh
134 # start the emulation platform with a single NFV data center
135 sudo python3 examples/default_single_dc_topology.py
136 ```
137
138 Second terminal (use `docker exec vim-emu <command>` for nested Docker deployment):
139 ```sh
140 # start two simple VNFs
141 vim-emu compute start -d dc1 -n vnf1
142 vim-emu compute start -d dc1 -n vnf2
143 vim-emu compute list
144 ```
145
146 First terminal:
147 ```sh
148 # check the connectivity between the two VNFs
149 # press <ENTER> <ENTER>
150 containernet> vnf1 ifconfig
151 containernet> vnf1 ping -c2 vnf2
152 ```
153
154
155 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).
156
157 ---
158 ## Documentation
159
160 * [Official vim-emu repository mirror on GitHub](https://github.com/containernet/vim-emu)
161 * [Official vim-emu documentation in the OSM wiki](https://osm.etsi.org/wikipub/index.php/VIM_emulator)
162 * [Full vim-emu documentation on GitHub](https://github.com/containernet/vim-emu)
163 * [Mininet](http://mininet.org)
164 * [Containernet](https://containernet.github.io)
165 * [Maxinet](https://maxinet.github.io)
166
167 ---
168 ## Development
169
170 ### How to contribute?
171
172 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.
173
174 ### Testing
175
176 ```sh
177 sudo pytest -v
178 ```
179
180 ---
181 ## Contributors
182
183 * [Manuel Peuster (lead developer)](https://github.com/mpeuster)
184 * [Hadi Razzaghi Kouchaksaraei](https://github.com/hadik3r)
185 * [Wouter Tavernier](https://github.com/wtaverni)
186 * [Geoffroy Chollon](https://github.com/cgeoffroy)
187 * [Eduard Maas](https://github.com/edmaas)
188 * [Malte Splietker](https://github.com/splietker)
189 * [Johannes Kampmeyer](https://github.com/xschlef)
190 * [Stefan Schneider](https://github.com/StefanUPB)
191 * [Erik Schilling](https://github.com/Ablu)
192 * [Rafael Schellenberg](https://github.com/RafaelSche)
193
194 ## License
195
196 The emulation platform is published under Apache 2.0 license. Please see the LICENSE file for more details.
197
198 ## Contact
199
200 Manuel Peuster
201 * Mail: <manuel (at) peuster (dot) de>
202 * Twitter: [@ManuelPeuster](https://twitter.com/ManuelPeuster)
203 * GitHub: [@mpeuster](https://github.com/mpeuster)
204 * Website: [https://peuster.de](https://peuster.de)
205
206