Skip to content
This repository was archived by the owner on Mar 22, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions guestbook-go/check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
#!/bin/sh
#
# Run this script with provider name as first argument
#

if [ $1 == "kubernets" ]; then
IP=$(kubectl get service guestbook -o template --template="{{ .spec.clusterIP }}")
PORT=$(kubectl get service guestbook -o template --template="{{ (index .spec.ports 0).port }}")
fi

curl --max-time 1 $IP:$PORT/info
17 changes: 17 additions & 0 deletions helloapache/check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh
#
# Run this script with provider name as first argument
#

if [ $1 == "kubernetes" ]; then
IP=$(kubectl get pod helloapache -o template --template="{{ .status.podIP }}")
PORT=$(kubectl get pod helloapache -o template --template="{{ (index (index .spec.containers 0).ports 0).containerPort }}")
fi

if [ $1 == "docker" ]; then
IP=localhost
# TODO: get port from somewhere :-)
PORT=80
fi

curl --max-time 1 $IP:$PORT
22 changes: 22 additions & 0 deletions mariadb-centos7-atomicapp/check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh
#
# Run this script with provider name as first argument
#

if [ $1 == "kubernetes" ]; then
IP=$(kubectl get service mariadb -o template --template="{{ .spec.clusterIP }}")
PORT=$(kubectl get service mariadb -o template --template="{{ (index .spec.ports 0).port }}")
fi

if [ $1 == "docker" ]; then
IP=localhost
# TODO: get port from somewhere :-)
PORT=80
fi

# TODO: get them from answers.conf or as arguments to this script
db_pass="pass"
db_name="name"
db_user="user"

docker run -it centos/mariadb mysqladmin -h $IP -P $PORT -u $db_user -p$db_pass --connect-timeout=10 ping
22 changes: 22 additions & 0 deletions mariadb-fedora-atomicapp/check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh
#
# Run this script with provider name as first argument
#

if [ $1 == "kubernetes" ]; then
IP=$(kubectl get service mariadb -o template --template="{{ .spec.clusterIP }}")
PORT=$(kubectl get service mariadb -o template --template="{{ (index .spec.ports 0).port }}")
fi

if [ $1 == "docker" ]; then
IP=localhost
# TODO: get port from somewhere :-)
PORT=80
fi

# TODO: get them from answers.conf or as arguments to this script
db_pass="pass"
db_name="name"
db_user="user"

docker run -it centos/mariadb mysqladmin -h $IP -P $PORT -u $db_user -p$db_pass --connect-timeout=10 ping
21 changes: 21 additions & 0 deletions redis-centos7-atomicapp/check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh
#
# Run this script with provider name as first argument
# this script require netcat
# yum install netcat
# atp-get install netcat
#

if [ $1 == "kubernetes" ]; then
IP=$(kubectl get service redis-master -o template --template="{{ .spec.clusterIP }}")
PORT=$(kubectl get service redis-master -o template --template="{{ (index .spec.ports 0).port }}")
fi

if [ $1 == "docker" ]; then
IP=localhost
# TODO: get port from somewhere :-)
PORT=6379
fi


(printf "PING\r\n"; sleep 0.5) | nc $IP $PORT | grep PONG
13 changes: 13 additions & 0 deletions skydns-atomicapp/check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
#
# this scripts require nslookup
# yum install bind-utils
# apt-get install dnsutils
#

IP=$(kubectl get service kube-dns -o template --template="{{ .spec.clusterIP }}")

# TODO: get it from answers.conf or as arguments to this script
dns_domain="cluster.local"

nslookup kubernetes.default.svc.$dns_domain $IP