Benutzer-Werkzeuge

Webseiten-Werkzeuge


ryu-sdn-controller-mac-os-x-omniswitch

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
ryu-sdn-controller-mac-os-x-omniswitch [2014/07/30 19:06] bennyryu-sdn-controller-mac-os-x-omniswitch [2024/06/09 10:29] (aktuell) – Externe Bearbeitung 127.0.0.1
Zeile 1: Zeile 1:
-====== Ryu SDN-Controller auf MacOS X ======+====== Ryu SDN-Controller auf MacOS X installieren ======
  
 <WRAP center round important 60%> <WRAP center round important 60%>
-An diesem Artikel wird gearbeitet.+An diesem Artikel wird gearbeitet. Work in Progress to extend this article!
 </WRAP> </WRAP>
  
-Notizen+===== Voraussetzungen ===== 
-mkdir ryu+  * Ich verwende Mac OS X v10.9 
 +  * Python v2.7 ist bereits an Bord 
 +  * ''pip'' (alles notwendige ist [[https://pip.pypa.io/en/latest/installing.html#install-or-upgrade-pip|hier]] beschrieben!) 
 +  * Ich empfehle dringend den Einsatz von ''virtualenv'' (''pip install virtualenv''
 +  * XCode v5.1.1 (Apple AppStore, wichtig sind die command-line Tools) 
 +  * XCode Command-Line Tools (''pip'' will einiges kompilieren) 
 +  * ''git'' (um sich die Beispiele vom Ryu-Projekt zu kopieren)
  
-Ich empfehle "virtualenv" zu verwenden. Dann noch "pip" und "easy_install" beschreiben. +===== Die Installation =====
-Beschreiben welches XCODE ich installiert habe (Command-Line Tools)+
  
-virtualenv ryu/+Ich empfehle die Installation in folgenden Schritten.
  
-Macbook:Python Benny$ source ryu/bin/activate +==== virtualenv erstellen & aktivieren ==== 
- +<code> 
-1Versuch der Installation +Macbook:Python Benny$ virtualenv ryu-3.11 
-(ryu)Macbook:ryu Benny$ pip install ryu +New python executable in ryu-3.11/bin/python 
-Downloading/unpacking ryu +Installing setuptools, pip...done
-  Downloading ryu-3.11.tar.gz (1.3MB): 1.3MB downloaded +Macbook:Python Benny$ source ryu-3.11/bin/activate 
-  Running setup.py (path:/Users/Benny/Python/ryu/build/ryu/setup.py) egg_info for package ryu +(ryu-3.11)Macbook:Python Benny 
-     +</code>
-    Installed /Users/Benny/Python/ryu/build/ryu/pbr-0.10.0-py2.7.egg +
-    [pbr] Processing SOURCES.txt +
-    warning: LocalManifestMaker: standard file '-c' not found+
  
-In file included from src/lxml/lxml.etree.c:346: +==== lxml zuerst installieren ==== 
- +<WRAP center round important 60%> 
-/Users/Benny/Python/ryu/build/lxml/src/lxml/includes/etree_defs.h:9:10: fatal error: 'libxml/xmlversion.hfile not found +Es ist wichtig das Kommando wie unten beschrieben einzugeben! ''lxml'' kompiliert sonst (zumindest bei mir) nicht! 
- +</WRAP> 
-#include "libxml/xmlversion.h" +<code> 
- +(ryu-3.11)Macbook:Python Benny$ STATIC_DEPS=true pip install lxml
-Lösung (funktioniert zumindest bei mir): +
-(ryu)Macbook:ryu Benny$ STATIC_DEPS=true pip install lxml+
 Downloading/unpacking lxml Downloading/unpacking lxml
   Downloading lxml-3.3.5.tar.gz (3.5MB): 3.5MB downloaded   Downloading lxml-3.3.5.tar.gz (3.5MB): 3.5MB downloaded
-  Running setup.py (path:/Users/Benny/Python/ryu/build/lxml/setup.py) egg_info for package lxml +  Running setup.py (path:/Users/Benny/Python/ryu-3.11/build/lxml/setup.py) egg_info for package lxml 
-    checking for a BSD-compatible install... /usr/bin/install -+  (... Jede Menge CLI-Kilometer ausgelassen ...) 
-    checking whether build environment is sane... yes +Successfully installed lxml 
-    checking for a thread-safe mkdir -p... build-aux/install-sh -c -d +Cleaning up... 
-....+</code>
  
-pip install ryu <funktioniert dann+==== Ryu installieren ==== 
 +<code> 
 +(ryu-3.11)Macbook:Python Benny$ pip install ryu 
 +Downloading/unpacking ryu 
 +  Downloading ryu-3.12.tar.gz (1.1MB): 1.1MB downloaded 
 +  Running setup.py (path:/Users/Benny/Python/ryu-3.11/build/ryu/setup.py) egg_info for package ryu 
 +  (... Jede Menge CLI-Kilometer ausgelassen ...) 
 +Successfully installed ryu eventlet msgpack-python netaddr oslo.config paramiko routes six webob greenlet argparse pycrypto ecdsa repoze.lru 
 +Cleaning up...     
 +</code> 
 +Hält man diese Reihenfolge __nicht__ ein, dann schlägt a) die Installation von ''lxml'' fehl b) vergisst der Ryu Installer dann ''greenlet''
 +<WRAP center round tip 60%> 
 +An dieser Stelle ist es sinnvoll sich die Beispiele von Ryu zu kopieren, siehe: [[ryu-sdn-controller-mac-os-x-omniswitch#bei_mir_fehlen_alle_beispiele_bzw_das_app_verzeichnis_fehlt|Bei mir fehlen die Beispiele!]] 
 +</WRAP>
  
-...+===== Ryu in Aktion! ===== 
 +<code> 
 +(ryu-3.11)Macbook:ryu-3.11 Benny$ bin/ryu-manager --verbose ../ryu-git/ryu/app/simple_switch_13.py 
 +loading app ../ryu-git/ryu/app/simple_switch_13.py 
 +loading app ryu.controller.ofp_handler 
 +instantiating app ryu.controller.ofp_handler of OFPHandler 
 +instantiating app ../ryu-git/ryu/app/simple_switch_13.py of SimpleSwitch13 
 +BRICK SimpleSwitch13 
 +  CONSUMES EventOFPPacketIn 
 +  CONSUMES EventOFPSwitchFeatures 
 +BRICK ofp_event 
 +  PROVIDES EventOFPPacketIn TO {'SimpleSwitch13': set(['main'])} 
 +  PROVIDES EventOFPSwitchFeatures TO {'SimpleSwitch13': set(['config'])} 
 +  CONSUMES EventOFPPortDescStatsReply 
 +  CONSUMES EventOFPEchoRequest 
 +  CONSUMES EventOFPSwitchFeatures 
 +  CONSUMES EventOFPErrorMsg 
 +  CONSUMES EventOFPHello 
 +</code>
  
-Um an die Beispiele zu kommen:+===== OmniSwitch in Ryu registrieren ===== 
 +<WRAP center round info 60%> 
 +Ich hab Urlaub! Danach werde ich diese Anleitung sicherlich noch erweitern .. :
 +</WRAP>
  
-Macbook:Python Benny$ git clone https://github.com/osrg/ryu.git ryu-git +==== OmniSwitch 6900 Konfiguration ==== 
-Cloning into 'ryu-git'... +<code> 
-remote: Counting objects: 14808, done. +-> show configuration snapshot openflow  
-remote: Compressing objects: 100% (134/134), done. +! OPENFLOW: 
-remoteTotal 14808 (delta 80), reused 0 (delta 0) +openflow logical-switch OFSwitch vlan 2 
-Receiving objects: 100% (14808/14808), 18.27 MiB | 676.00 KiB/s, done. +openflow logical-switch OFSwitch controller 192.168.10.100:6633 
-Resolving deltas: 100% (10855/10855), done. +openflow logical-switch OFSwitch interfaces port 1/1-20 
-Checking connectivity... done.+</code>
  
-#### +==== Ausgaben von Ryu ====
- +
-Problem beim Start: +
-(ryu)DEBERN0L004402:ryu Benny$ ryu-manager ../ryu-git/ryu/app/simple_switch_13.py  +
-Traceback (most recent call last): +
-  File "/Users/Benny/Python/ryu/bin/ryu-manager", line 5, in <module> +
-    from pkg_resources import load_entry_point +
-  File "/Users/Benny/Python/ryu/lib/python2.7/site-packages/pkg_resources.py", line 2697, in <module> +
-    working_set.require(__requires__) +
-  File "/Users/Benny/Python/ryu/lib/python2.7/site-packages/pkg_resources.py", line 669, in require +
-    needed self.resolve(parse_requirements(requirements)) +
-  File "/Users/Benny/Python/ryu/lib/python2.7/site-packages/pkg_resources.py", line 572, in resolve +
-    raise DistributionNotFound(req) +
-pkg_resources.DistributionNotFound: greenlet>=0.3 +
- +
-pip install greenlet +
- +
-ryu Bug! +
- +
- +
-### +
- +
-Ryu Ausgabe:+
 <code> <code>
-(ryu)DEBERN0L004402:ryu Benny$ ryu-manager --verbose ../ryu-git/ryu/app/simple_switch_13.py +(ryu)Macbook:ryu Benny$ ryu-manager --verbose ../ryu-git/ryu/app/simple_switch_13.py 
 loading app ../ryu-git/ryu/app/simple_switch_13.py loading app ../ryu-git/ryu/app/simple_switch_13.py
 loading app ryu.controller.ofp_handler loading app ryu.controller.ofp_handler
Zeile 104: Zeile 116:
 </code> </code>
  
-OmniSwitch Konfiguration:+===== Typische Fehlermeldungen bei der Installation ===== 
 +==== lxmlxmlversion.h file not found ==== 
 +An diesem Fehler ist mein erster Installationsversuch mit ''pip install ryu'' auch gescheitert. 
 +Nach einiger Suche habe ich in den Untiefen von "stackoverflow" den Tipp im Folgenden gefunden.
 <code> <code>
--> show configuration snapshot openflow  +(ryu)Macbook:ryu Benny$ pip install ryu 
-! OPENFLOW+Downloading/unpacking ryu 
-openflow logical-switch vswitch vlan 2 +  Downloading ryu-3.11.tar.gz (1.3MB): 1.3MB downloaded 
-openflow logical-switch vswitch controller 192.168.10.100:6633 +  Running setup.py (path:/Users/Benny/Python/ryu/build/ryu/setup.py) egg_info for package ryu 
-openflow logical-switch vswitch interfaces port 1/1-20+     
 +    Installed /Users/Benny/Python/ryu/build/ryu/pbr-0.10.0-py2.7.egg 
 +    [pbr] Processing SOURCES.txt 
 +    warning: LocalManifestMaker: standard file '-c' not found 
 + 
 +In file included from src/lxml/lxml.etree.c:346: 
 + 
 +/Users/Benny/Python/ryu/build/lxml/src/lxml/includes/etree_defs.h:9:10: fatal error: 'libxml/xmlversion.h' file not found 
 + 
 +#include "libxml/xmlversion.h"
 </code> </code>
  
 +**Lösung:**
 +<code>
 +(ryu)Macbook:ryu Benny$ STATIC_DEPS=true pip install lxml
 +</code>
 +  * Der Mac ist nun ein paar Sekunden mit kompilieren beschäftigt
 +  * Danach sollte ''pip install ryu'' problemlos durchlaufen
 +  * Zumindest bei mir schlug der erste Start aber dann wiederum auch fehl: ''greenlet'' fehlte
 +
 +==== pkg_resources.DistributionNotFound: greenlet>=0.3 ====
 +Nach der manuellen Korrektur mit ''lxml'', scheint das ''pip install ryu'' Kommando ''greenlet'' irgendwie vergessen zu haben.
 +<code>
 +(ryu-3.11)Macbook:ryu-3.11 Benny$ bin/ryu-manager ../ryu-git/ryu/app/simple_switch_13.py
 +Traceback (most recent call last):
 +  File "bin/ryu-manager", line 5, in <module>
 +    from pkg_resources import load_entry_point
 +  File "/Users/Benny/Python/ryu-3.11/lib/python2.7/site-packages/pkg_resources.py", line 2697, in <module>
 +    working_set.require(__requires__)
 +  File "/Users/Benny/Python/ryu-3.11/lib/python2.7/site-packages/pkg_resources.py", line 669, in require
 +    needed = self.resolve(parse_requirements(requirements))
 +  File "/Users/Benny/Python/ryu-3.11/lib/python2.7/site-packages/pkg_resources.py", line 572, in resolve
 +    raise DistributionNotFound(req)
 +pkg_resources.DistributionNotFound: greenlet>=0.3
 +</code>
 +
 +**Lösung:**
 +<code>
 +(ryu-3.11)Macbook:ryu-3.11 Benny$ pip install greenlet
 +</code>
 +
 +==== Bei mir fehlen alle Beispiele bzw. das /app Verzeichnis fehlt! ====
 +Die Beispiele werden von ''pip'' nicht mitinstalliert. Dies kann aber sehr leicht nachgeholt werden.
 +
 +**Lösung:**
 +<code>
 +Macbook:Python Benny$ git clone https://github.com/osrg/ryu.git ryu-git
 +Cloning into 'ryu-git'...
 +remote: Counting objects: 14808, done.
 +remote: Compressing objects: 100% (134/134), done.
 +remote: Total 14808 (delta 80), reused 0 (delta 0)
 +Receiving objects: 100% (14808/14808), 18.27 MiB | 676.00 KiB/s, done.
 +Resolving deltas: 100% (10855/10855), done.
 +Checking connectivity... done.
 +</code>
ryu-sdn-controller-mac-os-x-omniswitch.1406747215.txt.gz · Zuletzt geändert: 2024/06/09 10:29 (Externe Bearbeitung)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki