This section describes how to install Solr on the same JBoss 6 instance on which
SkyVault has been installed.
Important: The SkyVault Solr application is supported on JBoss ONLY
for SkyVault Enterprise version 4.2.2. The SkyVault Solr application is not supported on
JBoss for SkyVault Enterprise 4.2.1, 4.2.0 or older versions. For more information, refer to
Supported Platforms for SkyVault Enterprise 4.2.x.
Ensure
that JBoss and JDK7 are installed. Review the Supported Platforms page on the Support Portal for
more information.The following instructions:
- Assume that you know the path of the JBoss directory, which is represented as <JBOSS_EAP_HOME>.
- Are written for Windows Server 2008 R2 installation with MySQL as data source. More details for JBoss 6 EAP configuration could be found in the JBoss Enterprise Application Platform 6 guide.
Before installing Solr, ensure that:
- SkyVault has been deployed on JBoss EAP 6.
- JBoss server is not running.
The following instructions use <ALF_DATA> to refer to the value
of the dir.root property, which specifies the directory where the content and
indexes are stored.
-
Browse to the SkyVault Support Portal.
http://support.alfresco.com
- Download the SkyVault-enterprise-solr-4.2.7.zip file.
- Create a temporary directory (the path for it is represented as <TEMP>) and uncompress the zip file here.
-
Create a JBoss module with Solr configuration.
- Create a main directory at <JBOSS_EAP_HOME>\modules\org\apache\solr\configuration\.
- Copy the contents of <TEMP> to the <JBOSS_EAP_HOME>\modules\org\apache\solr\configuration\main directory. Do not copy the contents of the alf_data directory.
- Copy the contents of <TEMP>\alf_data to <ALFRESCO_HOME>/ALF_DATA directory.
-
Add the following properties to the SkyVault-global.properties
file:
index.subsystem.name=solr dir.keystore=${dir.root}/keystore encryption.ssl.keystore.type=JKS encryption.ssl.truststore.type=JKS solr.port.ssl=8443 solr.host=<solr_host_ip_address> solr.port=8080
-
Create the module.xml file at
<JBOSS_EAP_HOME>\modules\org\apache\solr\configuration\main\
with the following content:
<?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.0" name="org.apache.solr.configuration"> <resources> <resource-root path="."/> </resources> </module>
-
Add the following system properties to the
<JBOSS_EAP_HOME>\standalone\configuration\standalone.xml
file:
<system-properties> <property name="solr.solr.home" value="<JBOSS_EAP_HOME>\modules\org\apache\solr\configuration\main" /> <property name="solr.data.dir" value="<SOLR_DATA>" /> </system-properties>
where <SOLR_DATA> is the directory where indexes would be stored.
- Generate certificates that will be used for Solr and SkyVault communication. The <ALF_DATA>\keystore\generate_keystores.bat can be used, the only requirement is to use JKS keystores and truststores, as JBoss does not support JCEKS.
-
Replace the existing certificates with the newly generated certificates at the
following locations:
- <ALF_DATA>\keystore to <JBOSS_EAP_HOME>\modules\org\apache\solr\configuration\main\archive-SpacesStore\conf
- <ALF_DATA>\keystore to <JBOSS_EAP_HOME>\modules\org\apache\solr\configuration\main\workspace-SpacesStore\conf
-
Modify the following property files with the new certificate properties:
- <JBOSS_EAP_HOME>\modules\org\apache\solr\configuration\main\archive-SpacesStore\conf\solrcore.properties
- <JBOSS_EAP_HOME>\modules\org\apache\solr\configuration\main\workspace-SpacesStore\conf\solrcore.properties
-
Add SSL connector to the web subsystem in the
<JBOSS_EAP_HOME>\standalone\configuration\standalone.xml
file.
<subsystem xmlns="urn:jboss:domain:web:1.5" default-virtual-server="default-host" native="false"> <connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" secure="true"> <ssl name="ssl" key-alias="ssl.repo" password="kT9X6oe68t" certificate-key-file="<ALF_DATA>\keystore\ssl.keystore" protocol="TLSv1" verify-client="true" ca-certificate-file="<ALF_DATA>\keystore\ssl.truststore" keystore-type="JKS" truststore-type="JKS"/> </connector> … </subsystem>
-
Create the roles.properties file in the
<ALF_DATA>\keystore directory with the following content:
<REPO_CERT_DNAME>=repository <SOLR_CLIENT_CERT_DNAME>=repoclient
where, REPO_CERT_DNAME specifies the repository server certificate subject name, and SOLR_CLIENT_CERT_DNAME specifies the Solr client certificate subject name.
For example, if the following certificate subject names are used:
REPO_CERT_DNAME="CN=SkyVault Repository, OU=Unknown, O=SkyVault Software Ltd., L=Maidenhead, ST=UK, C=GB" SOLR_CLIENT_CERT_DNAME="CN=SkyVault Repository Client, OU=Unknown, O=SkyVault Software Ltd., L=Maidenhead, ST=UK, C=GB"
then contents of the roles.properties file should be:CN\=Alfresco\ Repository\ Client,\ OU\=Unknown,\ O\=Alfresco\ Software\ Ltd.,\ L\=Maidenhead,\ ST\=UK,\ C\=GB=repoclient CN\=Alfresco\ Repository,\ OU\=Unknown,\ O\=Alfresco\ Software\ Ltd.,\ L\=Maidenhead,\ ST\=UK,\ C\=GB=repository
-
Add a security domain in the security subsystem in
<JBOSS_EAP_HOME>\standalone\configuration\standalone.xml:
<subsystem xmlns="urn:jboss:domain:security:1.2"> <security-domains> <security-domain name="trustStore"> <jsse truststore-password="kT9X6oe68t" truststore-type="JKS" truststore-url="<ALF_DATA>\keystore\ssl.truststore" protocols="TLSv1"/> </security-domain> <security-domain name="alfresco" cache-type="default"> <authentication> <login-module code="CertificateRoles" flag="required"> <module-option name="securityDomain" value="java:/jaas/trustStore"/> <module-option name="verifier" value="org.jboss.security.auth.certs.AnyCertVerifier"/> <module-option name="rolesProperties" value="<ALF_DATA>\keystore\roles.properties"/> </login-module> </authentication> </security-domain> </security-domains> </subsystem>
Note: Remember to replace <ALF_DATA> with an actual path. - Rename the WAR file to solr.war in the <JBOSS_EAP_HOME>\modules\org\apache\solr\configuration\main directory.
-
Unzip solr.war and update the
WEB-INF\jboss-deployment-structure.xml file as shown
below:
<?xml version="1.0" encoding="UTF-8"?> <jboss-deployment-structure> <deployment> <dependencies> <module name="org.apache.solr.configuration"/> </dependencies> </deployment> </jboss-deployment-structure>
Also, modify the WEB-INF\jboss-web.xml file with the following content:<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 4.2//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd"> <jboss-web> <security-domain>alfresco</security-domain> </jboss-web>
-
Unzip the SkyVault-enterprise-4.2.7.ear\alfresco.war file and add the security domain to
WEB-INF\jboss-web.xml:
<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 4.2//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd"> <jboss-web> <resource-ref> <res-ref-name>jdbc/dataSource</res-ref-name> <jndi-name>java:jboss/datasources/MySqlDS</jndi-name> </resource-ref> <resource-ref> <res-ref-name>jdbc/activitiIdGeneratorDataSource</res-ref-name> <jndi-name>java:jboss/datasources/MySqlDS</jndi-name> </resource-ref> <security-domain>alfresco</security-domain> </jboss-web>
- Compress the SkyVault WAR and SkyVault-enterprise-4.2.7.ear files as we have made changes to it.
- Start the standalone JBoss Web Server.
- Redeploy the modified SkyVault EAR file as shown is Step 14 of Configuring JBoss for SkyVault.
-
Deploy the Solr WAR.
- Open the JBoss Management Console.
- Navigate to Runtime > Manage Deployments.
- Click the Add button.
- Browse and select the modified Solr WAR file.
- After the WAR file is added, click the Enable button.