This project is a fork from the vis-lab project of the Hochschule Karlsruhe (University of Applied Sciences) and is used for the Distributed Information Systems Laboratory.
This is a guide how to deploy and run the project on your local machine using minikube on a windows host system. For other OS use different commands to build in minikube context.
- start minikube with enough ressources (8GB can work, but 16GB is recommended)
# start minikube with 16GB of ram and 4 cpus
minikube start --memory=16384 --cpus=4
- clone the git repositories
# base git with mysql and legacy webshop
git clone https://github.com/HuBaX/hska-vis-legacy.git
# category microservice git
git clone https://github.com/HuBaX/CategoryService.git
# product microservice git
git clone https://github.com/HuBaX/ProductService.git
- Build the product service
cd ProductService/
& minikube -p minikube docker-env --shell powershell | Invoke-Expression
docker build -t product .
cd ..
- Build the category service
cd CategoryService/
& minikube -p minikube docker-env --shell powershell | Invoke-Expression
docker build -t category .
cd ..
- Build apache, mysql and the legacy webshop
cd hska-vis-legacy/
& minikube -p minikube docker-env --shell powershell | Invoke-Expression
docker build -t apache -f .\docker\DockerfileApache .
docker build -t mavogel/hska-vis-web-shop-db-image -f .\docker\DockerfileMySQL .
docker build -t mavogel/hska-vis-legacywebshop -f .\docker\Dockerfile .
- Go in the hska-vis-legacy folder
cd hska-vis-legacy/
- Run the deployment yamls from the yaml-folder in the minikube cluster.
kubectl apply -f ./yaml/mysql/
kubectl apply -f ./yaml/deployment/
kubectl apply -f ./yaml/services/
- Check if everything is up and running.
kubectl get pods
- install istioctl(in admin powershell!):
choco install istioctl
If no choco is available, see alternative installations: https://istio.io/latest/docs/setup/getting-started/
- install istio
istioctl install
- configure Envoy Proxy injection create labe fro istio for default namespace
kubectl get ns default --show-labels
kubectl label namespace default istio-injection=enabled
kubectl get ns default --show-labels
(delete label with: kubectl label namespace default istio-injection-
)
- delete all deployments and redeploy
# delete all
kubectl delete -f ./yaml/deployment/
# redeploy all pods
kubectl apply -f ./yaml/deployment/
-
copy the yaml files from istio addon folder to yaml folder istio-addons (get files from latest release: https://github.com/istio/istio/releases)
-
apply the yaml files
kubectl apply -f ./yaml/istio-addons/
- portforward kiali service
get service port from kiali: kubectl get svc -A
kubectl port-forward svc/kiali -n istio-system 20001
-
visit Kiali frontend at localhost:20001
-
portfoward Grafana service
get service port from kiali: kubectl get svc -A
kubectl port-forward svc/grafana -n istio-system 3000
- visit Grafana frontend at localhost:3000
- minikube service
minikube service legacy-service --url
-
go to url and port and add /EShop-1.0.0 to it
-
login with:
user: admin
pwd: admin
Source code is open source and released under the MIT license.