2016-09-06 09:45:57 +00:00
2019-01-21 17:01:40 +00:00
[[_fuse_install_feature]]
2021-12-22 10:28:04 +00:00
===== Installing the Keycloak feature
2016-09-06 09:45:57 +00:00
2017-02-27 01:45:09 +00:00
You must first install the `keycloak` feature in the JBoss Fuse environment. The keycloak feature includes the Fuse adapter and all third-party dependencies. You can install it either from the Maven repository or from an archive.
2016-09-06 09:45:57 +00:00
2021-12-22 10:28:04 +00:00
====== Installing from the Maven repository
2016-09-06 09:45:57 +00:00
2021-12-22 10:28:04 +00:00
.Prerequisites
* You must be online and have access to the Maven repository.
2016-09-06 09:45:57 +00:00
2017-08-28 12:50:14 +00:00
ifeval::[{project_community}==true]
2021-12-22 10:28:04 +00:00
* For community it is sufficient to be online as all the artifacts and 3rd party dependencies should be available in the maven central repository.
2017-08-28 12:50:14 +00:00
endif::[]
ifeval::[{project_product}==true]
2016-09-09 04:26:32 +00:00
2021-12-22 10:28:04 +00:00
* For {project_name}, configure a proper Maven repository, so you can install the artifacts. For more information see the
https://access.redhat.com/maven-repository[JBoss Enterprise Maven repository] page.
+
2018-08-01 06:22:22 +00:00
Assuming the Maven repository is {maven_repository}, add the following to the `$FUSE_HOME/etc/org.ops4j.pax.url.mvn.cfg` file and add the repository to the list of supported repositories. For example:
2021-12-22 10:28:04 +00:00
+
2018-08-01 06:22:22 +00:00
[source,subs="attributes"]
2016-09-09 04:26:32 +00:00
----
2017-02-27 01:45:09 +00:00
org.ops4j.pax.url.mvn.repositories= \
2018-08-01 06:22:22 +00:00
{maven_repository}@id=redhat.product.repo
2016-09-09 04:26:32 +00:00
http://repo1.maven.org/maven2@id=maven.central.repo, \
...
----
2017-08-28 12:50:14 +00:00
endif::[]
2016-09-06 09:45:57 +00:00
2017-02-27 01:45:09 +00:00
2021-12-22 10:28:04 +00:00
.Procedure
. Start {fuseVersion}
. In the Karaf terminal type:
2017-03-21 14:20:38 +00:00
+
2016-12-05 12:31:38 +00:00
[source,subs="attributes"]
2016-09-06 09:45:57 +00:00
----
2017-08-28 12:50:14 +00:00
features:addurl mvn:org.keycloak/keycloak-osgi-features/{project_versionMvn}/xml/features
2016-09-06 09:45:57 +00:00
features:install keycloak
----
2017-02-27 01:45:09 +00:00
. You might also need to install the Jetty 9 feature:
2017-03-21 14:20:38 +00:00
+
2016-09-06 09:45:57 +00:00
[source]
----
features:install keycloak-jetty9-adapter
----
2016-11-24 15:48:35 +00:00
2017-02-27 01:45:09 +00:00
. Ensure that the features were installed:
2021-12-22 10:28:04 +00:00
+
2016-09-06 09:45:57 +00:00
[source]
----
features:list | grep keycloak
----
2017-02-27 01:45:09 +00:00
====== Installing from the ZIP bundle
2021-12-22 10:28:04 +00:00
This installation option is useful if you are offline or do not want to use Maven to obtain the JAR files and other artifacts.
.Procedure
2016-09-06 09:45:57 +00:00
2021-12-22 10:28:04 +00:00
ifeval::[{project_product}==true]
. Download the {project_name} Fuse adapter ZIP archive from the link:https://access.redhat.com/jbossnetwork/restricted/listSoftware.html?downloadType=distributions&product=core.service.rhsso[Sotware Downloads] site.
endif::[]
ifeval::[{project_community}==true]
. Download the {project_name} Fuse adapter ZIP archive from the link:https://www.keycloak.org/downloads[Downloads] site.
endif::[]
2016-09-06 09:45:57 +00:00
2017-02-27 01:45:09 +00:00
. Unzip it into the root directory of JBoss Fuse. The dependencies are then installed under the `system` directory. You can overwrite all existing jar files.
+
2017-08-28 12:50:14 +00:00
Use this for {fuseVersion}:
2017-02-27 01:45:09 +00:00
+
2016-12-05 12:31:38 +00:00
[source,subs="attributes"]
2016-09-06 09:45:57 +00:00
----
2017-04-05 21:35:25 +00:00
cd /path-to-fuse/jboss-fuse-6.3.0.redhat-254
2017-08-28 12:50:14 +00:00
ifeval::[{project_community}==true]
unzip -q /path-to-adapter-zip/keycloak-fuse-adapter-{project_versionMvn}.zip
endif::[]
ifeval::[{project_product}==true]
unzip -q /path-to-adapter-zip/rh-sso-{project_version}-fuse-adapter.zip
endif::[]
2016-09-06 09:45:57 +00:00
----
2017-02-27 01:45:09 +00:00
. Start Fuse and run these commands in the fuse/karaf terminal:
+
2016-12-05 12:31:38 +00:00
[source,subs="attributes"]
2016-09-06 09:45:57 +00:00
----
2017-08-28 12:50:14 +00:00
features:addurl mvn:org.keycloak/keycloak-osgi-features/{project_versionMvn}/xml/features
2016-09-06 09:45:57 +00:00
features:install keycloak
----
2017-02-27 01:45:09 +00:00
. Install the corresponding Jetty adapter. Since the artifacts are available directly in the JBoss Fuse `system` directory, you do not need to use the Maven repository.