Skip to content

newrelic-forks/train-ticket

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

381 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Train Ticket:A Benchmark Microservice System

The project is a train ticket booking system based on microservice architecture which contains 41 microservices. The programming languages and frameworks it used are as below.

  • Java - Spring Boot, Spring Cloud
  • Node.js - Express
  • Python - Django
  • Go - Webgo
  • DB - Mongo、MySQL

You can get more details at Wiki Pages.

Service Architecture Graph

architecture

Quick Start

Create Four ubuntu EC2 instances (t2.xlarge) in AWS Connect the instances using security groups Allow all traffic on 172.31.0.0/16 (Source) between instances. Allow tcp port 22 (ssh) and 80 (http) on 0.0.0.0/0 (Source) to all instances. Install MicroK8s and other tools on all the Instances

sudo apt update
sudo apt install git
sudo apt install gh
sudo apt install snapd -y
sudo snap install microk8s --classic

Check the status of MicroK8s and ensure it’s running:

microk8s status --wait-ready

Enable Ingress

 microk8s enable ingress

Add user to the MicroK8s group for easier access on all instances.

sudo usermod -a -G microk8s $USER
sudo chown -f -R $USER ~/.kube

Logout and login back in to apply group changes.

Cluster Setup

Generate kubectl config on master node

microk8s config > ~/.kube/microk8s-config

Setting shell profile on master node

export KUBECONFIG=$HOME/.kube/microk8s-config
export KUBECONFIG=/home/ubuntu/.kube/microk8s-config
echo "export KUBECONFIG=$HOME/.kube/microk8s-config" >> ~/.bashrc
source ~/.bashrc
echo $KUBECONFIG

On the master node (node1), run:

microk8s add-node

On the first worker node (node2) get the output from the previous command and join node2 to master (node1)

microk8s join 172.31.0.0:25000/<X>/<Y> --worker

On the master node (node1), run this again:

microk8s add-node

On the second worker node (node3) get the output from the previous command and join node3 to master (node1)

microk8s join 172.31.0.0:25000/<X>/<Y> --worker

On the master node (node1), run this again:

microk8s add-node

On the third worker node (node4) get the output from the previous command and join node4 to master (node1)

microk8s join 172.31.0.0:25000/<X>/<Y> --worker

Ensure there are 4 nodes

microk8s kubectl get nodes -o wide

Add HashiCorp GPG key and install Terraform

sudo apt update
sudo apt install -y gnupg software-properties-common
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update
sudo apt install terraform
terraform version

Give role to the master and worker nodes

microk8s kubectl label node <ip-ip-address> role=node1
microk8s kubectl label node <ip-ip-address> role=node2
microk8s kubectl label node <ip-ip-address> role=node3
microk8s kubectl label node <ip-ip-address> role=node4

Clone train-ticket respository from master node in the cluster. Set if you are using a particular branch.

gh auth login
gh repo clone newrelic-forks/train-ticket -- --branch <branch>
cd train-ticket

Create namespace:

microk8s kubectl create namespace store

Run the configure script. It will ask for INGEST LICENSE KEY, USER KEY, ACCOUNT ID and REGION.

./configure

After successfully running the configure script, check the pods and services status.

microk8s kubectl -n store get pods -o wide
microk8s kubectl -n store get service -o wide

Verify Ingress Setup

microk8s kubectl -n store get ingress

You should see an output similar to this:

NAME               CLASS    HOSTS   ADDRESS     PORTS   AGE
all-ingress        public   *       127.0.0.1   80      7m12s

Now, you should be able to access the website at http:/// from anywhere on the internet using any public IP assigned to any AWS EC2 instance that was provisioned.

Screenshot

screenshot In order to know how to use the application, you can refer to the User Guide.

Communication

Information

Serverless Train Ticket

We have released a serverless version of Train Ticket.

Paper Reference

Bowen Li, Xin Peng, Qilin Xiang, Hanzhang Wang, Tao Xie, Jun Sun, Xuanzhe Liu.
Enjoy your observability: an industrial survey of microservice tracing and analysis
Empirical Software Engineering, Volume 27, 25, 2022.
Download:[PDF]


Chenxi Zhang, Xin Peng, Chaofeng Sha, Ke Zhang, Zhenqing Fu, Xiya Wu, Qingwei Lin, Dongmei Zhang
DeepTraLog: Trace-Log Combined Microservice Anomaly Detection through Graph-based Deep Learning
In Proceedings of the 44th International Conference on Software Engineering (ICSE 2022) , Pittsburgh, USA, May, 2022.
Download:[PDF]


Dewei Liu, Chuan He, Xin Peng, Fan Lin, Chenxi Zhang, Shengfang Gong, Ziang Li, Jiayu Ou, Zheshun Wu
MicroHECL: High-Efficient Root Cause Localization in Large-Scale Microservice Systems
In Proceedings of the 43rd IEEE/ACM International Conference on Software Engineering: Software Engineering in Practice (ICSE-SEIP 2021) , Madrid, Spain, May, 2021.
Download:[PDF]


Qilin Xiang, Xin Peng, Chuan He, Hanzhang Wang, Tao Xie, Dewei Liu, Gang Zhang, Yuanfang Cai
No Free Lunch: Microservice Practices Reconsidered in Industry
arXiv preprint arXiv:2106.07321, 2021.
Download:[PDF]


Xiaofeng Guo, Xin Peng, Hanzhang Wang, Wanxue Li, Huai Jiang, Dan Ding, Tao Xie, Liangfei Su
Graph-based trace analysis for microservice architecture understanding and problem diagnosis
In Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE 2020) , Virtual Event, USA, November, 2020.
Download:[PDF]


Xiang Zhou, Xin Peng, Tao Xie, Jun Sun, Chao Ji, Dewei Liu, Qilin Xiang, and Chuan He.
Latent Error Prediction and Fault Localization for Microservice Applications by Learning from System Trace Logs.
In Proceedings of the 27th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE 2019) , Tallinn, Estonia, August 2019.
Download: [PDF] [BibTeX]


Xiang Zhou, Xin Peng, Tao Xie, Jun Sun, Chao Ji, Wenhai Li, and Dan Ding.
Fault Analysis and Debugging of Microservice Systems: Industrial Survey, Benchmark System, and Empirical Study.
IEEE Transactions on Software Engineering , To appear.
Download: [PDF]


Xiang Zhou, Xin Peng, Tao Xie, Jun Sun, Wenhai Li, Chao Ji, and Dan Ding.
Delta Debugging Microservice Systems.
In Proceedings of 33rd IEEE/ACM International Conference on Automated Software Engineering (ASE 2018) , Short Paper, Montpellier, France, September 2018.
Download: [PDF] [BibTeX]
An extended version to appear in IEEE Transactions on Services Computing.


Xiang Zhou, Xin Peng, Tao Xie, Jun Sun, Chenjie Xu, Chao Ji, and Wenyun Zhao.
Poster: Benchmarking Microservice Systems for Software Engineering Research.
In Proceedings of the 40th International Conference on Software Engineering (ICSE 2018) , Posters, Gothenburg, Sweden, May 2018.
Download: [PDF] [BibTeX]

About

Train Ticket - A Benchmark Microservice System

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 52.9%
  • JavaScript 23.5%
  • HTML 17.3%
  • Python 3.0%
  • CSS 1.3%
  • Dockerfile 1.1%
  • Other 0.9%