adobe/stasher

Name: stasher

Owner: Adobe Systems Incorporated

Description: Stasher is a tool to manage DCOS infrastructure

Created: 2018-02-23 22:12:34.0

Updated: 2018-04-18 14:28:38.0

Pushed: 2018-03-30 20:43:07.0

Homepage:

Size: 12

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Overview

stasher is a tool to manage DCOS infrastructure

Requirements

Use the config for DCOS_PASSWORD_DEV, DCOS_PASSWORD_STAGE AND DCOS_PASSWORD_PROD

Usage

amples

./stasher -s ethos01-an1-control.dev.cloud.adobe.io -t apigateway ./stasher -s ethos01-an1-control.dev.cloud.adobe.io -v -t klam-ssh ./stasher -s ethos01-an1-control.dev.cloud.adobe.io -v -a all ./stasher -s ethos01-an1-control.dev.cloud.adobe.io -v -a capcom

ages

how Deployments

tasher -s ethos01-ew1-control.stage.cloud.adobe.io -d`

ill task

tasher -s ethos01-an1-control.dev.cloud.adobe.io -t ethos-datadog.765773b3-9977-11e7-9948-766e67cdfad4 -k`

how tasks

tasher -s ethos01-an1-control.dev.cloud.adobe.io -t ethos-datadog`

ist apps

tasher -s ethos01-ue1-control.dev.cloud.adobe.io -l | grep '"id"' | more`

how apps

tasher -s ethos01-an1-control.dev.cloud.adobe.io -a ethos-datadog`

dit app

tasher -s ethos01-ue1-control.dev.cloud.adobe.io -v -a ethos-datadog -e`

how Mesos slaves

tasher -s ethos01-ue1-control.dev.cloud.adobe.io -m slaves`

tasher -s ethos01-ue1-control.dev.cloud.adobe.io -m flags`

how Mesos tasks

tasher -s ethos01-ue1-control.dev.cloud.adobe.io -m tasks`

taging tasks

tasher -s ethos01-uw2-control.dev.cloud.adobe.io -m frameworks | jq -r '.frameworks[]' | grep -B 5 STAGI | grep '"id"'
: "liuapi-dev-b647512149.liuapi---790396c0bcc85c1012191faaa48ff57e715dded7----0ada80.c57ec2c6-a9d0-11e7-93f7-0ad74b1f6b8d",
: "rmcmahonorderapi-dev-a463154862.rmcmahonorderapi---fd1dde806e71666b7e04036efa3dcb16cf28df05----9ec70c.c9d9d5c1-a955-11e7-93f7-0ad74b1f6b8d`

ount unreachable tasks

tasher -s ethos01-uw2-control.dev.cloud.adobe.io -m frameworks | jq -r '.frameworks[]' | grep -B 5 UNREA | grep '"id"' | wc -l


illed tasks

tasher -s ethos01-uw2-control.dev.cloud.adobe.io -m frameworks | jq -r '.frameworks[]' | grep -B 40  KILLING | grep '"id"'`

ill specific task

asher -s ethos01-ue1-control.stage.cloud.adobe.io -t $(./stasher -s ethos01-ue1-control.stage.cloud.adobe.io -t apigateway | grep 10.71.22.65 | awk '{ print $2 }') -k`

estart multiple hosts

 i in "10.70.24.136" "10.70.24.143"; do ./stasher -s ethos01-an1-control.prod.cloud.adobe.io -t $(./stasher -s ethos01-an1-control.prod.cloud.adobe.io -t apigateway | grep $i | awk '{ print $2 }') -k; sleep 100; done`

reate a JIRA ticket

tasher -z "Api gateway restart" -y "Api gateway in host 10.1.2.3" -j`

estart apigateway and create JIRA ticket

VER=ethos01-ue1-control.prod.cloud.adobe.io; for i in "10.71.28.149" "10.71.30.90"; do ./stasher -s $SERVER -t $(./stasher -s $SERVER -t apigateway | grep $i | awk '{ print $2 }') -k -z "Api gateway restart in host $i" -y "Api gateway in host $i" -j; sleep 10;  done`

end message to slack CHANNEL

o https://channel.slack.com/apps/manage/custom-integrations and get the Webhook URL.

NEL="#stasher" WEBHOOKURL="https://hooks.slack.com/services/XXXX/XXXX/" USERNAME="sancheza" ./stasher -c "This is posted to #ethos-ops-standup and comes from a bot named sancheza"

thor

andro Sanchez Acosta <sancheza@adobe.com>

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.