{"id":17006404,"url":"https://github.com/mcruzdev/kafkamoon-api","last_synced_at":"2025-04-05T19:19:32.858Z","repository":{"id":235609644,"uuid":"790888222","full_name":"mcruzdev/kafkamoon-api","owner":"mcruzdev","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-30T19:14:15.000Z","size":885,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T17:11:44.527Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcruzdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-23T17:58:05.000Z","updated_at":"2024-04-30T19:14:18.000Z","dependencies_parsed_at":"2024-04-29T15:02:05.449Z","dependency_job_id":null,"html_url":"https://github.com/mcruzdev/kafkamoon-api","commit_stats":null,"previous_names":["mcruzdev/kafkamoon-api"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcruzdev%2Fkafkamoon-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcruzdev%2Fkafkamoon-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcruzdev%2Fkafkamoon-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcruzdev%2Fkafkamoon-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcruzdev","download_url":"https://codeload.github.com/mcruzdev/kafkamoon-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247386620,"owners_count":20930680,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T05:05:45.773Z","updated_at":"2025-04-05T19:19:32.839Z","avatar_url":"https://github.com/mcruzdev.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kafkamoon API\n\nWelcome to Kafkamoon, a Kafka management application. This project demonstrates integration\nwith [Kafka APIs](https://docs.confluent.io/kafka/kafka-apis.html) as part of a hiring test.\n\n\u003e [!NOTE]\n\u003e This README documentation contains information on how to run the Kafkamoon application locally using Docker or\n\u003e Kubernetes.\n\u003e If you want to see all the information about the decisions made in this project, [see here](https://docs.platformoon.com/#/explanation/README).\n\n## Table of Contents\n\n- [Kafkamoon API](#kafkamoon-api)\n    - [Table of Contents](#table-of-contents)\n    - [Getting Started](#getting-started)\n        - [Prerequisites](#prerequisites)\n        - [Running the project locally with Docker Compose](#running-the-project-locally-with-docker-compose)\n        - [Running the project locally on Kubernetes](#running-the-project-locally-on-kubernetes)\n        - [Running the project on EKS](#running-the-project-on-eks)\n\n## Getting Started\n\n### Prerequisites\n\nBefore you begin, make sure you have the following tools installed:\n\n- **Java:** Version 17\n- **Maven:** Version 3.9.6\n- **Docker**\n- **Docker Compose**\n- **Helm**\n- **KinD**\n- **eksctl**\n\n### Running the project locally with Docker Compose\n\nTo run the project locally, follow these steps:\n\n1. Clone the repository:\n\n```shell\ngit clone git@github.com:mcruzdev/kafkamoon.git\n```\n\n2. Navigate to the project directory:\n\n```shell\ncd kafkamoon-api\n```\n\n3. Build the application:\n\n```shell\nmake buildAll\n```\n\n4. Start the application using Docker Compose:\n\n```shell\ndocker-compose --profile local up -d\n```\n\nRunning with docker-compose you will have:\n\n- Kafka cluster with 3 replicas\n- [Kafkamoon documentation](http://localhost:3000)\n- [Kafkamoon API](http://localhost:8080/swagger-ui/index.html)\n\n\u003e [!NOTE]\n\u003e If you want to run only the infrastructure (Kafka) and Documentation run the following command:\n\u003e ```shell\n\u003e docker-compose --profile dev up -d\n\u003e ```\n\nAfter the application is running, you can interact with the following resources:\n\n* [OpenAPI specification](http://localhost:8080/swagger-ui.html) for exploring and interacting with the API.\n* [Kafkamoon Documentation](http://localhost:3000) for additional information and guidance.\n\n### Running the project locally on Kubernetes\n\nTo run the project locally on Kubernetes, follow these steps:\n\n1. Create the Kubernetes cluster:\n\n```shell\nkind create cluster --name local --config=kind/kind-cluster.yaml\n```\n\n2. Configure the context:\n\n```shell\nkubectl cluster-info --context kind-local\n```\n\n3. Install Kafkamoon Helm Chart\n\n```shell\nmake helm\n```\n\nThis installation contains:\n\n- Grafana\n- Prometheus\n- Kafka cluster (2 replicas)\n- Kafkamoon API (2 replicas)\n- Kafkamoon Documentation\n\n\u003e [!IMPORTANT]\n\u003e Keycloak only lives on production, see [here](https://keycloak.platformoon.com).\n\n**Accessing Grafana:**\n\n1. Get Grafana admin password to access Grafana Dashboards\n\n```shell\nkubectl get secret kafkamoon-grafana-operator-grafana-admin-credentials -o jsonpath=\"{.data['GF_SECURITY_ADMIN_PASSWORD']}\" | base64 --decode\n```\n\nThe output should like something like this:\n\n```shell\nabc123_d==%\n```\n\n\u003e [!IMPORTANT]\n\u003e Remove the last character (`%`) from the password.\n\n2. Do a `port-forward` command:\n\n```shell\nkubectl port-forward svc/kafkamoon-grafana-operator-grafana-service 8888:3000\n```\n\nAccess the Grafana through this [url](http://localhost:8888).\n\n\u003e [!IMPORTANT]\n\u003e The username is **admin**.\n\n**Accessing the application:**\n\n1. Do a `port-forward`:\n\n```shell\nkubectl port-forward svc/kafkamoon-api 8080:80\n```\n\n### Running the project on EKS\n\nFirst of all, you need:\n\n1. To have your AWS credentials (`~/.aws/credentials`) configured locally.\n\n\u003e Run the following command: `aws configure`\n\n2. To have a bucket created to store the `terraform.tfstate` file.\n\n3. Configure the bucket created on [main.tf](terraform-gitops/main.tf) file.\n\n4. Go to `terraform-gitops` directory\n\n```shell\ncd terraform-gitops\n```\n\n5. Execute `terraform init`\n\n```shell\nterraform init\n```\n\n6. Execute `terraform plan`\n\n```shell\nterraform plan\n```\n\nCheck the `terraform plan` output.\n\n7. Apply the terraform manifests\n\n```shell\nterraform apply --auto-approve\n```\n\n8. Update current kubeconfig\n\n```shell\naws eks update-kubeconfig --name \u003ccluster_name\u003e --region \u003cregion\u003e\n```\n\n9. Configure Amazon EBS CSI for EKS\n\nThe Kafka application creates a PVC and the following configuration is necessary to give all necessary rights.\n\n[See here how to configure Amazon EBS CSI for EKS](EKS_PVC_CONFIGURATION.md)\n\n10. Install helm charts\n\n```shell\nmake helmUpdate \u0026\u0026 make helmPkg \u0026\u0026 make helmInstall\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcruzdev%2Fkafkamoon-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcruzdev%2Fkafkamoon-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcruzdev%2Fkafkamoon-api/lists"}