Merge "Make scripts work on latest Atomic images"

This commit is contained in:
Jenkins 2015-01-20 17:44:06 +00:00 committed by Gerrit Code Review
commit 671d21d7c2
12 changed files with 39 additions and 36 deletions

@ -1,6 +1,7 @@
#!/bin/sh
cd $(git rev-parse --show-toplevel)
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."
./tools/start-all-services
./tools/start-all-replications

@ -1,6 +1,7 @@
#!/bin/sh
cd $(git rev-parse --show-toplevel)
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."
pods='
rabbitmq

@ -1,6 +1,7 @@
#!/bin/sh
cd $(git rev-parse --show-toplevel)
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."
services='
nova-compute

@ -1,6 +1,7 @@
#!/bin/sh
cd $(git rev-parse --show-toplevel)
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."
services='
ceilometer-api

@ -1,6 +1,7 @@
#!/bin/sh
cd $(git rev-parse --show-toplevel)
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."
./tools/stop-all-replications
./tools/stop-all-pods

@ -1,21 +1,18 @@
#!/bin/sh
#!/bin/bash
cd $(git rev-parse --show-toplevel)
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."
# Delete the replication is not cleaning up its pods
# These pods need to be deleted according to their UUID
uuids=$(kubectl get pods -o json | jq '.[][].id' 2>/dev/null | grep -o -E '"[a-fA-F|0-9|\-]*' | cut -c 2- | grep '\-')
UUID_REGEX="[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}"
for uuid in $uuids; do
if [ $uuid ]; then
kubectl delete pod $uuid
pods=$(kubectl get pods -o template -t '{{range .items}}{{.id}} {{end}}')
for pod in $pods; do
if [[ $pod =~ $UUID_REGEX ]]; then
# Stopping a k8s replicationController doesn't delete the associated
# pods, which names are UUIDs.
# Assuming all pods named by UUID are leftover replication pods.
kubectl delete pod $pod
else
kubectl delete -f "k8s/pod/${pod}-pod.yaml" 2>/dev/null
fi
done
pods=$(kubectl get pods -o json| jq '.[][].id' 2>/dev/null)
# Removes quotes from jquery
pods=${pods//\"/}
for pod in $pods; do
kubectl delete -f "k8s/pod/${pod}-pod.yaml" 2>/dev/null
done

@ -1,6 +1,7 @@
#!/bin/sh
cd $(git rev-parse --show-toplevel)
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."
replication_ctrs=$(kubectl get replicationController | awk 'NR>1 {print $1}')

@ -1,6 +1,7 @@
#!/bin/sh
cd $(git rev-parse --show-toplevel)
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."
services=$(kubectl get services | awk 'NR>1 {print $1}')

@ -1,6 +1,8 @@
#!/bin/sh
cd $(git rev-parse --show-toplevel)
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."
find docker -name Dockerfile | while read dockerfile; do
dir=${dockerfile%/*}
link=$(python -c 'import os,sys; print os.path.relpath(sys.argv[1], sys.argv[2])' \

@ -1,9 +1,8 @@
#!/bin/sh
TOPLEVEL=$(git rev-parse --show-toplevel)
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."
cd $TOPLEVEL
git ls-files -z '*.json' |
find . -name '*.json' -print0 |
xargs -0 python tools/validate-json.py || exit 1

@ -1,9 +1,8 @@
#!/bin/sh
TOPLEVEL=$(git rev-parse --show-toplevel)
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."
cd $TOPLEVEL
git ls-files -z '*/Dockerfile' |
find docker -name Dockerfile -print0 |
xargs -0 tools/validate-maintainer.sh || exit 1

@ -1,9 +1,8 @@
#!/bin/sh
TOPLEVEL=$(git rev-parse --show-toplevel)
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."
cd $TOPLEVEL
git ls-files -z '*.yaml' |
find . -name '*.yaml' -print0 |
xargs -0 python tools/validate-yaml.py || exit 1