-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #353 from saagie/feature/mesos
add mesos provider inspired by mesos-dns & marathon provider
- Loading branch information
Showing
13 changed files
with
1,019 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
defaultEntryPoints = ["http"] | ||
|
||
[entryPoints] | ||
[entryPoints.http] | ||
address = ":8000" | ||
|
||
logLevel = "DEBUG" | ||
|
||
[mesos] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package main | ||
|
||
import ( | ||
"net/http" | ||
"os/exec" | ||
"time" | ||
|
||
"github.com/go-check/check" | ||
|
||
checker "github.com/vdemeester/shakers" | ||
) | ||
|
||
// Mesos test suites (using libcompose) | ||
type MesosSuite struct{ BaseSuite } | ||
|
||
func (s *MesosSuite) SetUpSuite(c *check.C) { | ||
s.createComposeProject(c, "mesos") | ||
} | ||
|
||
func (s *MesosSuite) TestSimpleConfiguration(c *check.C) { | ||
cmd := exec.Command(traefikBinary, "--configFile=fixtures/mesos/simple.toml") | ||
err := cmd.Start() | ||
c.Assert(err, checker.IsNil) | ||
defer cmd.Process.Kill() | ||
|
||
time.Sleep(500 * time.Millisecond) | ||
// TODO validate : run on 80 | ||
resp, err := http.Get("http://127.0.0.1:8000/") | ||
|
||
// Expected a 404 as we did not configure anything | ||
c.Assert(err, checker.IsNil) | ||
c.Assert(resp.StatusCode, checker.Equals, 404) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
zk: | ||
image: bobrik/zookeeper | ||
net: host | ||
environment: | ||
ZK_CONFIG: tickTime=2000,initLimit=10,syncLimit=5,maxClientCnxns=128,forceSync=no,clientPort=2181 | ||
ZK_ID: " 1" | ||
|
||
master: | ||
image: mesosphere/mesos-master:0.28.1-2.0.20.ubuntu1404 | ||
net: host | ||
environment: | ||
MESOS_ZK: zk://127.0.0.1:2181/mesos | ||
MESOS_HOSTNAME: 127.0.0.1 | ||
MESOS_IP: 127.0.0.1 | ||
MESOS_QUORUM: " 1" | ||
MESOS_CLUSTER: docker-compose | ||
MESOS_WORK_DIR: /var/lib/mesos | ||
|
||
slave: | ||
image: mesosphere/mesos-slave:0.28.1-2.0.20.ubuntu1404 | ||
net: host | ||
pid: host | ||
privileged: true | ||
environment: | ||
MESOS_MASTER: zk://127.0.0.1:2181/mesos | ||
MESOS_HOSTNAME: 127.0.0.1 | ||
MESOS_IP: 127.0.0.1 | ||
MESOS_CONTAINERIZERS: docker,mesos | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup | ||
- /usr/bin/docker:/usr/bin/docker:ro | ||
- /usr/lib/x86_64-linux-gnu/libapparmor.so.1:/usr/lib/x86_64-linux-gnu/libapparmor.so.1:ro | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- /lib/x86_64-linux-gnu/libsystemd-journal.so.0:/lib/x86_64-linux-gnu/libsystemd-journal.so.0 |
Oops, something went wrong.