Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
adding scripts for screencast demo
Browse files Browse the repository at this point in the history
  • Loading branch information
kensipe committed Nov 7, 2014
1 parent 2f41734 commit b484520
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .mesos.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"default": {
"log_level": "warning",
"log_file": null,
"master": "10.67.63.236:5050"
},
"profile": "default"
}
7 changes: 7 additions & 0 deletions launch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

if [ "$#" -ne 1 ]; then
echo "script takes json file as an argument"
exit 1;
fi
curl -X POST -H "Content-Type: application/json" 10.67.63.236:8080/v2/apps -d@"$@"
18 changes: 18 additions & 0 deletions nginx-bridge.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"container": {
"type": "DOCKER",
"docker": {
"image": "nginx",
"network": "BRIDGE",
"portMappings": [
{ "containerPort": 80, "hostPort": 0, "servicePort": 80, "protocol": "tcp" }
]
}
},
"id": "nginx",
"instances": "1",
"cpus": "0.25",
"mem": "256",
"uris": []
}

16 changes: 16 additions & 0 deletions redis-constraint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "redis-constraint",
"container": {
"type": "DOCKER",
"docker": {
"image": "redis",
"network": "BRIDGE"
}
},
"id": "redis",
"instances": "1",
"cpus": "0.25",
"mem": "256",
"uris": [],
"constraints": [["rack", "CLUSTER", "rack-2"]]
}
14 changes: 14 additions & 0 deletions redis-unique.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"container": {
"type": "DOCKER",
"docker": {
"image": "redis"
}
},
"id": "redis",
"instances": "1",
"cpus": "0.25",
"mem": "256",
"uris": [],
"constraints": [["hostname", "UNIQUE"]]
}
13 changes: 13 additions & 0 deletions redis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"container": {
"type": "DOCKER",
"docker": {
"image": "redis"
}
},
"id": "redis",
"instances": "1",
"cpus": "0.25",
"mem": "256",
"uris": []
}
14 changes: 14 additions & 0 deletions simple-docker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"container": {
"type": "DOCKER",
"docker": {
"image": "libmesos/ubuntu"
}
},
"id": "ubuntu",
"instances": "1",
"cpus": "0.25",
"mem": "256",
"uris": [],
"cmd": "while sleep 10; do date -u +%T; done"
}
8 changes: 8 additions & 0 deletions simple.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "simple",
"cmd": "while sleep 10; do date -u +%T; done",
"mem": 16,
"cpus": 0.1,
"instances": 1,
"uris": []
}
12 changes: 12 additions & 0 deletions tomcat-remote.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"id": "tomcat",
"cmd": "mv *.war apache-tomcat-*/webapps && cd apache-tomcat-* && sed \"s/8080/$PORT/g\" < ./conf/server.xml > ./conf/server-mesos.xml && ./bin/catalina.sh run -config ./conf/server-mesos.xml",
"mem": 512,
"cpus": 0.5,
"instances": 1,
"uris": [
"http://www.gtlib.gatech.edu/pub/apache/tomcat/tomcat-7/v7.0.56/bin/apache-tomcat-7.0.56.tar.gz",
"https://gwt-examples.googlecode.com/files/Calendar.war"
],
"constraints": [["hostname", "UNIQUE"]]
}

0 comments on commit b484520

Please sign in to comment.