Skip to content

devonfw/my-thai-star

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Thai Star

develop: build-status

This repository is an ADCS Capgemini initiative that hosts an application reference called My Thai Star. This application is about the management of a restaurant.

Technologies

This project is intended to be an example for the usage of new technologies in web development. Here is a list of all technologies involved:

  • Angular

Client-side developed using the latest version of this framework: Angular 10.

  • Java

Server-side developed using the 2020.08.001 version of devon4j.

  • Node

Server-side developed using the basics of the NestJS framework. A node.js framework built on top of Express.js based on TypeScript language. This server-side backend is based on the devon4node incubator.

  • .NET

Server-side developed using the dotnet framework.

  • Swagger

Used this technology to define contracts between client-side(s) and server-side(s). So necessary when every back-end of the project (.NET, NodeJS and Java) is prepared to match with the Angular client exactly in the same way, being transparent to the user.

  • Production Line

Tool used for Continuous Integration and Continuous Delivery. Inside of this Jenkins and SonarQube are used. Also used Docker for the deployment in an external server.

  • Mr Checker

MrChecker is a testing framework included in devonfw with several useful modules, from which we will focus on the Selenium Module, a module designed to make end-to-end testing easier to implement. More about it here.

Deprecated

Some folders have been marked as deprecated. They have not been removed for information purposes and in case it is necessary to recover previous work. They are the following:

  • graphQL

  • serverless

Use them at your own risk.

Deployment

From code

This application can be easily deployed using Docker and docker-compose.

$ docker-compose up

As both Angular and Java Dockerfile(s) are using multi-stage build, apps are being built in their development environments (node for Angular and maven for Java) and then deployed in nginx and tomcat respectively.

3 Docker containers will be created:

CONTAINER ID        IMAGE                      COMMAND                  CREATED             STATUS              PORTS                                        NAMES
23921e672489        mythaistar_java            "catalina.sh run"        3 minutes ago       Up 3 minutes        8080/tcp                                     mts_java
1acf2d6b6653        mythaistar_reverse-proxy   "nginx -g 'daemon of…"   3 minutes ago       Up 3 minutes        0.0.0.0:443->443/tcp, 0.0.0.0:8080->80/tcp   mts_reverse_proxy
fdb63e26d299        mythaistar_angular         "nginx -g 'daemon of…"   3 minutes ago       Up 3 minutes        80/tcp, 443/tcp                              mts_angular

The usage of the reverse-proxy only uses 1 port of the Docker host (where this is deployed), the 8080. All internal communication of containers is done using docker alias of services.

From artifact

If we are using a CICD pipeline and we store the artifact on nexus, we can also deploy it without recompile all code. For this purpose there are three deployment pipelines:

  • deployment: deploy all application with a reserve-proxy

  • java: deploy only the java application

  • angular: deploy angular application + reverse-proxy (you must run the java deployment at least once before running this deployment)

The result of this deployment will be the same as in the deployment from code, but instead of compiling the artifact again downloads it from nexus. All resources (docker-compose.yml, Dockerfiles and nginx.conf) are stored in the reverse-proxy folder.

In Kubernetes

If you are using k8s yaml files (inside "k8s" folder) and deploy in Kubernetes Clusters, then, please refer the following:

  • For AWS EKS Cluster, click here.

  • For Azure AKS Cluster, click here.