Skip to content

Commit 675adf2

Browse files
author
sangyun-han
committed
Add OVS 2.5.2
- Revise Makefile, README, latest - Add 2.5.2
1 parent fede885 commit 675adf2

File tree

7 files changed

+120
-5
lines changed

7 files changed

+120
-5
lines changed

2.5.2/Dockerfile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
FROM socketplane/busybox:latest
2+
MAINTAINER The SocketPlane Team <[email protected]>
3+
ENV OVS_VERSION 2.5.2
4+
ENV SUPERVISOR_STDOUT_VERSION 0.1.1
5+
# Configure supervisord
6+
RUN mkdir -p /var/log/supervisor/
7+
ADD supervisord.conf /etc/
8+
# Install supervisor_stdout
9+
WORKDIR /opt
10+
RUN mkdir -p /var/log/supervisor/
11+
RUN mkdir -p /etc/openvswitch
12+
RUN wget https://pypi.python.org/packages/source/s/supervisor-stdout/supervisor-stdout-$SUPERVISOR_STDOUT_VERSION.tar.gz --no-check-certificate && \
13+
tar -xzvf supervisor-stdout-0.1.1.tar.gz && \
14+
mv supervisor-stdout-$SUPERVISOR_STDOUT_VERSION supervisor-stdout && \
15+
rm supervisor-stdout-0.1.1.tar.gz && \
16+
cd supervisor-stdout && \
17+
python setup.py install -q
18+
# Get Open vSwitch
19+
WORKDIR /
20+
RUN wget https://s3-us-west-2.amazonaws.com/docker-ovs/openvswitch-$OVS_VERSION.tar.gz --no-check-certificate && \
21+
tar -xzvf openvswitch-$OVS_VERSION.tar.gz &&\
22+
mv openvswitch-$OVS_VERSION openvswitch &&\
23+
cp -r openvswitch/* / &&\
24+
rm -r openvswitch &&\
25+
rm openvswitch-$OVS_VERSION.tar.gz
26+
ADD configure-ovs.sh /usr/local/share/openvswitch/
27+
# Create the database
28+
RUN ovsdb-tool create /etc/openvswitch/conf.db /usr/local/share/openvswitch/vswitch.ovsschema
29+
# Put the OVS Python modules on the Python Path
30+
RUN cp -r /usr/local/share/openvswitch/python/ovs /usr/lib/python2.7/site-packages/ovs
31+
CMD ["/usr/bin/supervisord"]

2.5.2/configure-ovs.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/sh
2+
ovs_version=$(ovs-vsctl -V | grep ovs-vsctl | awk '{print $4}')
3+
ovs_db_version=$(ovsdb-tool schema-version /usr/local/share/openvswitch/vswitch.ovsschema)
4+
5+
# give ovsdb-server and vswitchd some space...
6+
sleep 3
7+
# begin configuring
8+
ovs-vsctl --no-wait -- init
9+
ovs-vsctl --no-wait -- set Open_vSwitch . db-version="${ovs_db_version}"
10+
ovs-vsctl --no-wait -- set Open_vSwitch . ovs-version="${ovs_version}"
11+
ovs-vsctl --no-wait -- set Open_vSwitch . system-type="docker-ovs"
12+
ovs-vsctl --no-wait -- set Open_vSwitch . system-version="0.1"
13+
ovs-vsctl --no-wait -- set Open_vSwitch . external-ids:system-id=`cat /proc/sys/kernel/random/uuid`
14+
ovs-vsctl --no-wait -- set-manager ptcp:6640
15+
ovs-appctl -t ovsdb-server ovsdb-server/add-remote db:Open_vSwitch,Open_vSwitch,manager_options
16+

2.5.2/supervisord.conf

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
[unix_http_server]
2+
file = /var/run/supervisor.sock
3+
4+
[inet_http_server]
5+
port = 9001
6+
7+
[supervisord]
8+
nodaemon=true
9+
logfile = /var/log/supervisor/supervisord.log
10+
logfile_maxbytes = 200KB
11+
logfile_backups = 1
12+
pidfile = /var/run/supervisord.pid
13+
childlogdir = /var/log/supervisor
14+
15+
[rpcinterface:supervisor]
16+
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
17+
18+
[supervisorctl]
19+
serverurl = unix:///var/run/supervisor.sock
20+
21+
[program:ovsdb-server]
22+
command=/usr/local/sbin/ovsdb-server /etc/openvswitch/conf.db --remote=punix:/usr/local/var/run/openvswitch/db.sock --remote=ptcp:6640 --pidfile=ovsdb-server.pid
23+
priority=10
24+
startsec=10
25+
stderr_events_enabled=true
26+
stdout_events_enabled=true
27+
28+
[program:ovs-vswitchd]
29+
command=/usr/local/sbin/ovs-vswitchd -v --pidfile
30+
priority=20
31+
startsec=10
32+
stderr_events_enabled=true
33+
stdout_events_enabled=true
34+
35+
[program:ovsdb-server-vtep]
36+
command=/usr/local/sbin/ovsdb-server /etc/openvswitch/conf.db /etc/openvswitch/vtep.db --remote=punix:/var/run/openvswitch/db.sock --pidfile=ovsdb-server.pid
37+
autostart=false
38+
priority=10
39+
startsec=10
40+
stderr_events_enabled=true
41+
stdout_events_enabled=true
42+
43+
[program:ovs-vtep]
44+
command=/usr/local/share/openvswitch/scripts/ovs-vtep --pidfile=/var/run/openvswitch/ovs-vtep.pid br-vtep
45+
autostart=false
46+
priority=30
47+
startsec=10
48+
stderr_events_enabled=true
49+
stdout_events_enabled=true
50+
51+
[program:configure-ovs]
52+
command=/usr/local/share/openvswitch/configure-ovs.sh
53+
priority=30
54+
startsecs=0
55+
exitcodes=0
56+
autorestart=false
57+
stderr_events_enabled=true
58+
stdout_events_enabled=true
59+
60+
[eventlistener:stdout]
61+
command = supervisor_stdout
62+
buffer_size = 100
63+
events = PROCESS_LOG
64+
result_handler = supervisor_stdout:event_handler

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RUN wget https://s3-us-west-2.amazonaws.com/docker-ovs/openvswitch-$OVS_VERSION.
2222
mv openvswitch-$OVS_VERSION openvswitch &&\
2323
cp -r openvswitch/* / &&\
2424
rm -r openvswitch &&\
25-
rm openvswitch-$OVS_VERSION.tar.gz
25+
rm openvswitch-$OVS_VERSION.tar.gz
2626
ADD configure-ovs.sh /usr/local/share/openvswitch/
2727
# Create the database
2828
RUN ovsdb-tool create /etc/openvswitch/conf.db /usr/local/share/openvswitch/vswitch.ovsschema

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ OVS_VERSIONS = \
2929
"2.3" \
3030
"2.3.1" \
3131
"2.3.2" \
32-
"2.4.0"
32+
"2.4.0" \
33+
"2.5.2"
3334

3435
all: reconfigure build
3536

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ To run the container with the kernel module (assuming you have Linux Kernel 3.7+
2727

2828
modprobe openvswitch
2929
docker run -itd --cap-add NET_ADMIN socketplane/openvswitch
30-
30+
3131
While it's recommended to load the kernel module outside of the container, it is possible to load the kernel module from within:
3232

3333
cid=$(docker run -itd --cap-add NET_ADMIN --cap-add SYS_MODULE -v /lib/modules:/lib/modules socketplane/openvswitch)
@@ -37,7 +37,7 @@ While it's recommended to load the kernel module outside of the container, it is
3737
> Note 1: You need the "tun" kernel module loaded to run in userspace mode
3838
> Note 2: Change the tag for a specific OVS version e.g socketplane/openvswitch:2.3.0
3939
40-
## Controlling The Processes
40+
## Controlling The Processes
4141

4242
The processes can be controlled using `supervisorctl`
4343

@@ -80,6 +80,9 @@ The follwing releases are supported:
8080
- 2.1.3
8181
- 2.3
8282
- 2.3.1
83+
- 2.3.2
84+
- 2.4.0
85+
- 2.5.2
8386

8487
### Creating bridges in Userspace Mode
8588

latest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.0
1+
2.5.2

0 commit comments

Comments
 (0)