Welcome to the Infinispan Console, the front-end application for the web console of the new Infinispan Server 15.x. This web application is built using Patternfly 5 and React 18.
Before you start using the Infinispan Console, please ensure you have a standalone Infinispan server running locally. The Infinispan server exposes the REST API that is utilized by this console.
In production environments, this console is bundled as a dependency using Maven. This dependency is then added to the Infinispan server bundle, making the console accessible from the server in production.
To run the latest release version using Docker, you can use the following commands:
docker run -it --rm -p 11222:11222 -e USER="admin" -e PASS="pass" infinispan/server
Alternatively, you can use the identities.batch
script running from the scripts
folder:
docker run -v $(pwd):/user-config -e IDENTITIES_BATCH="/user-config/identities.batch" -p 11222:11222 infinispan/server
You can also download the Infinispan server directly from the Infinispan website
To quickly get started with the Infinispan Console, follow these steps:
git clone https://github.com/infinispan/infinispan-console # clone the project
cd infinispan-console # navigate into the project directory
npm install # install infinispan-console dependencies
npm run start:dev # start the development server
Here are some useful development scripts for working with the Infinispan Console:
- Install development/build dependencies:
npm install
- Start the development server:
npm run start:dev
- Run a production build (outputs to "dist" directory):
npm run build
- Run the test suite:
npm run test
- Run the linter:
npm run lint
- Run the code formatter:
npm run format
- Launch a tool to inspect the bundle size:
npm run bundle-profile:analyze
By default, Console in development mode looking for the Infinispan Server REST URL at the http:\\localhost:11222\v2\rest
It's possible to replace host and port URL connection with INFINISPAN_SERVER_URL
environment variable which will be added to the REST endpoint
This console is built and released as a Maven dependency used in the infinispan server.
mvn clean install
Unit test run by default. To skip them use 'skipTests' property.
mvn clean install -DskipTests
Integration tests don't run by default locally. They always run in CI.
To run Cypress integration tests locally, follow these steps:
- Run the Infinispan server using
./run-server-for-e2e.sh
, which will download and run the server. - Run the following command with the
-De2e=true
flag:
mvn clean install -De2e=true
Generated with Favicon generator
We are using Weblate for translating the Infinispan Console into different languages. Weblate is a web-based translation platform that streamlines the translation process and allows collaboration among contributors.
You can access the translation project for Infinispan Console on Weblate here. If you're interested in contributing translations or improving existing ones, feel free to join the Weblate project and start translating.
- Visit the Weblate project for Infinispan Console.
- Sign up or log in to your Weblate account.
- Choose the language you want to work on from the available languages or add a new language for translation.
- Start translating the strings directly on the Weblate interface.
- Once you're satisfied with the translations, submit them, and they will be reviewed and integrated into the Infinispan Console.
Thank you for your contributions in making the Infinispan Console accessible to a broader audience!
- For accessibility compliance, we use react-axe
- To keep our bundle size in check, we use webpack-bundle-analyzer
- To keep our code formatting in check, we use prettier
- To keep our code logic and test coverage in check, we use jest
You can disable security in the REST API in the infinispan.xml
file of the server you are running.
Remove the security-realm="default"
from the endpoints
<endpoints socket-binding="default">
<hotrod-connector name="hotrod"/>
<rest-connector name="rest"/>
</endpoints>
Default security of the server uses credential authentication.
If you run a server without any user or password, the 'Support' popup should be displayed in the welcome page.
docker run -p 8080:8080 -e KEYCLOAK_USER=keycloak -e KEYCLOAK_PASSWORD=keycloak --name keycloak jboss/keycloak:12.0.2
- Connect to
http://localhost:8080
to access the Keycloak admin console. - Select
Add realm
and then uploaddata/infinispan-keycloak-realm.json
. - Create an Infinispan server configuration with the following security realm:
<security>
<security-realms>
<security-realm name="default">
<token-realm name="infinispan" auth-server-url="http://localhost:8080/auth/" client-id="infinispan-console">
<oauth2-introspection
introspection-url="http://localhost:8080/auth/realms/infinispan/protocol/openid-connect/token/introspect"
client-id="infinispan-server" client-secret="1fdca4ec-c416-47e0-867a-3d471af7050f"/>
</token-realm>
</security-realm>
</security-realms>
</security>
You can also copy the security realm from data/infinispan-security-realm.xml
.
- Run the console in dev mode. When you open the dev console in your browser, Keycloak prompts you for credentials.
- Enter the
admin/adminPassword
credentials. Keycloak redirects you to the dev console.