Ensure you have JDK 17, Maven 3.5.4 (or newer) and Git installed
First clone the Federated Catalogue repository:
git clone git@gitlab.eclipse.org:eclipse/xfsc/cat/fc-service.gitGo to /docker folder. Use docker compose to start the stack needed to use the Catalog:
docker-compose upDevelopment option that starts the stack with locally build jar files:
- to build the jars first run
mvn clean installin the root folder of this repository - then start it with
dev.envprofile from/dockerfolder:
docker-compose --env-file dev.env up --buildWhen all components started you should setup Keycloak which is used as Identity and Access Management layer in the project. Add keycloak host to your local hosts file:
127.0.0.1 key-server
- Open keycloak admin console at
http://key-server:8080/admin, withadmin/admincredentials, selectgaia-xrealm. - Go to
Clientssection, selectfederated-catalogueclient, go to Credentials tab, Regenerate client Secret, copy it and set to/docker/.envfile inFC_CLIENT_SECRETvariable - Go to users and create one to work with. Set its username and other attributes, save. Then go to Credentials tab, set its password twice, disable Temporary switch, save. Go to Role Mappings tab, in Client Roles drop-down box choose
federated-catalogueclient, selectRo-MU-CArole and add it to Assigned Roles. - Restart fc-service-server container to pick up changes applied at the second step above.
Now you can test FC Service with Demo Portal web app. Go to http://localhost:8088 in your browser and press Login button. You should be redirected to Keycloak Login page. Use user credentials you created above..
To run all tests as part of this project run mvn test in the root folder of the repository.
This method only requires to have a working instance of docker installed on your system.
Go to the main folder of this repository and run the following command:
# Build an image for the Catalog server
docker build --target fc-service-server -t fc-service-server .
# Build an image for the Demo-Portal app
docker build --target fc-demo-portal -t fc-demo-portal . Note: initial build may take up to 5 minutes to download all required libraries. Subsequent builds take much less time.
For a build without docker you can use the Maven Jib plugin to build container for the catalogs components.
- Set the Environment variables
CI_REGISTRY,CI_REGISTRY_USERNAMEandCI_REGISTRY_PASSWORD. - Run following command in the root folder of this repository:
mvn compile jib:build