1
0
mirror of https://github.com/jcwimer/startup-infrastructure synced 2026-03-24 22:34:42 +00:00

Switched from docker swarm to Kubernetes with rke

This commit is contained in:
2020-05-11 19:39:13 -04:00
parent 01f384ac14
commit 1e5724ec1d
30 changed files with 458 additions and 488 deletions

View File

@@ -1,4 +1,5 @@
#!/bin/bash
set -eEuo pipefail
project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))"
source ${project_dir}/tests/lib/test-function.sh
@@ -24,11 +25,13 @@ function run-tests {
"vagrant ssh client -c 'bash /vagrant/tests/files/run-test-deploy.sh'"
testbash "Running kubectl should not fail" \
"vagrant ssh client -c 'export KUBECONFIG=/opt/rke/kube_config_rke-k8s.yaml; kubectl get nodes'"
"vagrant ssh client -c 'kubectl get nodes'"
# testbash "Portainer was deployed and admin account was initialized" \
# "vagrant ssh client -c 'curl --silent -I \
# -X GET \"http://portainer.test.com/api/users/admin/check\" -H \"accept: application/json\"' | grep 204"
testbash "Longhorn dashboard is running" \
"vagrant ssh client -c 'curl --silent -I -X GET http://longhorn.192.168.254.3.xip.io/dashboard' | grep '200 OK'"
testbash "Running a query on the mysql cluster should not fail" \
"vagrant ssh client -c 'bash /vagrant/tests/lib/mysql-query.sh'"
}
function destroy-infrastructure {