Skip to content

Commit

Permalink
Release 1.1.0 with multi maven modules 'core' and 'cluster-api' (#169)
Browse files Browse the repository at this point in the history
Release 1.1.0 with multi maven modules 'core' and 'cluster-api'

Co-authored-by: muralibasani <[email protected]>
  • Loading branch information
muralibasani authored Nov 4, 2022
1 parent 6f1c6bd commit 1cc91a1
Show file tree
Hide file tree
Showing 935 changed files with 4,678 additions and 324 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ hs_err_pid*

.idea
target
logs

# OS generated files
.DS_Store
Expand Down
34 changes: 14 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
CORAL_DIST_PATH = coral/dist
version = 1.1.0

default:
@echo "TODO: ADD USAGE INSTRUCTIONS"
build_all: klaw_core cluster_api

$(CORAL_DIST_PATH): coral/index.html coral/src/*
pnpm --prefix coral build --assetsDir assets/coral --mode springboot
klaw_core:
cd core && mvn clean verify

src/main/resources/templates/coral/index.html: $(CORAL_DIST_PATH)
mkdir -p $(shell dirname $@)
cp -r $(CORAL_DIST_PATH)/index.html $@
cluster_api:
cd cluster-api && mvn clean verify

src/main/resources/static/assets/coral: $(CORAL_DIST_PATH)
cp -r $(CORAL_DIST_PATH)/assets/* $@
edit-core-config:
${EDITOR} core/target/classes/application.properties

.PHONY: enable-coral-in-springboot
enable-coral-in-springboot: src/main/resources/templates/coral/index.html src/main/resources/static/assets/coral
sed -i "" 's/klaw\.coral\.enabled=false/klaw\.coral\.enabled=true/' src/main/resources/application.properties
edit-cluster-api-config:
${EDITOR} cluster-api/target/classes/application.properties

.PHONY: disable-coral-in-springboot
disable-coral-in-springboot:
sed -i "" 's/klaw\.coral\.enabled=true/klaw\.coral\.enabled=false/' src/main/resources/application.properties

clean:
rm -rf src/main/resources/templates/coral
rm -rf src/main/resources/static/assets/coral
run-core:
java -jar core/target/klaw-$(version).jar

run-cluster-api:
java -jar cluster-api/target/cluster-api-$(version).jar --spring.config.location=cluster-api/target/classes/application.properties
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ For the versions available, see the [tags on this repository](https://github.com

![Architecture](https://github.com/aiven/klaw/blob/main/arch.png)

## Dependency project:

### ClusterApi
https://github.com/aiven/klaw-cluster-api

## Work in progress

The directory `/coral` contains a React app. It's an ongoing rewrite of the existing Klaw frontend. The app Frontend app is not used in Klaw at the moment.
Expand Down Expand Up @@ -106,9 +101,23 @@ The directory `/coral` contains a React app. It's an ongoing rewrite of the exis

## Install

### Manual
mvn clean install

and follow steps defined at https://klaw-project.io/docs
Builds two artifacts core/target/klaw-<version>.jar and cluster-api/target/cluster-api-<version>.jar

and follow steps defined at https://klaw-project.io/docs or run the binaries like below

java -jar core/target/klaw-<version>.jar

java -jar cluster-api/target/cluster-api-<version>.jar --spring.config.location=cluster-api/target/classes/application.properties

### With `make`

1. Clone this repo containing two maven modules (core and cluster-api) : `git clone [email protected]:aiven/klaw.git`
2. Run `make` to install dependencies and setup both Klaw Core and the Klaw-Cluster-Api
3. [Optional] edit any configs using `make edit-core-config` for Klaw Core or `make edit-cluster-api-config` for Klaw-Cluster-API
4. To run, you can use `make run-core` and `make run-cluster-api` in different terminal windows or you can run `make -j2 run-core run-cluster-api` to execute both (NOTE: this will mix output and make debugging harder)

## License

Expand Down
110 changes: 0 additions & 110 deletions ReleaseNotes.txt

This file was deleted.

55 changes: 55 additions & 0 deletions cluster-api/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.aiven</groupId>
<artifactId>klaw-project</artifactId>
<version>1.1.0</version>
</parent>

<artifactId>cluster-api</artifactId>
<packaging>jar</packaging>
<name>Klaw Cluster Api</name>
<description>Aiven Klaw - Cluster Api with connectivity to kafka clusters</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>11</java.version>
<!-- the list is sorted-->
<apache.commons.lang.version>3.12.0</apache.commons.lang.version>
<guava.version>31.1-jre</guava.version>
<kafka.client.version>3.3.1</kafka.client.version>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>${kafka.client.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${apache.commons.lang.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<layers>
<enabled>true</enabled>
</layers>
</configuration>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package io.aiven.klaw.clusterapi;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class KafkaClusterApiApplication {

public static void main(String[] args) {
SpringApplication.run(KafkaClusterApiApplication.class, args);
}
}
Loading

0 comments on commit 1cc91a1

Please sign in to comment.