No description, website, or topics provided.
Clone or download
Latest commit 71b4697 Nov 10, 2018
Permalink
Failed to load latest commit information.
1-services-analysis remove Chinese May 10, 2018
1-services ref May 14, 2018
Document fix mistake in k8s-setup Sep 27, 2018
Json2Shiviz modify ts file Jul 23, 2018
akka-quickstart-java copy from the workspace_microservice master Jan 3, 2018
deployment fix k8s config image version bug Oct 25, 2018
docker_build remove Chinese May 10, 2018
image Add document for test case Nov 10, 2018
kubernetes-services remove Chinese May 10, 2018
ms-monitoring-core copy from the workspace_microservice master Jan 3, 2018
myproject/microservices Add the jar of myproject Sep 18, 2018
rest-service-update remove Chinese May 10, 2018
sample-test-1 copy from the workspace_microservice master Jan 3, 2018
spring-transaction-consumer remove Chinese May 10, 2018
spring-transaction-producer remove Chinese May 10, 2018
ts-admin-basic-info-service Add HttpHeaders Oct 13, 2018
ts-admin-order-service Add HttpHeaders Oct 13, 2018
ts-admin-route-service Add HttpHeaders Oct 13, 2018
ts-admin-travel-service Add HttpHeaders Oct 13, 2018
ts-admin-user-service Add HttpHeaders Oct 13, 2018
ts-assurance-service Add HttpHeaders Oct 13, 2018
ts-basic-service Add HttpHeaders Oct 13, 2018
ts-cancel-service Add HttpHeaders Oct 13, 2018
ts-config-service Add HttpHeaders Oct 13, 2018
ts-consign-price-service Add HttpHeaders Oct 13, 2018
ts-consign-service Add HttpHeaders Oct 13, 2018
ts-contacts-service Add HttpHeaders Oct 13, 2018
ts-execute-service Add HttpHeaders Oct 13, 2018
ts-food-map-service Add HttpHeaders Oct 13, 2018
ts-food-service Add HttpHeaders Oct 13, 2018
ts-inside-payment-service Add HttpHeaders Oct 13, 2018
ts-login-service Add HttpHeaders Oct 13, 2018
ts-news-service remove Chinese May 10, 2018
ts-notification-service Add HttpHeaders Oct 13, 2018
ts-order-other-service Fix bug in queryStationId Oct 30, 2018
ts-order-service Fix bug in queryStationId Oct 30, 2018
ts-payment-service Add HttpHeaders Oct 13, 2018
ts-preserve-other-service Add HttpHeaders Oct 13, 2018
ts-preserve-service Add HttpHeaders Oct 13, 2018
ts-price-service Add HttpHeaders Oct 13, 2018
ts-rebook-service Add HttpHeaders Oct 13, 2018
ts-register-service Add HttpHeaders Oct 13, 2018
ts-route-plan-service Add HttpHeaders Oct 13, 2018
ts-route-service Add HttpHeaders Oct 13, 2018
ts-seat-service Add HttpHeaders Oct 13, 2018
ts-security-service Add HttpHeaders Oct 13, 2018
ts-sso-service Add HttpHeaders Oct 13, 2018
ts-station-service Fix bug in queryStationId Oct 30, 2018
ts-ticket-office-service remove Chinese May 10, 2018
ts-ticketinfo-service Add HttpHeaders Oct 13, 2018
ts-train-service Add HttpHeaders Oct 13, 2018
ts-travel-plan-service Add HttpHeaders Oct 13, 2018
ts-travel-service Fix bug in queryStationId Oct 30, 2018
ts-travel2-service Add HttpHeaders Oct 13, 2018
ts-ui-dashboard Fix bug in queryStationId Oct 30, 2018
ts-ui-test Add document for test case Nov 10, 2018
ts-verification-code-service Add HttpHeaders Oct 13, 2018
ts-voucher-service remove Chinese May 10, 2018
tsp-test remove Chinese May 10, 2018
.gitignore Add the jar of myproject Sep 18, 2018
README.md Fix document Nov 10, 2018
README.md.rej Fix document Nov 10, 2018
README_OLD.md -- Sep 28, 2018
bugs.txt copy from the workspace_microservice master Jan 3, 2018
debugging.xlsx copy from the workspace_microservice master Jan 3, 2018
docker-compose-swarm.yml copy from the workspace_microservice master Jan 3, 2018
docker-compose.yml change docker-compose Jul 23, 2018
k8s-cluster.txt ref Mar 10, 2018
k8s-deployment.txt ref Apr 27, 2018
pom.xml Update Pom Sep 20, 2018
system_architecture.png ref May 24, 2018
system_architecture.pptx ref May 24, 2018
ts-deployment-part1.yml fix k8s config image version bug Oct 25, 2018
ts-deployment-part2-1.yml fix k8s config image version bug Oct 25, 2018
ts-deployment-part2-2.yml fix k8s config image version bug Oct 25, 2018
ts-deployment-part3.yml fix k8s config image version bug Oct 25, 2018
ts-deployment.yml copy from the workspace_microservice master Jan 3, 2018
ts-service-part1.yml copy from the workspace_microservice master Jan 3, 2018
ts-service-part2-1.yml correct the deployment file of order-other-service Mar 22, 2018
ts-service-part2-2.yml copy from the workspace_microservice master Jan 3, 2018
ts-service-part3.yml copy from the workspace_microservice master Jan 3, 2018

