From 6ccd3a9b44be4452bcd88267b9229c55c2385372 Mon Sep 17 00:00:00 2001 From: Lars Kellogg-Stedman Date: Thu, 9 Oct 2014 17:08:18 -0400 Subject: [PATCH] update start/stop scripts - use new yaml config files - provide separate service- and pod- start/stop scripts Change-Id: Iaff2a5b4d5a33467a9d10b10e9bd5c922eeed3aa --- tools/start | 10 +++++----- tools/start-all-pods | 15 +++++++++++++++ tools/start-all-services | 17 +++++++++++++++++ tools/stop | 11 ++++++----- tools/stop-all-pods | 6 ++++++ tools/stop-all-services | 6 ++++++ 6 files changed, 55 insertions(+), 10 deletions(-) create mode 100755 tools/start-all-pods create mode 100755 tools/start-all-services create mode 100755 tools/stop-all-pods create mode 100755 tools/stop-all-services diff --git a/tools/start b/tools/start index ed36e08085..2daad084e4 100755 --- a/tools/start +++ b/tools/start @@ -1,6 +1,6 @@ -kubecfg -c ../k8s/service/mariadb-service.json create services -kubecfg -c ../k8s/service/keystone-public-service.json create services -kubecfg -c ../k8s/service/keystone-admin-service.json create services +#!/bin/sh -kubecfg -c ../k8s/pod/mariadb-pod.json create pods -kubecfg -c ../k8s/pod/keystone-pod.json create pods +cd $(git rev-parse --show-toplevel) + +./tools/start-all-services +./tools/start-all-pods diff --git a/tools/start-all-pods b/tools/start-all-pods new file mode 100755 index 0000000000..9af11b38bd --- /dev/null +++ b/tools/start-all-pods @@ -0,0 +1,15 @@ +#!/bin/sh + +cd $(git rev-parse --show-toplevel) + +pods=' +rabbitmq +mariadb +keystone +glance +' + +for pod in $pods; do + kubecfg -c "k8s/pod/${pod}-pod.yaml" create pods +done + diff --git a/tools/start-all-services b/tools/start-all-services new file mode 100755 index 0000000000..b9b5cfd566 --- /dev/null +++ b/tools/start-all-services @@ -0,0 +1,17 @@ +#!/bin/sh + +cd $(git rev-parse --show-toplevel) + +services=' +glance-api +glance-registry +keystone-admin +keystone-public +mariadb +rabbitmq +' + +for svc in $services; do + kubecfg -c "k8s/service/${svc}-service.yaml" create services +done + diff --git a/tools/stop b/tools/stop index 084194cb81..12d4e36f59 100755 --- a/tools/stop +++ b/tools/stop @@ -1,6 +1,7 @@ -kubecfg delete /pods/mariadb -kubecfg delete /pods/keystone +#!/bin/sh + +cd $(git rev-parse --show-toplevel) + +./tools/stop-all-pods +./tools/stop-all-services -kubecfg delete /services/mariadb -kubecfg delete /services/keystone-public -kubecfg delete /services/keystone-admin diff --git a/tools/stop-all-pods b/tools/stop-all-pods new file mode 100755 index 0000000000..4fe4b80d71 --- /dev/null +++ b/tools/stop-all-pods @@ -0,0 +1,6 @@ +#!/bin/sh + +kubecfg list pods | + awk 'NR>2 {print $1}' | + xargs -i kubecfg delete pods/{} + diff --git a/tools/stop-all-services b/tools/stop-all-services new file mode 100755 index 0000000000..c76c244392 --- /dev/null +++ b/tools/stop-all-services @@ -0,0 +1,6 @@ +#!/bin/sh + +kubecfg list services | + awk 'NR>2 {print $1}' | + xargs -i kubecfg delete services/{} +