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
{ | |
"id": "/infrastructure/redis-cluster-util", | |
"backoffFactor": 1.15, | |
"backoffSeconds": 1, | |
"constraints": [], | |
"container": { | |
"type": "DOCKER", | |
"volumes": [ | |
{ | |
"containerPath": "/backup", |
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
{ | |
"id": "/#NODENAME#", | |
"backoffFactor": 1.15, | |
"backoffSeconds": 1, | |
"constraints": [ | |
[ | |
"hostname", | |
"CLUSTER", | |
"#NODEHOSTIP#" | |
] |
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
{ | |
"id": "/redis4.0-new-failover-test", | |
"instances": 1, | |
"cpus": 1.001, | |
"mem": 2, | |
"disk": 0, | |
"gpus": 0, | |
"backoffSeconds": 1, | |
"backoffFactor": 1.15, | |
"maxLaunchDelaySeconds": 3600, |
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
core@ip-10-0-3-204 ~ $ /opt/mesosphere/bin/rexray volume list | |
- name: datavolume | |
volumeid: vol-00aacade602cf960c | |
availabilityzone: us-east-1a | |
status: in-use | |
volumetype: standard | |
iops: 0 | |
size: "16" | |
networkname: "" |
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
"volumes": [ | |
{ | |
"containerPath": "/data", | |
"mode": "RW", | |
"external": { | |
"name": "redis4volume", | |
"provider": "dvdi", | |
"options": { | |
"dvdi/driver": "rexray" | |
} |
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
from kazoo.client import KazooClient | |
zk = KazooClient(hosts='leader.mesos:2181', read_only=True) | |
zk.start() | |
clusterId = "" | |
# Here we can give znode path to retrieve its decoded data, | |
# for ex to get cluster-id, use | |
# data, stat = zk.get("/cluster-id") | |
# clusterId = data.decode("utf-8") |
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
#!/bin/bash | |
function tasksByNodeAPI | |
{ | |
echo "DC/OS Tasks By Node" | |
if [ "$#" -eq 0 ]; then | |
echo "Need node ip as input. Exiting." | |
exit 1 | |
fi | |
nodeIp=$1 |
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
#!/bin/bash | |
# Run any shell command on all master nodes | |
# Usage : dcosRunOnAllSlaves.sh <CMD= any shell command to run, Ex: ulimit -a > | |
CMD=$1 | |
for i in `dcos node | egrep -v "TYPE|agent" | awk '{print $2}'` | |
do | |
echo -e "\n###> Running command [ $CMD ] on $i" | |
dcos node ssh --option StrictHostKeyChecking=no --option LogLevel=quiet --master-proxy --private-ip=$i "$CMD" |
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
#!/bin/bash | |
# Run any shell command on all slave nodes (private and public) | |
# Usage : dcosRunOnAllSlaves.sh <CMD= any shell command to run, Ex: ulimit -a > | |
CMD=$1 | |
for i in `dcos node | egrep -v "TYPE|master" | awk '{print $1}'`; do | |
echo -e "\n###> Running command [ $CMD ] on $i" | |
dcos node ssh --option StrictHostKeyChecking=no --option LogLevel=quiet --master-proxy --private-ip=$i "$CMD" | |
echo -e "======================================\n" |
NewerOlder