- Attendance WebApp
- Quickstart
- Local Setup
- References
Attendance WebApp is a proof of concept to improve the way attendance is managed at AUT university.
The application uses maven, J2EE, primefaces, gson.
maven {
url = uri("https://repository.primefaces.org")
}
The idea is that you have a short timeframe to submit a random generated code by the lecturer so that attendance can be registered in the system.
The application is a proof of concept for Service orientation and Service interoperability in the cloud
Security Warnings to check GitHub found 2 vulnerabilities on aleon1220/multi-cloud-WebApp-Attendance's default branch (2 moderate). To find out more, visit: This project security report
https://github.com/aleon1220/multi-cloud-WebApp-Attendance/security/dependabot
2018 project with a lot of things to change
- Simplification of used services
- Streamline app to use 100% rest and deprecate SOAP and WSDL
- Create a simple test OpenLDAP instance for users and roles
- Host the WebApp in Azure
- Host the backend functionality in AWS
- use diagrams.net for the diagrams
- Gradle Build Web Package
build and test the WebArchive file. Generates the .WAR file in
build/libs/*.war
gradle clean build --console plain --warning-mode all
- Gradle Check the generated version from the build.gradle.kts
gradle getAppversion
- Run WebApp Run the tomcat server with the latest pre-built WAR web Archive file Run from Docker Hub
docker run -itd --publish 8080:8080 --name attendance_webapp_container aleon1220/soa:latest
Tested in Win11 with WSL, Github codespaces and Linux Ubuntu 22
- Installation process: project a Java project JEE. Import in any IDE and build with gradle or maven. Build docker image and run
- Software dependencies: dependencies are described in pom.xml file
- Latest releases by using git tags
- API references. API docs
- Clone repo HTTPS
git clone https://github.com/aleon1220/multi-cloud-WebApp-Attendance.git
- Clone Repo SSH
git clone git@github.com:aleon1220/multi-cloud-WebApp-Attendance.git
- open repo in chosen IDE IDEs can be Eclipse, IntelliJ (suggested) or use online IDE (Github codespaces)
maven has been deprecated and moved to maven
- as a pre-requisite you must have access to the shared vault
- login in the CLI
# Linux Ubuntu tested 2023-12-10
op signin
- inject the secrets for testing Authentication property file
op inject -i token_auth.properties.tpl -o token_auth.properties
- inject the secrets for Testing property file
op inject -i secrets.env.tpl -o secrets.env
- inject the secrets for Testing docker-compose
op inject -i .env.tpl -o .env
Should do validations
gradle check --warning-mode all
- Build the app image with Docker. Deploy .WAR file in Tomcat refer to https://hub.docker.com/_/tomcat
docker build --build-arg APP_WAR_FILE_VERSION=$APP_WAR_FILE_VERSION --tag aleon1220/soa:$APP_WAR_FILE_VERSION .
if you need to edit the Dockerfile and upgrade the servlet container Tomcat version
- 7.0.109 =
TOMCAT_VERSION_DOCKER_TAG="7.0.109-jdk8-openjdk"
- 9.0.78 =
TOMCAT_VERSION_DOCKER_TAG="9.0.78-jre8"
for particular versions check the image in Docker hub
Test the immutable webapp from Docker
docker run -itd --publish 8080:8080 aleon1220/soa:$APP_WAR_FILE_VERSION
Test the container webapp after building the image locally
docker run -itd --publish 8080:8080 --name attendance_webapp_container aleon1220/soa:$APP_WAR_FILE_VERSION
- Get the name of the running container
CONTAINER_NAME=$(docker container ls --all --filter publish=8080 --format "{{.Names}}")
- The URl is hostname:8080/$CONTEXT
- Get the context of the webapp
TOMCAT_URL="http://$(hostname):8080/Attendance-$APP_WAR_FILE_VERSION"
- Access the Docker container via CLI
docker container exec -it $CONTAINER_NAME /bin/bash
- clean up docker container environment
docker stop $(docker ps --quiet)
docker rm $(docker container ls --all --quiet)
- inject the secrets for Testing docker-compose
op inject -i .env.tpl -o .env
- single variable
export LDAP_ADMIN_PASS=$(op read "op://uqbpxejq7gifvi6mg3c7xxokre/jvuj7juvlxlg7delckucvidqhi/password")
- go to diagrams.net
- open the file project-diagrams.drawio XML file with the diagrams
- Explore > export images to convinience and update this README