From 84dd9772472e9a7a419d72457fa518188d1dd13b Mon Sep 17 00:00:00 2001 From: Greg Poirier Date: Mon, 31 Jul 2017 12:34:14 -0700 Subject: [PATCH] kill agent.sh and backend.sh in docker image --- docker-compose.yaml | 4 ++-- docker-scripts/agent.sh | 4 ---- docker-scripts/backend.sh | 13 ------------- 3 files changed, 2 insertions(+), 19 deletions(-) delete mode 100755 docker-scripts/agent.sh delete mode 100755 docker-scripts/backend.sh diff --git a/docker-compose.yaml b/docker-compose.yaml index 0e9f9d9e12..d7abc92fba 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -2,7 +2,7 @@ version: '3' services: sensu-backend1: image: sensuapp/sensu-go - command: /opt/sensu/bin/backend.sh + command: sensu-backend start --store-client-url http://127.0.0.1:2379 hostname: backend1 restart: always ports: @@ -12,7 +12,7 @@ services: - "8081:8081" sensu-agent1: image: sensuapp/sensu-go - command: /opt/sensu/bin/agent.sh + command: sensu-agent start --backend-url wss://sensu-backend1:8081 --subscriptions test hostname: agent1 restart: always links: diff --git a/docker-scripts/agent.sh b/docker-scripts/agent.sh deleted file mode 100755 index 88f6d0f205..0000000000 --- a/docker-scripts/agent.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -/opt/sensu/bin/tools/sleep 10 -/usr/local/bin/sensu-agent start --backend-url ws://backend1:8081 --subscriptions test diff --git a/docker-scripts/backend.sh b/docker-scripts/backend.sh deleted file mode 100755 index b9d562ba98..0000000000 --- a/docker-scripts/backend.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -/usr/local/bin/sensu-backend start --store-client-url http://127.0.0.1:2379 & -/opt/sensu/bin/tools/sleep 5 -/opt/sensu/bin/sensuctl handler create slack -t pipe --api-url http://backend1:8080 -c "/opt/bin/handlers/slack -w https://hooks.slack.com/services/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 -c '#sensu-spam'" -/opt/sensu/bin/sensuctl check create false -c /opt/bin/tools/false -s test --handlers slack --api-url http://backend1:8080 -i 10 - -# wait for sensu-backend pid to finish so we don't kill the container -# prematurely -pid=`pgrep sensu-backend` -while kill -0 "$pid"; do - sleep 1 -done