From 625e7d2b21d87ec3d56319f2fb1eaaf44905f39c Mon Sep 17 00:00:00 2001 From: Michael Edgar Date: Wed, 15 May 2024 10:34:27 -0400 Subject: [PATCH] Minor updates - add links, delete outdated instructions Signed-off-by: Michael Edgar --- CONTRIBUTING.md | 2 +- README.md | 12 ++-- api/CONTRIBUTING.md | 57 ++----------------- quickstart/01-kafka.yaml | 29 ---------- quickstart/02-console.yaml | 109 ------------------------------------- ui/CONTRIBUTING.md | 4 +- 6 files changed, 14 insertions(+), 199 deletions(-) delete mode 100644 quickstart/01-kafka.yaml delete mode 100644 quickstart/02-console.yaml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 85cca9e55..abeafae93 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,7 @@ The DCO text is also included verbatim in the [dco.txt](dco.txt) file in the roo ## Reporting an issue -This project uses GitHub issues to manage the issues. Open an issue directly in GitHub. you can also open JIRA issues at https://issues.redhat.com/browse/MGDSTRM +This project uses GitHub issues to manage the issues. Open an issue directly in GitHub. If you believe you found a bug, and it's likely possible, please indicate a way to reproduce it, what you are seeing and what you would expect to see. diff --git a/README.md b/README.md index 3aa685e13..6fe6598dc 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,18 @@ # 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: +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 Quarkus -- a user interface (UI) built with Next.js and [PatternFly](https://patternfly.org) +- 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 [install/README.md](./install/README.md) file for detailed information about how to install the Console. +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.md](./CONTRIBUTING.md) file for how to get started. +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 diff --git a/api/CONTRIBUTING.md b/api/CONTRIBUTING.md index 5ad66518f..548405810 100644 --- a/api/CONTRIBUTING.md +++ b/api/CONTRIBUTING.md @@ -6,7 +6,7 @@ Please check the project's [contributing guide](../CONTRIBUTING.md) first. ## Prerequisites -Ensure you have Kubernetes and Strimzi Cluster Operator installed on your system. +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: @@ -21,60 +21,13 @@ You will also need a working installation of: ### Continuous Integration - kafka-admin-api 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. +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 -Don't forget to include tests in your pull requests. -Also don't forget the documentation (reference documentation, javadoc...). +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` pase. -Please follow your ide setup for checkstyle. For example for intelij: - -https://plugins.jetbrains.com/plugin/1065-checkstyle-idea - -## Regenerating OpenAPI file - -PRs that make changes in the API should update openapi file by executing: - -``` -mvn -Popenapi-generate process-classes -``` - -Please commit generated files along with the PR for review. - -### Interacting with local kafka - -1. Creating topic - -Use the `kafka-topics.sh` tool to manage topics. kafka-topics.sh is part of the [Apache Kafka distribution](https://kafka.apache.org/downloads) and is found in the bin directory. - -``` -kafka-topics.sh --create --bootstrap-server localhost:9092 --partitions=3 --replication-factor=1 --topic test --command-config ./hack/binscripts.properties -``` - -2. Produce messages using kcat - -Use [`kcat`](https://github.com/edenhill/kcat) to produce messages. - -``` -kcat -b localhost:9092 -F ./hack/kcat.properties -P -t test -``` - - -4. Consume messages - -Use [`kcat`](https://github.com/edenhill/kcat) to consume messages. - -``` -kcat -b localhost:9092 -F ./hack/kcat.properties -C -t test -``` - -6. Interact with the API to view results - -` -curl -s -u admin:admin-secret http://localhost:8080/api/v1/consumer-groups | jq -` - +Project uses checkstyle mvn plugin that is executed during `mvn validate` phase. Make sure to verify this +passes before pushing to Github. diff --git a/quickstart/01-kafka.yaml b/quickstart/01-kafka.yaml deleted file mode 100644 index a2fa0e18d..000000000 --- a/quickstart/01-kafka.yaml +++ /dev/null @@ -1,29 +0,0 @@ -apiVersion: kafka.strimzi.io/v1beta2 -kind: Kafka -metadata: - name: my-cluster -spec: - kafka: - version: 3.7.0 - replicas: 1 - listeners: - - name: plain - port: 9092 - type: internal - tls: false - config: - offsets.topic.replication.factor: 1 - transaction.state.log.replication.factor: 1 - transaction.state.log.min.isr: 1 - default.replication.factor: 1 - min.insync.replicas: 1 - inter.broker.protocol.version: "3.7" - storage: - type: ephemeral - zookeeper: - replicas: 3 - storage: - type: ephemeral - entityOperator: - topicOperator: {} - userOperator: {} diff --git a/quickstart/02-console.yaml b/quickstart/02-console.yaml deleted file mode 100644 index 063d8c3d2..000000000 --- a/quickstart/02-console.yaml +++ /dev/null @@ -1,109 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: console-api -spec: - replicas: 1 - selector: - matchLabels: - app: console-api - template: - metadata: - labels: - app: console-api - spec: - containers: - - name: console-api - image: quay.io/eyefloaters/console-api:latest - ports: - - containerPort: 8080 - env: - - name: CONSOLE_KAFKA_MC - value: kafka/my-cluster - - name: CONSOLE_KAFKA_MC_BOOTSTRAP_SERVERS - value: my-cluster-kafka-0.my-cluster-kafka-brokers.kafka.svc:9092 ---- -apiVersion: v1 -kind: Service -metadata: - name: console-api -spec: - selector: - app: console-api - type: NodePort - ports: - - protocol: TCP - port: 8080 - name: api ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: ui -spec: - replicas: 1 - selector: - matchLabels: - app: ui - template: - metadata: - labels: - app: ui - spec: - containers: - - name: ui - image: quay.io/eyefloaters/console-ui:latest - ports: - - containerPort: 3000 - env: - - name: HOSTNAME - value: 0.0.0.0 - - name: NEXTAUTH_URL - value: http://localhost:3000 - - name: NEXTAUTH_URL_INTERNAL - value: http://console-ui:3000 - - name: NEXTAUTH_SECRET - value: changeme - - name: BACKEND_URL - value: "http://console-api:8080" ---- -apiVersion: v1 -kind: Service -metadata: - name: ui -spec: - selector: - app: ui - type: NodePort - ports: - - protocol: TCP - port: 3000 - name: web ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: console-api-kafka-watch-all -rules: - - verbs: - - get - - watch - - list - apiGroups: - - kafka.strimzi.io - resources: - - kafkas - - kafkatopics ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: console-api-kafka-watch-all -subjects: - - kind: ServiceAccount - name: default - namespace: console -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: console-api-kafka-watch-all diff --git a/ui/CONTRIBUTING.md b/ui/CONTRIBUTING.md index f5289f076..d85599625 100644 --- a/ui/CONTRIBUTING.md +++ b/ui/CONTRIBUTING.md @@ -37,7 +37,7 @@ npm run build npm run start ``` -Open [http://localhost:3000](http://localhost:3000) with your browser to see the console. +Open [http://localhost:3000](http://localhost:3000) with your browser to see the console user interface. ## Build @@ -97,4 +97,4 @@ npm run build npm run test ``` -This will run Playwright against a production build of the application. +This will run Playwright against the built application.