The purpose of this repository is to provide a monitoring solution for a mythological application. The repository includes configurations and code for setting up and running various services and applications.
docker/docker-compose.yml: Contains the configuration for running Prometheus and Grafana as Docker containers.docker/prometheus/prometheus.yml: Defines the global settings and scrape configurations for Prometheus.docker/prometheus/targets_smart-city.json: Contains the targets for thesmart-cityjob, specifying thesmart-mobilityandpaymentservices.docker/grafana/config: Sets the admin user and password for Grafana.payment: Contains the source code for the Payment application, built using Spring Boot and Kotlin/Java.smartmobility: Contains the source code for the Smart Mobility application, built using Spring Boot and Java.pom.xml: Defines the parent project and includes modules for the Payment and Smart Mobility applications.scripts: Contains various scripts for building, running, and managing the applications and services.
Ensure you have Docker and Docker Compose installed on your machine.
- Navigate to the root directory of the repository.
- Run the
scripts/setup_all.shscript to build the applications and start the Docker containers. This script will:- Stop and remove any existing Docker containers.
- Build the applications using Maven.
- Start the Docker containers for Prometheus, Grafana, Smart Mobility, and Payment services.
- Wait for the Docker containers to start. You can check the status of the containers using the
docker pscommand. - Access the applications and services:
- Prometheus:
http://localhost:9090 - Grafana:
http://localhost:3000 - Smart Mobility:
http://localhost:8090 - Payment:
http://localhost:8091
- Prometheus:
- The
docker/docker-compose.ymlfile contains the configuration for running Prometheus and Grafana as Docker containers. - Prometheus is configured to use the
docker/prometheus/prometheus.ymlfile located in thedocker/prometheus/directory. - Grafana is configured to use the provisioning files located in the
docker/grafana/provisioning/directory. - The Prometheus configuration file,
docker/prometheus/prometheus.yml, defines the global settings and scrape configurations. - The
docker/prometheus/targets_smart-city.jsonfile contains the targets for thesmart-cityjob, specifying thesmart-mobilityandpaymentservices along with their respective ports and labels. - The Grafana configuration file,
docker/grafana/config, sets the admin user and password for Grafana. - Start the Docker containers using the
docker-composecommand to bring up the Prometheus and Grafana services along with thesmart-mobilityandpaymentservices.