Skip to content

Installation Guide

zhongyuanzhao000 edited this page Jul 19, 2020 · 4 revisions

Deploy Train Ticket with the following step

Local environment

(1) jdk1.8
(2) maven
(3) docker
(4) docker-compose
(5) k8s `v1.14`
(6) istio `v1.0.0`
  • If you use docker-compose, please make sure you have at least 24G memory 50G disk in Linux.
  • If you use k8s (+istio), please make sure you have at least four same configuration Linux servers.

Step 1: Build docker image

You should build your own docker images first!

In this step, you will build the docker images.

# 1. clone the repository
git clone https://github.com/FudanSELab/train-ticket.git
cd train-ticket
# 2. build the application
mvn clean package -Dmaven.test.skip=true
# 3. build the docker images
docker-compose build

Step 2: Upload docker image to docker registry

In this step, you will upload your docker image to your docker registry if you need.

After prepare images, than you can use the follow methods to setup it!

Please use the yml  file in the directory `deployment`:
(1) [deployment/docker-compose-manifests]
(2) [deployment/kubernetes-manifests]

docker-compose

Deploy the Train-Ticket system with docker-compose.
(1) Use the instruction: `docker-compose up` And wating for all services startup

K8S

Deploy the Train-Ticket system on K8S.
(1) kubectl apply -f ts-deployment-part1.yml   
(2) kubectl apply -f ts-deployment-part2.yml
(3) kubectl apply -f ts-deployment-part3.yml  

K8S+istio

Deploy the Train-Ticket system on K8S with istio. 
(1) kubectl create -f <(istioctl kube-inject -f ts-deployment-part1.yml)
(2) kubectl create -f <(istioctl kube-inject -f ts-deployment-part2.yml)
(3) kubectl create -f <(istioctl kube-inject -f ts-deployment-part3.yml)
(4) kubectl apply  -f trainticket-gateway.yaml