Skip to content
This repository has been archived by the owner on Dec 13, 2021. It is now read-only.

fix compilation failures #188

Merged
merged 6 commits into from
Aug 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: go
sudo: required

go:
- 1.7
- "1.10"

services:
- docker
Expand Down
33 changes: 30 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
## Dockerfile for Namazu
## Available at Docker Hub: osrg/namazu
FROM osrg/dind-ovs-ryu

FROM billyteves/ubuntu-dind:16.04 AS dind-ovs-ryu
MAINTAINER Akihiro Suda <suda.akihiro@lab.ntt.co.jp>

# Install OVS
RUN apt-get update && apt-get install -y openvswitch-switch

# Install Python packages
RUN bash -c 'apt-get install -y python-{colorama,dev,eventlet,lxml,msgpack,netaddr,networkx,oslo.config,paramiko,pip,routes,six,webob}'

# Install Ryu
RUN pip install ryu

# Install pipework
RUN apt-get install -y arping
RUN wget --no-check-certificate --quiet https://raw.githubusercontent.com/jpetazzo/pipework/master/pipework -O /usr/local/bin/pipework
RUN chmod +x /usr/local/bin/pipework

# Install misc useful stuffs
RUN apt-get install -y less lv netcat telnet bash-completion vim byobu

# Install init
ADD ./misc/dind-ovs-ryu/init.dind-ovs-ryu.sh /init.dind-ovs-ryu.sh
RUN chmod +x /init.dind-ovs-ryu.sh
CMD ["wrapdocker", "/init.dind-ovs-ryu.sh"]

FROM dind-ovs-ryu
MAINTAINER Akihiro Suda <suda.akihiro@lab.ntt.co.jp>

RUN apt-get update && apt-get install -y --no-install-recommends \
git \
## Install Namazu deps
protobuf-compiler pkg-config libzmq3-dev libnetfilter-queue-dev \
## (Optional) Install Java inspector deps
Expand All @@ -20,12 +47,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libnetfilter-queue1 python-prctl

## Install Go
RUN curl https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz | tar Cxz /usr/local && mkdir /gopath
RUN curl https://storage.googleapis.com/golang/go1.10.linux-amd64.tar.gz | tar Cxz /usr/local && mkdir /gopath
ENV PATH /usr/local/go/bin:$PATH
ENV GOPATH /gopath

## (Optional) Install pynmz deps
RUN pip install hexdump
RUN pip install hexdump requests

## (Optional) Install hookswitch
RUN pip install hookswitch==0.0.2
Expand Down
4 changes: 2 additions & 2 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export PATH=$GOBIN:$PATH
INFO "Installing protoc to $GOBIN"
go get github.com/golang/protobuf/proto
go get github.com/golang/protobuf/protoc-gen-go
INFO "Generating PB files"
protoc --go_out=nmz/util/pb -Imisc/inspector misc/inspector/inspector_message.proto
INFO "Generating PB files (FIXME: skipped...)"
# protoc --go_out=nmz/util/pb -Imisc/inspector misc/inspector/inspector_message.proto

########## Go ##########
INFO "Building nmz"
Expand Down
4 changes: 3 additions & 1 deletion example/zk-found-2212.nfqhook/materials/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

## CONFIG
# NMZ_DISABLE=1 # set to disable namazu
ZK_GIT_COMMIT=${ZK_GIT_COMMIT:-98a3cabfa279833b81908d72f1c10ee9f598a045} #(Tue Jun 2 19:17:09 2015 +0000)
## ZooKeeper maintainers seems switched git repo and the previous 98a3c is now available as 02d15 on the master
# ZK_GIT_COMMIT=${ZK_GIT_COMMIT:-98a3cabfa279833b81908d72f1c10ee9f598a045} #(Tue Jun 2 19:17:09 2015 +0000)
ZK_GIT_COMMIT=${ZK_GIT_COMMIT:-02d1505e4df8c8669b89b74be37aa3a1025422ab} #(Tue Jun 2 19:17:09 2015 +0000)
ZK_START_WAIT_SECS=${ZK_START_WAIT_SECS:-10}
PAUSE_ON_FAILURE=${PAUSE_ON_FAILURE:-0}
NFQ_USER=${NFQ_USER:-nfqhooked}
Expand Down
2 changes: 1 addition & 1 deletion example/zk-found-2212.ryu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ NOTE: If git master version is corrupted, you can use [osrg/earthquake-zookeeper

### Run Experiments

$ sudo ../../bin/nmz run /tmp/zk-2212
$ sudo PYTHONPATH=$(pwd)/../../misc ../../bin/nmz run /tmp/zk-2212
[INFO] Checking PYTHONPATH(=/home/suda/WORK/namazu/example/zk-found-2212.ryu/../../misc)
[INFO] Starting Namazu Ethernet Switch
[INFO] Switch PID: 28893
Expand Down
4 changes: 3 additions & 1 deletion example/zk-found-2212.ryu/materials/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

## CONFIG
# NMZ_DISABLE=1 # set to disable namazu
ZK_GIT_COMMIT=${ZK_GIT_COMMIT:-98a3cabfa279833b81908d72f1c10ee9f598a045} #(Tue Jun 2 19:17:09 2015 +0000)
## ZooKeeper maintainers seems switched git repo and the previous 98a3c is now available as 02d15 on the master
# ZK_GIT_COMMIT=${ZK_GIT_COMMIT:-98a3cabfa279833b81908d72f1c10ee9f598a045} #(Tue Jun 2 19:17:09 2015 +0000)
ZK_GIT_COMMIT=${ZK_GIT_COMMIT:-02d1505e4df8c8669b89b74be37aa3a1025422ab} #(Tue Jun 2 19:17:09 2015 +0000)
DOCKER_IMAGE_NAME=${DOCKER_IMAGE_NAME:-zk_testbed}

ZK_START_WAIT_SECS=${ZK_START_WAIT_SECS:-10}
Expand Down
20 changes: 20 additions & 0 deletions misc/dind-ovs-ryu/init.dind-ovs-ryu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
OVSBR0_IP=${OVSBR0_IP:-192.168.42.254}
OVSBR0_NETMASK=${OVSBR0_NETMASK:-24}
OVSBR0_PROTO=${OVSBR0_PROTO:-OpenFlow13}

/etc/init.d/openvswitch-switch start

(ovs-vsctl list-br | grep ovsbr0 ) || \
(
ovs-vsctl add-br ovsbr0
ovs-vsctl set bridge ovsbr0 protocols=${OVSBR0_PROTO}
ovs-vsctl set-controller ovsbr0 tcp:127.0.0.1
)

ip link set ovsbr0 up
ip addr add ${OVSBR0_IP}/${OVSBR0_NETMASK} dev ovsbr0
echo "Assigned ${OVSBR0_IP} to ovsbr0"

[[ $1 ]] && exec "$@"
exec bash --login
12 changes: 10 additions & 2 deletions vendor/github.com/AkihiroSuda/go-netfilter-queue/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

98 changes: 76 additions & 22 deletions vendor/github.com/AkihiroSuda/go-netfilter-queue/netfilter.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 20 additions & 8 deletions vendor/github.com/AkihiroSuda/go-netfilter-queue/netfilter.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading