Skip to content

Installation Guide

Bowen Li edited this page Nov 14, 2019 · 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) Move all directory whose name is start with "ts-" to your server.   
(2) Move pom.xml and docker-compose.xml to your server to the same directory with "ts-..." directories.   
(3) Open the terminal and enter the directory where pom.xml loacted.   
(4) Use the instruction: `mvn clean package`. And waiting for build success.   
(5) Use the instruction: `docker-compose build`. And waiting for build success.

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-v0.0.2]
(2) [deployment/k8s-deployment-v0.0.2]

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