This repository has been archived by the owner on May 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·48 lines (40 loc) · 1.89 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
echo -e "Minikube Run ..."
echo -e "Might take a while to install everything and get the cluster ready."
minikube start --cpus=2 --vm-driver=docker --bootstrapper=kubeadm \
--extra-config=kubelet.authentication-token-webhook=true \
--extra-config=apiserver.service-node-port-range=3000-35000
# IF, you do not have Metallb addon in your minikube, you can download the manifest.
# and "comment" "enable metallb" line in Enabling Addons section.
# -------------------------------------
# echo -e "Setting Load balancer ..."
# kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.8.1/manifests/namespace.yaml
# kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.8.1/manifests/metallb.yaml
# echo -e "If already exists a member list, It will show an Error Message, but it is okay..."
# kubectl create secret generic -n metallb-system memberlist --from-literal=secretkey="$(openssl rand -base64 128)"
echo -e "Enabling Addons ..."
minikube addons enable metrics-server
minikube addons enable dashboard
minikube addons enable metallb
echo -e "Loading MetalLB ..."
kubectl apply -f ./srcs/metallb-config.yaml
echo -e "Launching Pods ..."
eval $(minikube docker-env)
docker build srcs/nginx -t nginx-img
docker build srcs/ftps -t ftps-img
docker build srcs/wordpress -t wordpress-img
docker build srcs/mysql -t mysql-img
docker build srcs/phpmyadmin -t phpmyadmin-img
docker build srcs/grafana -t grafana-img
docker build srcs/influxdb -t influxdb-img
echo -e "Configure Minikube ..."
kubectl apply -f ./srcs/nginx/nginx.yaml
kubectl apply -f ./srcs/ftps/ftps.yaml
kubectl apply -f ./srcs/mysql/mysql.yaml
kubectl apply -f ./srcs/wordpress/wordpress.yaml
kubectl apply -f ./srcs/phpmyadmin/phpmyadmin.yaml
kubectl apply -f ./srcs/influxdb/influxdb.yaml
kubectl apply -f ./srcs/grafana/grafana.yaml
echo -e "You can now proceed."
# Open Dashboard
minikube dashboard