Skip to content

Commit

Permalink
Update Fig with Docker Compose
Browse files Browse the repository at this point in the history
This allows us to use --cap-add NET_ADMIN for the OVS container

Signed-off-by: Dave Tucker <dave@socketplane.io>
  • Loading branch information
Dave Tucker committed Feb 6, 2015
1 parent d7a3167 commit d1017c0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion HACKING.md
Expand Up @@ -7,7 +7,7 @@ How to contribute to SocketPlane

- [Golang](http://golang.org/doc/code.html)
- [Docker](https://docs.docker.com/installation/#installation)
- [Fig](http://www.fig.sh/install.html)
- [Docker Compose](http://www.fig.sh/install.html)

The system running Docker must have the `openvswitch` kernel module must be loaded for the test suite to be run. You can load it using `modprobe openvswitch`

Expand Down
12 changes: 6 additions & 6 deletions Makefile
Expand Up @@ -8,14 +8,14 @@ coverage:
goveralls -coverprofile=socketplane.coverprofile -service=$(CI_SERVICE) -repotoken=$(COVERALLS_TOKEN)

test:
fig up -d
docker run --cap-add=NET_ADMIN --net=container:socketplane_ovs_1 --rm -v $(shell pwd):/go/src/github.com/socketplane/socketplane -w /go/src/github.com/socketplane/socketplane davetucker/golang-ci:1.3 make test-local
fig stop
docker-compose up -d
docker run --cap-add=NET_ADMIN --cap-add SYS_ADMIN --net=container:socketplane_ovs_1 --rm -v $(shell pwd):/go/src/github.com/socketplane/socketplane -w /go/src/github.com/socketplane/socketplane davetucker/golang-ci:1.3 make test-local
docker-compose stop

test-all:
fig up -d
docker run --cap-add=NET_ADMIN --net=container:socketplane_ovs_1 --rm -v $(shell pwd):/go/src/github.com/socketplane/socketplane -w /go/src/github.com/socketplane/socketplane davetucker/golang-ci:1.3 make test-all-local
fig stop
docker-compose up -d
docker run --cap-add=NET_ADMIN --cap-add SYS_ADMIN --net=container:socketplane_ovs_1 --rm -v $(shell pwd):/go/src/github.com/socketplane/socketplane -w /go/src/github.com/socketplane/socketplane davetucker/golang-ci:1.3 make test-all-local
docker-compose stop

test-local:
go test -covermode=count -test.short -coverprofile=daemon.cover.out -coverpkg=./... ./daemon
Expand Down
6 changes: 2 additions & 4 deletions fig.yml → docker-compose.yml
@@ -1,7 +1,5 @@
ovs:
image: davetucker/docker-ovs:2.3.0
net: "host"
ports:
- "6640:6640"
command: "/usr/bin/supervisord -n"
privileged: true
cap_add:
- NET_ADMIN

0 comments on commit d1017c0

Please sign in to comment.