Run Klaw from source
Klaw is a Java project. Follow the below steps to run this project from the source.
-
Download the latest code from the Klaw GitHub repository.
tipYou can also clone the repository to use the "bleeding edge" version if you wish.
-
Experimental UI Configuration
A redesigned user interface for Browse topics, providing a new look and feel for managing Apache Kafka® topics. It consists of changes to the layout, styling, and overall appearance of the interface, as well as improvements to make browsing and working topics easier, more efficient, and more accessible. This new look and feel is achieved by switching to React.
The redesigned UI is enabled by default since Release 2.4.0. If you want to use Klaw without the preview, for now, you can disable it:
- Configure the property
klaw.coral.enabled
in theapplication.properties
file tofalse
in the module: core.
- Configure the property
-
Configure Klaw Cluster API access
- Configure the property
klaw.clusterapi.access.base64.secret
in theapplication.properties
file with a base64 string in the module:core
. - Configure the property
klaw.clusterapi.access.base64.secret
in theapplication.properties
file with the above base64 string in the module:cluster-api
.
echo "ThisIsExactlyA32CharStringSecret" | base64
VGhpc0lzRXhhY3RseUEzMkNoYXJTdHJpbmdTZWNyZXQK[convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("ThisIsExactlyA32CharStringSecret"))
VGhpc0lzRXhhY3RseUEzMkNoYXJTdHJpbmdTZWNyZXQ= - Configure the property
-
Build the project by running
./mvnw clean package
for Linux(bash) ormvnw clean package
for Windows, from the top level of the project directory. This will build JAR files in thetarget/
directories of each module:core
andcluster-api
.node, npm, and pnpm are also installed locally (required for React UI assets) through maven execution plugins.
If the build runs into an error while installing node/npm/pnpm, you can
- Disable the execution plugins (for node/npm/pnpm) in module
core/pom.xml
- Manually install node/npm/pnpm and copy assets by following the procedure here. Manual installation of React
- Disable the execution plugins (for node/npm/pnpm) in module
-
Start the API components by running its JAR files:
-
Run with script
In the bin directory of the repository, run the script
run-klaw.sh
for Mac or Linux, which starts both Klaw Core and Klaw Cluster API applications.
Alternatively
-
Run with commands
java -jar klaw-clusterapi-<version>.jar
To pass additional configuration, pass an additional parameter like
--spring.config.location=target/classes/application.properties
Start the web UI by running its JAR file:
java -jar klaw-<version>.jar
To pass additional configurations, include them as follows:
--spring.config.location=target/classes/application.properties
-
-
Access the web interface using the URL:
-
Log in as the administrator user to get started.
- Username:
superadmin
- Password:
kwsuperadmin123$$
(for Klaw releases 2.5.0 and older) - Password:
welcometoklaw
(starting from the Klaw 2.6.0 release)
- Username:
Next steps
Once you have finished verifying your installation, we recommend you follow the documentation in Configure Klaw with wizard.