Dies ist eine alte Version des Dokuments!
Ryu SDN-Controller auf MacOS X
An diesem Artikel wird gearbeitet.
Notizen: mkdir ryu
Ich empfehle „virtualenv“ zu verwenden. Dann noch „pip“ und „easy_install“ beschreiben. Beschreiben welches XCODE ich installiert habe (Command-Line Tools)
virtualenv ryu/
Macbook:Python Benny$ source ryu/bin/activate
1. Versuch der Installation (ryu)Macbook:ryu Benny$ pip install ryu Downloading/unpacking ryu
Downloading ryu-3.11.tar.gz (1.3MB): 1.3MB downloaded Running setup.py (path:/Users/Benny/Python/ryu/build/ryu/setup.py) egg_info for package ryu 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“
Lösung (funktioniert zumindest bei mir): (ryu)Macbook:ryu Benny$ STATIC_DEPS=true pip install lxml Downloading/unpacking lxml
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 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
….
pip install ryu ← funktioniert dann
…
Um an die Beispiele zu kommen:
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.
####
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:
(ryu)DEBERN0L004402: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.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 EventOFPSwitchFeatures CONSUMES EventOFPPacketIn BRICK ofp_event PROVIDES EventOFPSwitchFeatures TO {'SimpleSwitch13': set(['config'])} PROVIDES EventOFPPacketIn TO {'SimpleSwitch13': set(['main'])} CONSUMES EventOFPSwitchFeatures CONSUMES EventOFPEchoRequest CONSUMES EventOFPHello CONSUMES EventOFPErrorMsg CONSUMES EventOFPPortDescStatsReply connected socket:<eventlet.greenio.GreenSocket object at 0x103763250> address:('192.168.10.2', 36544) hello ev <ryu.controller.ofp_event.EventOFPHello object at 0x103763610> move onto config mode EVENT ofp_event->SimpleSwitch13 EventOFPSwitchFeatures switch features ev version: 0x4 msg_type 0x6 xid 0x84975d27 OFPSwitchFeatures(auxiliary_id=0,capabilities=79,datapath_id=537554651826897,n_buffers=256,n_tables=3) move onto main mode
OmniSwitch Konfiguration:
-> show configuration snapshot openflow ! OPENFLOW: openflow logical-switch vswitch vlan 2 openflow logical-switch vswitch controller 192.168.10.100:6633 openflow logical-switch vswitch interfaces port 1/1-20