This repository was archived by the owner on Feb 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add mesos in the CI #894
Merged
Merged
Add mesos in the CI #894
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -2,11 +2,40 @@ | |
|
|
||
| load ../helpers | ||
|
|
||
| MESOS_CLUSTER_ENTRYPOINT=${MESOS_CLUSTER_ENTRYPOINT:-0.0.0.0:5050} | ||
| MESOS_IMAGE=jimenez/mesos-dev:clang | ||
| MESOS_MASTER_PORT=$(( ( RANDOM % 1000 ) + 10000 )) | ||
| BASE_PORT=2375 | ||
|
|
||
| # Start mesos master and slave. | ||
| function start_mesos() { | ||
| MESOS_MASTER=$( | ||
| docker_host run -d --name mesos-master --net=host \ | ||
| $MESOS_IMAGE /mesos/build/bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/ --registry=in_memory --port=$MESOS_MASTER_PORT | ||
| ) | ||
|
|
||
| retry 10 1 eval "docker_host ps | grep 'mesos-master'" | ||
|
|
||
| MESOS_SLAVE=$( | ||
| docker_host run --privileged -d --name mesos-slave --volumes-from node-0 -e DOCKER_HOST="${HOSTS[0]}" -v /sys/fs/cgroup:/sys/fs/cgroup --net=host \ | ||
| $MESOS_IMAGE /mesos/build/bin/mesos-slave.sh --master=127.0.0.1:$MESOS_MASTER_PORT --containerizers=docker --hostname=127.0.0.1 --port=$(($MESOS_MASTER_PORT + 1)) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just added some new flags that you should definitely use for running mesos-slave in a docker contianer.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's add those new flags when we need them, it will require some changes in the tests: if a test does I'm expecting to see only one image ( |
||
| ) | ||
|
|
||
| retry 10 1 eval "docker_host ps | grep 'mesos-slave'" | ||
| } | ||
|
|
||
| # Start the swarm manager in background. | ||
| function swarm_manage_mesos() { | ||
| "$SWARM_BINARY" -l debug manage -H "$SWARM_HOST" --cluster-driver mesos $MESOS_CLUSTER_ENTRYPOINT & | ||
| "$SWARM_BINARY" -l debug manage -H "$SWARM_HOST" --cluster-driver mesos-experimental --cluster-opt mesos.user=daemon 127.0.0.1:$MESOS_MASTER_PORT & | ||
| SWARM_PID=$! | ||
| wait_until_reachable "$SWARM_HOST" | ||
| retry 10 1 eval "docker_swarm info | grep 'Offers: 1'" | ||
| } | ||
|
|
||
| # Stop mesos master and slave. | ||
| function stop_mesos() { | ||
| echo "Stopping $DOCKER_CONTAINER" | ||
| docker_host rm -f -v $DOCKER_CONTAINER > /dev/null; | ||
| echo "Stopping $MESOS_MASTER" | ||
| docker_host rm -f -v $MESOS_MASTER > /dev/null; | ||
| echo "Stopping $MESOS_SLAVE" | ||
| docker_host rm -f -v $MESOS_SLAVE > /dev/null; | ||
| } | ||
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we do a
--volume-fromin the mesos tests.