KEYCLOAK-1415 Add CLI scripts to WildFly and EAP overlay bundles.
This commit is contained in:
parent
5695677873
commit
ef49bd685e
6 changed files with 43 additions and 11 deletions
|
@ -40,6 +40,14 @@
|
|||
<source>src/main/providers/README.txt</source>
|
||||
<outputDirectory>standalone/configuration/providers</outputDirectory>
|
||||
</file>
|
||||
<file>
|
||||
<source>cli/keycloak-prepare.cli</source>
|
||||
<outputDirectory>bin</outputDirectory>
|
||||
</file>
|
||||
<file>
|
||||
<source>cli/keycloak-install.cli</source>
|
||||
<outputDirectory>bin</outputDirectory>
|
||||
</file>
|
||||
</files>
|
||||
|
||||
</assembly>
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
/extension=org.keycloak.keycloak-server-subsystem/:add(module=org.keycloak.keycloak-server-subsystem)
|
||||
/subsystem=keycloak-server:add(web-context=auth)
|
|
@ -0,0 +1,8 @@
|
|||
/subsystem=datasources/data-source=KeycloakDS/:add(connection-url="jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE",driver-name=h2,jndi-name=java:jboss/datasources/KeycloakDS,password=sa,user-name=sa,use-java-context=true,enabled=true)
|
||||
/subsystem=logging/logger=org.jboss.resteasy.resteasy_jaxrs.i18n/:add(level=ERROR)
|
||||
/subsystem=security/security-domain=keycloak/:add
|
||||
/subsystem=security/security-domain=keycloak/authentication=classic:add
|
||||
/subsystem=security/security-domain=keycloak/authentication=classic/login-module=keycloak/:add(flag=required,code=org.keycloak.adapters.jboss.KeycloakLoginModule)
|
||||
/subsystem=security/security-domain=sp/:add(cache-type=default)
|
||||
/subsystem=security/security-domain=sp/authentication=classic:add
|
||||
/subsystem=security/security-domain=sp/authentication=classic/login-module=saml/:add(flag=required,code=org.picketlink.identity.federation.bindings.wildfly.SAML2LoginModule)
|
|
@ -62,6 +62,10 @@
|
|||
<source>${project.build.directory}/unpacked/keycloak-${project.version}/standalone/configuration/keycloak-server.json</source>
|
||||
<outputDirectory>standalone/configuration</outputDirectory>
|
||||
</file>
|
||||
<file>
|
||||
<source>cli/keycloak-install.cli</source>
|
||||
<outputDirectory>bin</outputDirectory>
|
||||
</file>
|
||||
</files>
|
||||
|
||||
</assembly>
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
/subsystem=datasources/data-source=KeycloakDS/:add(connection-url="jdbc:h2:${jboss.server.data.dir}/keycloak;AUTO_SERVER=TRUE",driver-name=h2,jndi-name=java:jboss/datasources/KeycloakDS,password=sa,user-name=sa,use-java-context=true)
|
||||
/extension=org.keycloak.keycloak-server-subsystem/:add(module=org.keycloak.keycloak-server-subsystem)
|
||||
/subsystem=keycloak-server:add(web-context=auth)
|
|
@ -49,9 +49,9 @@
|
|||
<literal>keycloak-overlay-&project.version;.zip</literal> or <literal>keycloak-overlay-&project.version;.tar.gz</literal>.
|
||||
Once downloaded extract into the root directory of your WildFly installation. To start WildFly with Keycloak
|
||||
run:
|
||||
<programlisting>keycloak-&project.version;/bin/standalone.sh --server-config=standalone-keycloak.xml</programlisting>
|
||||
<programlisting><WILDFLY_HOME>/bin/standalone.sh --server-config=standalone-keycloak.xml</programlisting>
|
||||
or:
|
||||
<programlisting>keycloak-&project.version;/bin/standalone.bat --server-config=standalone-keycloak.xml</programlisting>
|
||||
<programlisting><WILDFLY_HOME>/bin/standalone.bat --server-config=standalone-keycloak.xml</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
Once the server is started log into the admin console at
|
||||
|
@ -60,15 +60,9 @@
|
|||
enter in a new password.
|
||||
</para>
|
||||
<para>
|
||||
To add Keycloak to other sever configurations (standalone.xml, standalone-ha.xml, etc.) open
|
||||
<literal>standalone/configuration/standalone-keycloak.xml</literal> and the configuration you want to add it
|
||||
to, for example <literal>standalone/configuration/standalone.xml</literal>. From <literal>standalone-keycloak.xml</literal>
|
||||
you need to copy 3 elements:
|
||||
<itemizedlist>
|
||||
<listitem><literal><extension module="org.keycloak.keycloak-server-subsystem"/></literal></listitem>
|
||||
<listitem><literal><datasource jndi-name="java:jboss/datasources/KeycloakDS" ...></literal></listitem>
|
||||
<listitem><literal><subsystem xmlns="urn:jboss:domain:keycloak-server:1.1" ...></literal></listitem>
|
||||
</itemizedlist>
|
||||
To add Keycloak to other sever configurations (standalone.xml, standalone-ha.xml, etc.) start the server with
|
||||
the desired server-config. Then execute the following CLI script:
|
||||
<programlisting><WILDFLY_HOME>/bin/jboss-cli.sh -c --file=keycloak-install.cli</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
<section>
|
||||
|
@ -76,6 +70,19 @@
|
|||
<para>
|
||||
Same procedure as WildFly 9.0.0.Final, but download <literal>keycloak-overlay-eap6-&project.version;.zip</literal> or <literal>keycloak-overlay-eap6-&project.version;.tar.gz</literal>.
|
||||
</para>
|
||||
<para>
|
||||
However, for EAP, adding Keycloak to other sever configurations (standalone.xml, standalone-ha.xml, etc.) requires two CLI scripts. Start the server with
|
||||
the desired server-config. Then execute the following CLI scripts with a restart in between:
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<programlisting><EAP_HOME>/bin/jboss-cli.sh -c --file=keycloak-prepare.cli</programlisting>
|
||||
</listitem>
|
||||
<listitem>Restart the server with the same server-config.</listitem>
|
||||
<listitem>
|
||||
<programlisting><EAP_HOME>/bin/jboss-cli.sh -c --file=keycloak-install.cli</programlisting>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</section>
|
||||
<section>
|
||||
<title id="demo_install">Install Development Bundle</title>
|
||||
|
|
Loading…
Reference in a new issue