-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a top-level README, update contribution documentation #611
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
40d3615
Add a top-level README
riccardo-forina 3b827e2
Update the README for the UI
riccardo-forina 8e344a8
Update README.md
riccardo-forina ee4fd05
Update CONTRIBUTING.md
riccardo-forina aef3a11
Improve the API contributing doc
riccardo-forina 0731f53
Ignore env files across all repo
riccardo-forina 51abc53
Add CRs to quickly deploy the console on a local development environment
riccardo-forina 3e32a97
Minor updates - add links, delete outdated instructions
MikeEdgar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,7 @@ release.properties | |
# VS Code | ||
.factorypath | ||
.vscode | ||
|
||
|
||
# env files | ||
.env* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Console for Apache Kafka™ on Kubernetes | ||
|
||
This project is a web console designed to facilitate interactions with Apache Kafka™ instances on Kubernetes, leveraging the [Strimzi](https://strimzi.io) Cluster Operator. | ||
It is composed of two main parts: | ||
|
||
- a REST API backend developed with Java and [Quarkus](https://quarkus.io/) | ||
- a user interface (UI) built with [Next.js](https://nextjs.org/) and [PatternFly](https://patternfly.org) | ||
|
||
## Installing | ||
|
||
Please refer to the [installation README](./install/README.md) file for detailed information about how to install the latest release of the console in a Kubernetes cluster. | ||
|
||
## Contributing | ||
|
||
We welcome contributions of all forms. Please see the [CONTRIBUTING](./CONTRIBUTING.md) file for how to get started. | ||
Join us in enhancing the capabilities of this console for Apache Kafka™ on Kubernetes. | ||
|
||
## License | ||
|
||
This project is licensed under the Apache License 2.0 - see the LICENSE file for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Contributing to the API | ||
|
||
## Before you start | ||
|
||
Please check the project's [contributing guide](../CONTRIBUTING.md) first. | ||
|
||
## Prerequisites | ||
|
||
Ensure you have Kubernetes and Strimzi Cluster Operator installed on your system. Either [minikube](https://minikube.sigs.k8s.io/) or [OpenShifot Local](https://developers.redhat.com/products/openshift-local) are good options. | ||
One option to get started is to follow [Strimzi's Quick Starts](https://strimzi.io/quickstarts/). | ||
|
||
You will also need a working installation of: | ||
|
||
- Java (v17) | ||
- Maven (v3.8) | ||
|
||
### Coding Guidelines | ||
|
||
* We decided to disallow `@author` tags in the Javadoc: they are hard to maintain | ||
* Please properly squash your pull requests before submitting them. Fixup commits can be used temporarily during the review process but things should be squashed at the end to have meaningful commits. | ||
|
||
### Continuous Integration | ||
|
||
This project's CI is based on GitHub Actions, which means that everyone has the ability to automatically execute CI in their forks as part of the process of making changes. We ask that all non-trivial changes go through this process, so that the contributor gets immediate feedback, while at the same time keeping our CI fast and healthy for everyone. | ||
|
||
### Tests and documentation are not optional | ||
|
||
Do not forget to include or update tests in your pull requests and update any related documentation (reference documentation, javadoc...). | ||
|
||
### Installing Checkstyle | ||
|
||
Project uses checkstyle mvn plugin that is executed during `mvn validate` phase. Make sure to verify this | ||
passes before pushing to Github. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ Dockerfile | |
.dockerignore | ||
node_modules | ||
npm-debug.log | ||
README.md | ||
CONTRIBUTING.md | ||
.next | ||
.git | ||
.env.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
# Contributing to the UI | ||
|
||
This part of the project contains the user interface for the Kafka console, developed using Next.js and the [PatternFly](https://patternfly.org) UI library. | ||
|
||
## Prerequisites | ||
|
||
Please make sure you have working installations of: | ||
|
||
- node (v18+) | ||
- npm (v10+) | ||
|
||
To run a development version of the UI working in all its sections, you will need to install the console on a development cluster first. Please refer to the [install/README.md](../install/README.md) file for detailed instructions about how to do it. | ||
|
||
Alternatively, you can run the API module locally, but sections depending on the metrics exported on Prometheus will not work correctly. | ||
|
||
## Getting Started | ||
|
||
Create a `.env` file containing the details about where to find the API server, and some additional config. | ||
|
||
```.dotenv | ||
# the actual URLs will depend on how you installed the console | ||
BACKEND_URL=http://api.my-cluster | ||
CONSOLE_METRICS_PROMETHEUS_URL=http://prometheus.my-cluster | ||
LOG_LEVEL=info | ||
``` | ||
|
||
Install the required dependencies. | ||
|
||
```bash | ||
npm run install | ||
``` | ||
|
||
Then run the application. | ||
|
||
```bash | ||
npm run build | ||
npm run start | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the console user interface. | ||
|
||
## Build | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
This will create an optimized version of the application that can be deployed. | ||
|
||
## Developing the UI | ||
|
||
```bash | ||
npm run dev | ||
``` | ||
|
||
This will start the UI in dev mode, hosted (by default) on port 3000. When running successfully, you should see output similar to: | ||
|
||
``` | ||
[email protected] dev | ||
NODE_OPTIONS='-r next-logger' next dev | pino-pretty | ||
|
||
[16:11:06.206] INFO (console/14593): ▲ Next.js 14.1.4 | ||
[16:11:06.206] INFO (console/14593): - Local: http://localhost:3000 | ||
[16:11:06.206] INFO (console/14593): - Environments: .env.local | ||
[16:11:06.206] INFO (next.js/14593): | ||
prefix: "info" | ||
[16:11:08.981] INFO (next.js/14593): Ready in 2.9s | ||
prefix: "event" | ||
``` | ||
|
||
You can then access the UI on port 3000 or your localhost. | ||
|
||
Note: you will need the REST API running for the UI to work. See the README at the root of this repository for examples of how to do that. | ||
|
||
### Develop the components in isolation using Storybook | ||
|
||
```bash | ||
npm run storybook | ||
``` | ||
|
||
This will start Storybook, hosted on port 6006. | ||
|
||
### Test the UI | ||
|
||
```bash | ||
npm run build-storybook | ||
http-serve -p 6006 storybook-static | ||
|
||
# in a different terminal | ||
npm run test-storybook | ||
``` | ||
|
||
This will build Storybook and run all the relative unit tests. | ||
|
||
```bash | ||
npm run build | ||
npm run test | ||
``` | ||
|
||
This will run Playwright against the built application. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused, the
./install/README
file mentions yet another way of installing things, and is not clear what to use when.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also what's "the console" here?