This document provides detailed instructions on setting up the Event Shark project.
Before setting up the project, ensure you have the following prerequisites installed:
- Docker
- Docker Compose
- Git
The project relies on the following dependencies:
- Kafka
- Schema Registry
- Redpanda
-
Clone the repository:
git clone https://github.com/dipjyotimetia/EventShark.git cd EventShark -
Build the Docker images:
docker-compose build
-
Start the services:
docker-compose up -d
-
Verify the setup:
- Check if the services are running:
docker-compose ps
- Ensure the application is healthy by accessing the health endpoint:
curl http://localhost:8083/health
- Check if the services are running:
-
Access the Kafka console:
- Open your browser and navigate to
http://localhost:8086to access the Kafka console.
- Open your browser and navigate to
-
Create topics and schemas:
- The topics and schemas are automatically created during the setup process. You can verify them using the Kafka console.
-
Run the tests:
- To run the tests, use the following command:
make test
- To run the tests, use the following command:
-
Build the project:
- To build the project, use the following command:
make build
- To build the project, use the following command:
-
Clean up:
- To clean up the Docker containers and images, use the following command:
make clean
- To clean up the Docker containers and images, use the following command:
If you need to convert Avro schemas to JSON for use with the Schema Registry, use the utility in script/avsc2json. See script/avsc2json/readme.md for details.
- If Docker containers fail to start, check logs with
docker-compose logs. - If topics or schemas are missing, ensure the
init-topicservice completes successfully. - For port conflicts, ensure ports 8083, 8086, 8081, 8082, 9092, and 29092 are free.
- For schema errors, verify your Avro schemas and use the AVSC to JSON utility.
By following these steps, you should have the Event Shark project set up and running on your local machine.