DevZone is a web application where developers can register and post their favourite article/video posts.
- Users can register and login
- Authenticated user can create a new post under a category
- Authenticated user can delete own posts
- Admin user can delete any post
- Any user(including guest users) can view posts with pagination
- sort by posted date desc (default)
- by category
- by searching for a keyword in title
- SpringBoot
- Spring Data JPA
- Spring Security
- Postgres
- Thymeleaf
- Testcontainers
- ArchUnit
- Jib
- Gradle
- JUnit 5
- SonarQube
- JaCoCo
- GH Actions
- DockerCompose
- Kubernetes
- Helm Charts
- Skaffold
- ELK
- Prometheus
- Grafana
- Loki
- Gatling Performance Tests
- PlayWright E2E Tests
$ ./gradlew bootRun
$ ./run.sh start_app
$ cd deployment
$ ./kind/kind-cluster.sh create
$ ./run.sh k8sdeploy
$ curl http://localhost:30090/actuator
$ curl http://localhost/actuator
$ ./run.sh k8sundeploy
$ ./kind/kind-cluster.sh destroy
$ skaffold dev --port-forward --skip-tests=true
$ curl http://localhost:8080/actuator
$ ./gradlew gatlingRun
$ ./gradlew :playwright-e2e-tests:e2eTest
$ export CONFIG_FILE=dev.json
$ ./gradlew :playwright-e2e-tests:e2eTest
- Start ELK stack using
$ ./run.sh start_elk
- Go to http://localhost:5601/
- Analytics -> Discover -> create a data view -> Name: "devzone", Index pattern: "devzone*", Timestamp field: "@timestamp"
Note: Logstash is configured to read log files, so in order to initialize the index make few requests to devzone application to generate some logs.
- Start Prometheus, Grafana, Loki using
$ ./run.sh start_monitoring
- Few Dashboards are already pre-configured to show SpringBoot application Metrics
- Navigate to http://localhost:3000/datasources
- Click on Add datasource -> Select Loki
- Enter URL as http://loki:3100 (Host "loki" is based on name given to loki container in docker-compose-monitoring.yml file)
- Click on Save & Test
- Click on Explore in the Left Nav and Select Loki
- In Log browser input text enter
{job="devzone"}
- Application: http://localhost:8080
- Prometheus: http://localhost:9090
- Grafana: http://localhost:3000
- Kibana: http://localhost:5601/