aboutsummaryrefslogtreecommitdiff
path: root/setup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'setup.sh')
-rwxr-xr-xsetup.sh47
1 files changed, 27 insertions, 20 deletions
diff --git a/setup.sh b/setup.sh
index a2ac56b..f78c129 100755
--- a/setup.sh
+++ b/setup.sh
@@ -1,30 +1,37 @@
#!/bin/sh
+build_image () {
+ echo "=============================================== Building $1"
+ docker build -t "$1-service" "srcs/$1"
+ echo
+}
-echo 'Building docker images'
-docker build -t cacharle-ftps srcs/ftps
-docker build -t cacharle-nginx srcs/nginx
-docker build -t cacharle-wordpress srcs/wordpress
-docker build -t cacharle-phpmyadmin srcs/phpmyadmin
-docker build -t cacharle-mysql srcs/mysql
-docker build -t cacharle-grafana srcs/grafana
-docker build -t cacharle-influxdb srcs/influxdb
+create_service () {
+ echo "=============================================== Creating Service $1"
+ kubectl apply -f "srcs/$1/$1.yaml"
+ echo
+}
+
+
+echo '--- Building docker images'
+build_image ftps
+build_image nginx
+build_image wordpress
+build_image phpmyadmin
+build_image mysql
+build_image grafana
+build_image influxdb
# minikube start
-#
# eval $(minikube docker-env)
-kubectl apply -f srcs/ftps/ftps.yaml
-kubectl apply -f srcs/nginx/nginx.yaml
-kubectl apply -f srcs/wordpress/wordpress.yaml
-kubectl apply -f srcs/phpmyadmin/phpmyadmin.yaml
-kubectl apply -f srcs/mysql/mysql.yaml
-kubectl apply -f srcs/grafana/grafana.yaml
-kubectl apply -f srcs/influxdb/influxdb.yaml
-
-# echo 'Creating cluster'
-# echo "$names" | xargs -Iname kubectl apply -f srcs/name/name.yaml
+create_service ftps
+create_service nginx
+create_service wordpress
+create_service phpmyadmin
+create_service mysql
+create_service grafana
+create_service influxdb
-#
# minikube dashboard