Hi All,

Melvin made a much better version of this which he's uploaded here:
https://github.com/NetSys/ovs-containers

In particular, it creates a container per daemon, and greatly simplifies
boot using a docker script.  Any interest in upstreaming this?  I'd be
happy to submit a patch.

Ethan

On Wed, Nov 11, 2015 at 12:49 PM, Ethan J. Jackson <[email protected]>
wrote:

> Agreed on all points.  This was somewhat of an MVP to get us going, but it
> definitely could be improved.
>
> Another thing we should probably do is pre-create an empty ovsdb rather
> than doing it with ovsdb-tool on boot.
>
> Anyways, this works well enough from us, so we may improve it but it's
> unlikely in the short term.
>
> Ethan
>
> On Wed, Nov 11, 2015 at 12:45 PM, Gurucharan Shetty <[email protected]>
> wrote:
>
>> Thanks Ethan for the initiative.
>>
>> A few comments:
>>
>> 1. Is there any reason you guys chose to keep ovsdb-server and
>> ovs-vswitchd into separate containers?
>> I think having atleast the ovsdb-server and ovs-vswitchd together in
>> the same container may make things easy.
>>
>> 2. You can also run your containers with --pid=host. That gives some
>> advantages.
>>
>> 3. A startup script inside the container instead of loading so many
>> things in docker run command may also make it easier.
>>
>>
>> On Tue, Nov 10, 2015 at 2:36 PM, Ethan J. Jackson <[email protected]>
>> wrote:
>> > Hi everyone,
>> >
>> > We're doing a project here at Berkeley which requires OVS/Docker
>> > integration on CoreOS.  Melvin Walls (an undergrad working with me here)
>> > did the heavy lifting to get that setup, so I thought I'd forward it to
>> the
>> > list in case there's interest.
>> >
>> > The first (and most important) step, is to create a container of OVS.
>> > Melvin has done so here: https://hub.docker.com/r/melvinw/ubuntu-ovs/
>> It'd
>> > be really cool if  the community blessed one per release and put it on
>> > hub.docker.com.  They have a way to bless certain containers as
>> "official"
>> > which would be awesome.
>> >
>> > Anyways once that's up getting OVS running is pretty easy:  It's a bit
>> ugly
>> > but it works:
>> >
>> > mkdir -p /etc/ovs
>> >     mkdir -p /var/run/ovs
>> >     sudo modprobe openvswitch
>> >     docker pull melvinw/ubuntu-ovs
>> >     docker run -d \
>> >         --privileged --net=host --name=ovsdb \
>> >         -v /var/run/ovs:/usr/local/var/run/openvswitch:rw \
>> >         -v /etc/ovs:/usr/local/etc/openvswitch:rw \
>> >         melvinw/ubuntu-ovn /bin/bash -c " \
>> >         mkdir -p /usr/local/var/log/openvswitch \
>> >         /usr/local/var/lib/openvswitch \
>> >         /usr/local/var/lib/openvswitch/pki; \
>> >         ovsdb-tool create /usr/local/etc/openvswitch/conf.db \
>> >         /usr/local/share/openvswitch/vswitch.ovsschema; \
>> >         ovsdb-server \
>> >         --remote=punix:/usr/local/var/run/openvswitch/db.sock \
>> >         --remote=db:Open_vSwitch,Open_vSwitch,manager_options \
>> >         --log-file=/usr/local/var/log/openvswitch/ovsdb-server.log \
>> >         --pidfile"
>> >
>> >     docker run -d \
>> >         --privileged --net=host --name=ovs \
>> >         -v /var/run/ovs:/usr/local/var/run/openvswitch:rw \
>> >         -v /etc/ovs:/usr/local/etc/openvswitch:rw \
>> >         melvinw/ubuntu-ovn /bin/bash -c " \
>> >         mkdir -p /usr/local/var/log/openvswitch \
>> >         /usr/local/var/lib/openvswitch \
>> >         /usr/local/var/lib/openvswitch/pki; \
>> >         ovs-vsctl --no-wait init; \
>> >         ovs-vswitchd --pidfile \
>> >         --log-file=/usr/local/var/log/openvswitch/ovs-vswitchd.log"
>> >
>> > The usual commands (ovs-vsctl, etc...) can be run by prefixing them with
>> > `docker exec ovs`
>> >
>> > Anyways, I hope that's helpful/interesting.
>> >
>> > Ethan
>> > _______________________________________________
>> > dev mailing list
>> > [email protected]
>> > http://openvswitch.org/mailman/listinfo/dev
>>
>
>


-- 
Ethan J. Jackson
cs.berkeley.edu/~ejj/
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to