Skip to content

Laboratory for the lecture Distributed Systems at the University of Applied Sciences Karlsruhe

License

Notifications You must be signed in to change notification settings

AnsgarLichter/DistributedSystemsLaboratory

Repository files navigation

MIT license Travis Build Status

Distributed Information Systems Laboratory aka vis-lab

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

Table of Contents

Prerequisites

Usage

You can run the images from docker hub which is preferred or built it on your own. First: Start Docker daemon and check with docker ps

Quick Start (docker-hub)

  • Copy the docker-compose.yml locally in a desired folder and run
$ docker-compose up -d
# to follow the logs
$ docker-compose logs -tf
# to shutdown
$ docker-compose down

Built it on your own

  • Run docker-compose -f docker-compose-local.yml up -d which will
    • It builds the web app war in a staged build, packs it into a docker tomcat8 container, and sets the user tomcat with password admin for the Management Console at http://localhost:8888/
    • Initializes the MySQL Database docker container with the db user defined in hibernate.cfg.xml
    • Sets up both containers and make the legacy webshop available under http://localhost:8888/EShop-1.0.0
  • Follow the logs via docker-compose -f docker-compose-local.yml logs -tf
  • To shutdown the containers run docker-compose -f docker-compose-local.yml down

Database Cleanup

If you change the user and password of the MySQL database, you should run

$ docker-compose rm -v
$ rm -rf .data

Details can be found here

Kubernetes

First of all, the different components have to be packaged into Docker images. To do this, the following command has to be executed per Dockerfile:

docker build -t <your-image-name>:<your-version> -f <path-to-dockerfile> .

Then next, the individual Kubernetes configurations must be deployed. To do this, they must be deployed in the following order:

  1. pvc-mysql.yaml
  2. mysql-legacy.yaml
  3. mysql-category.yaml
  4. mysql-product.yaml
  5. category-service.yaml
  6. product-service.yaml
  7. webshop.yaml
  8. istio.yaml

The configurations can be deployed with the following command:

kubectl apply -f <file-name>

More useful commands:

  • kubectl port-forward svc/<service-name> <outside-port>:<inside-port> -n <namespace>
  • kubectl get ns default --show-labels
  • kubectl label namespace default istio-injection=enabled

License

Copyright (c) 2017-2018 Manuel Vogel Source code is open source and released under the MIT license.

About

Laboratory for the lecture Distributed Systems at the University of Applied Sciences Karlsruhe

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published