Skip to content

HuBaX/hska-vis-legacy

 
 

Repository files navigation

MIT license

Distributed Information Systems Laboratory aka vis-lab

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.

Table of Contents

Getting Started

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.

Prerequisites

  • 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 microservices

  • 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 .

Deploy the microservices in minikube

  1. Go in the hska-vis-legacy folder
cd hska-vis-legacy/
  1. 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/
  1. Check if everything is up and running.
kubectl get pods

Installation of istio

  1. install istioctl(in admin powershell!):
choco install istioctl

If no choco is available, see alternative installations: https://istio.io/latest/docs/setup/getting-started/

  1. install istio
istioctl install
  1. 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-)

  1. delete all deployments and redeploy
# delete all
kubectl delete -f ./yaml/deployment/

# redeploy all pods
kubectl apply -f ./yaml/deployment/

Installation of Grafana, Prometheus and kiali

  1. copy the yaml files from istio addon folder to yaml folder istio-addons (get files from latest release: https://github.com/istio/istio/releases)

  2. apply the yaml files

kubectl apply -f ./yaml/istio-addons/
  1. portforward kiali service

get service port from kiali: kubectl get svc -A

kubectl port-forward svc/kiali -n istio-system 20001
  1. visit Kiali frontend at localhost:20001

  2. portfoward Grafana service

get service port from kiali: kubectl get svc -A

kubectl port-forward svc/grafana -n istio-system 3000
  1. visit Grafana frontend at localhost:3000

Expose the shop

  1. minikube service
minikube service legacy-service --url
  1. go to url and port and add /EShop-1.0.0 to it

  2. login with:

user: admin
pwd: admin

License

Source code is open source and released under the MIT license.

About

This project is the quick setup of the legacy webshop of the masters course 'Distributed Information Systems' at the University of Applied Sciences (Karlsruhe).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 98.1%
  • HTML 1.4%
  • Other 0.5%