keycloak-scim/testsuite/performance/infinispan/configure.xml

79 lines
3.9 KiB
XML

<project name="keycloak-server-configuration" basedir="." >
<target name="check-configuration-state">
<available property="configured" file="${infinispan.unpacked.home}/../configured"/>
<available property="management.configured" file="${infinispan.unpacked.home}/../management-configured"/>
<echo>configured: ${configured}</echo>
<echo>management.configured: ${management.configured}</echo>
</target>
<target name="configure-infinispan" unless="configured" depends="check-configuration-state">
<!-- configuration common for both DC sites-->
<chmod perm="ug+x">
<fileset dir="${infinispan.unpacked.home}/bin">
<include name="*.sh"/>
</fileset>
</chmod>
<copy file="${scripts.dir}/jboss-cli/add-private-network-interface.cli" todir="${infinispan.unpacked.home}/bin" />
<exec executable="./${jboss.cli.script}" dir="${infinispan.unpacked.home}/bin" failonerror="true">
<arg value="--file=add-private-network-interface.cli"/>
</exec>
<!-- DC-specific configuration (dc1 and dc2) -->
<copy file="${infinispan.unpacked.home}/standalone/configuration/clustered.xml"
tofile="${infinispan.unpacked.home}/standalone/configuration/clustered-dc1.xml" />
<move file="${infinispan.unpacked.home}/standalone/configuration/clustered.xml"
tofile="${infinispan.unpacked.home}/standalone/configuration/clustered-dc2.xml" />
<copy file="${scripts.dir}/jboss-cli/add-keycloak-caches.cli" tofile="${infinispan.unpacked.home}/bin/add-keycloak-caches-dc1.cli" >
<filterset>
<filter token="LOCAL_SITE" value="dc1"/>
<filter token="REMOTE_SITE" value="dc2"/>
</filterset>
</copy>
<copy file="${scripts.dir}/jboss-cli/add-keycloak-caches.cli" tofile="${infinispan.unpacked.home}/bin/add-keycloak-caches-dc2.cli" >
<filterset>
<filter token="LOCAL_SITE" value="dc2"/>
<filter token="REMOTE_SITE" value="dc1"/>
</filterset>
</copy>
<exec executable="./${jboss.cli.script}" dir="${infinispan.unpacked.home}/bin" failonerror="true">
<arg value="--file=add-keycloak-caches-dc1.cli"/>
</exec>
<exec executable="./${jboss.cli.script}" dir="${infinispan.unpacked.home}/bin" failonerror="true">
<arg value="--file=add-keycloak-caches-dc2.cli"/>
</exec>
<!--cleanup-->
<delete dir="${infinispan.unpacked.home}/standalone/configuration/standalone_xml_history"/>
<delete dir="${infinispan.unpacked.home}/standalone/log"/>
<delete dir="${infinispan.unpacked.home}/standalone/data"/>
<delete dir="${infinispan.unpacked.home}/standalone/tmp"/>
<touch file="${infinispan.unpacked.home}/../configured"/>
</target>
<target name="add-management-user" unless="management.configured" depends="check-configuration-state">
<echo>Adding management user: `${management.user}`</echo>
<exec executable="./${add.user.script}" dir="${infinispan.unpacked.home}/bin" failonerror="true">
<arg value="-u"/>
<arg value="${management.user}"/>
<arg value="-p"/>
<arg value="${management.user.password}"/>
</exec>
<touch file="${infinispan.unpacked.home}/../management-configured"/>
</target>
<target name="prepare-docker-config">
<copy todir="${infinispan.unpacked.home}/../docker" overwrite="false">
<fileset dir="${scripts.dir}">
<include name="Dockerfile"/>
<include name="*.sh"/>
</fileset>
</copy>
<copy todir="${infinispan.unpacked.home}/../docker/infinispan-server" overwrite="false">
<fileset dir="${infinispan.unpacked.home}">
<exclude name="bin/*.cli"/>
</fileset>
</copy>
</target>
</project>