README.md

This project is ticket seller application in microservice architecture, including 40+ microservices

  • java,spring boot,spring cloud
  • nodejs,express
  • python,dijango
  • go,webgo

Supported Cluster Orchestration

  • K8S + Istio
  • Docker Swarm

Local runtime environment

  • jdk1.8
  • maven
  • docker
  • docker-compose
  • k8s
  • istio

Deploy Train Ticket with docker-compose

SetUp steps

you just need one machine and installed with git, jdk1.8, maven, docker and docker-compose

  • setup with the following steps:
    (1) Clone all the source code to your local computer with git.
    (2) Move all directory whose name is start with "ts-" to your server's other directory.
    (3) Move pom.xml and docker-compose.xml to your server to the same directory with "ts-..." directories.
    (4) Add the "myproject" directory to your maven ".m2" directory.
    The directory index is like /root/.m2/repository/myproject.
    (5) Open the terminal and enter the directory where pom.xml loacted.
    (6) Use the instruction: mvn clean package And waiting for build success.
    (7) Use the instruction: docker-compose build And waiting for build success.
    (8) Use the instruction: docker-compose up And wating for all services startup

Access the Train Ticket System in Browser

  • before access, you can use "docker ps" to see which port you should access:
    on default. the port is 80
    than you can use the ip of your server to access it.
    Unless something unexpected, if you can see the main interface like below, congratulations! main interface

The Step of Buy Ticket

(1) While access the main interface, Input the start city ,destination city, date and train type , And then click "search" button,
    you will get the tickets list , which is like the picture above.
(2) After select trip and seat type, Click "Booking" button, then it will show login dialog( or you can login before)
    Just follow that step to login

client_login (3) After login succeed, it will continue with the previous step, in this step, you must choose or add one Contacts, And decide whether you need Assurance ,food , or consign, than you can click "Select" button.
select_contact (4) After select,it will pop up a dialog for you to check whether the order information is correct, if so, then you can click "submit" button to submit you reservation
confirm_ticket (5) The last step is to go to the Order List to find the ticket you reserver before, and click the "Pay" button, waitting for success, than the buy ticket flow is over. pay_ticket (6)Also you can modify you order information modify_ticket (7) If you want search by different conditions such as quickest, cheapest and so on, you can use advanced search function advanced_search

Admin panel

  • The admin panel is used to manage orders, trips, users, prices and so on.
    you can use your ip + /adminlogin.html to access the admin panel in broswer
    (1) The login panel looks like this, you can use adminroot/adminroot to login admin_login (2) The admin's order list panel admin_order_list (3) The admin's travel list panel admin_travel_list

Deploy Train Ticket with k8s

  • please follow the below steps:
    k8s_deploy_steps

About Test Case

  • Please download "webdriver.chrome.driver". Modify its file path and "baseUrl". As the picture below. test_case_code The you can run this test case. You may also change some input parameters in test case as you like.

Clustering runtime environment(docker swarm):

build:

mvn clean package

docker-compose build

docker-compose up

docker swarm init --advertise-addr 10.141.211.161

docker swarm join-token manager

docker swarm join-token worker

app tag:

docker tag ts/ts-ui-dashboard 10.141.212.25:5555/cluster-ts-ui-dashboard

app local registry:

docker push 10.141.212.25:5555/cluster-ts-ui-dashboard

deploy app (docker swarm):

docker stack deploy --compose-file=docker-compose-swarm.yml my-compose-swarm

monitoring:

docker run -d -p 9000:9000 --name=portainer-ui-local -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer

http://10.141.211.161:9000


Fault Replication Branches list

  • You can check the fault replication details on following branches of this git repository

F1 ts-error-process-seq

F2 ts-error-reportui

F3 ts-error-docker-JVM

F4 ts-error-ssl

F5 ts-error-cross-timeout-status(chance)

F7 ts-external-normal

F8 ts-error-redis

F10 ts-error-normal

F11 ts-error-bomupdate

F12 ts-error-processes-seq-status(chance)

F13 ts-error-queue