Default Aspire installations use the Maven Repository to automatically download components and add them to Aspire.

What if your target machine has no internet connection? Or if Maven is not installed?

In that case, you'll need to update the configuration of Aspire in order to remove the need for an internet connection. There are two methods you can use. Both require you to install Aspire on a machine that has internet access initially, and download the required jars before moving to a server with no internet access.


On this page:

Option A - Local Maven Repository


How it works

When you run Aspire on a server connected to the internet, Aspire will download any bundles (jar files) you need as you install services, content sources and applications. Once they're downloaded, the bundles are stored in a local cache on disk that by default is located under the users home directory in a directory named .m2. This directory structure is know as the local maven repository.

If you're already using Maven for non Aspire related things, this directory structure would contain any files downloaded by the command line version of Maven. To make Aspire run on a machine not connected to the internet, you could just copy this structure from a machine connected to the internet, thereby copying all the files you need. However, this would have a couple of disadvantages:

  • You have to (find and) copy the structure from its location, as well as copying the Aspire distribution
  • The local Maven repository could contain files not required for Aspire

To make sure neither of these are an issue, we'll configure Aspire to use a local Maven repository located inside the Aspire distribution.

Step 1: Create and test Aspire on a computer with an internet connection

Start by Using the Maven Distribution Archetype to create an Aspire distribution on a computer with an internet connection.

Step 2: Make sure all custom components are deployed or installed

Aspire Maven distribution projects require that all components be stored in either a local or remote repository. When the distribution is re-built (using mvn clean package) it will download all of the component JARs from a repository into the distribution target directory.

Therefore, any new component must be copied to a repository first. This can be done with:

  • mvn install - Copies the component JAR to the local repository. The local repository is only available to processes running on the same machine for the same user.

Step 3: Edit your settings.xml file

Inside the Aspire settings.xml file, you will find two different repositories listed (see Aspire Repository Configuration for more information on Aspire repository configuration).

  • Remove the distribution repository
  • Change the id of the maven repository to local
  • Add a <localRepository> of bundles/aspire

Your settings file should go from:

 <repositories>
   <defaultVersion>3.2</defaultVersion>
   <repository type="distribution">
     <directory>bundles/aspire</directory>
   </repository>
   <repository type="maven">
     <remoteRepositories>
       <remoteRepository>
         <id>stPublic</id>
         <url>https://repository.searchtechnologies.com/artifactory/public/</url>
         <username>REGISTERED-USERNAME</username>
      	 <password>REGISTERED-PASSWORD</password>
       </remoteRepository>
     </remoteRepositories>
   </repository>
 </repositories>

to

 <repositories>
   <defaultVersion>3.2</defaultVersion>
   <repository type="maven">
     <localRepository>bundles/aspire</localRepository>
     <remoteRepositories>
       <remoteRepository>
         <id>local</id>
         <url>https://repository.searchtechnologies.com/artifactory/public/</url>
         <username>REGISTERED-USERNAME</username>
      	 <password>REGISTERED-PASSWORD</password>
       </remoteRepository>
     </remoteRepositories>
   </repository>
 </repositories> 

Use the user/password that you registered for Aspire with.

Step 4: Get the entitlements.xml file

To get the entitlements.xml file go to General Settings

Step 5: Run Aspire

Once you've updated the settings file, start Aspire and install all the connectors, services and applications you require. You only need to install one of each type. For example, if you wanted to have three file system connectors, two of which publish to SOLR and one that publishes to Elastic, you would only need to add one FileSystem content source, one SOLR publisher and one Elastic publisher.

You do not need to fully configure the sources/publishers. The intention is just to allow them to be downloaded to the local repository

Step 6: Edit your settings.xml file again

Once all the jars you need have been downloaded, stop Aspire and edit the settings file. In the repositories section:

  • Add an <offline> tag set to true
  • Remove the <remoteRepositories> tag

Your settings file should go from:

  <repositories>
   <defaultVersion>3.2</defaultVersion>
   <repository type="maven">
     <localRepository>bundles/aspire</localRepository>
     <remoteRepositories>
       <remoteRepository>
         <id>local</id>
         <url>https://repository.searchtechnologies.com/artifactory/public/</url>
         <username>REGISTERED-USERNAME</username>
      	 <password>REGISTERED-PASSWORD</password>
       </remoteRepository>
     </remoteRepositories>
   </repository>
 </repositories>

to

  <repositories>
   <defaultVersion>3.2</defaultVersion>
   <offline>true</offline>
   <repository type="maven">
     <localRepository>bundles/aspire</localRepository>
 </repository>
 </repositories>

Step 7: Move the distribution

You can now move (or copy) the target directory of the distribution to the server without internet access and test


Option B - Aspire Distribution Repository


There is an option in Aspire called the "Distribution Repository" which is designed to allow you to load jars from a file system.

Below are instructions on creating an Aspire distribution that can be copied and used on computers without an internet connection.

How It Works

Basically, you will be using Aspire's "Distribution Repository" mechanism on the target machine instead of the standard "Maven Repository". This means:

  1. The "bundles/aspire" directory must contain a copy of all of your component JAR files.
    • This can be done automatically when the distribution is built by putting these components as dependencies in the distribution's pom.xml file (see below).
  2. The "settings.xml" file will only contain the "distribution" repository (delete or disable the maven repository configuration) as well as the entitlements configuration used for dynamic fill of applications, publisher and connector lists in the UI.

Step 1: Create and test Aspire on a computer with an internet connection

Start by Using the Maven Distribution Archetype to create an Aspire distribution on a computer with an internet connection.

Step 2: Make sure all custom components are deployed or installed

Aspire Maven distribution projects require that all components be stored in either a local or remote repository. When the distribution is re-built (using mvn clean package) it will download all of the component JARs from a repository into the distribution target directory.

Therefore, any new component must be copied to a repository first. This can be done with:

  • mvn install - Copies the component JAR to the local repository. The local repository is only available to processes running on the same machine for the same user.

Step 3: Edit Your settings.xml file

Inside the Aspire settings.xml file, you will find two different repositories listed (see Aspire Repository Configuration for more information on Aspire repository configuration).

Remove or disable the Maven repository from the settings.xml file. This means deleting, commenting-out the section which starts with <repository type="maven">. or adding the <offline>true</offline> tag to it.

Also change the tag <entitlements online="true"> to <entitlements online="false">

Step 4: Get the entitlements.xml file

To get the entitlements.xml file go to Setting Aspire with No Internet Access (Offline)#Get Entitlements Offline

Step 5: Make sure all of the files in "distribution-files" are up-to-date

The "distribution-files" directory contains the template for your Aspire distribution. This will be the directory from which your Aspire distribution will be built. Therefore, all of the files in "distribution-files" must be up-to-date.

Step 6: Update your distribution pom.xml

Your distribution itself contains a "pom.xml" which holds the instructions to Maven on how to build your distribution (this is the pom.xml file at the very top of the distribution directory).

All of the components and App Bundles that you need for your Aspire distribution must be specified in this file in the <dependencies> section.

For example, suppose your Aspire installation requires "aspire-tools", "aspire-fetch-url" and "aspire-extract-text". you will need to update your distribution pom.xml to look like this:

 <project>
 .
 .
 .

 <dependencies>
   .
   .
   .
   <dependency>
     <groupId>com.searchtechnologies.aspire</groupId>
     <artifactId>aspire-tools</artifactId>
     <version>3.2</version>
     <type>jar</type>
   </dependency>
   <dependency>
     <groupId>com.searchtechnologies.aspire</groupId>
     <artifactId>aspire-fetch-url</artifactId>
     <version>3.2</version>
     <type>jar</type>
   </dependency>
   <dependency>
     <groupId>com.searchtechnologies.aspire</groupId>
     <artifactId>aspire-extract-text</artifactId>
     <version>3.2</version>
     <type>jar</type>
   </dependency>
   .
   .
   .
 </dependencies>

</project

aspire-application is always required to be present in the <dependencies>


The changes above will automatically copy these components from Maven into your deployment when the distribution is re-built.

Step 7: Update your distribution.xml

If you are including appbundles in your dependencies, you will need to update the distribution.xml file to include appbundles in the aspire/bundles directory.

Add a line : <include>com.searchtechnologies.aspire:*</include> like this:

  <assembly>
   .
   .
   .
   <dependencySets>
     <dependencySet>
       .
       .
       .
       <includes>
         <include>com.searchtechnologies.aspire:*</include>
       </includes>
     </dependencySet>
     .
     .
     .
   </dependencySets>
   .
   .
   .
 </assembly>

Step 8: Test the pom.xml changes

This is easy to do with the following command:

mvn clean package assembly:assembly

or (for the latest version of Maven)

mvn clean package

Now, look in your target/{distribution}/bundles/aspire directory, and you should see all of the JAR files you need for your application.

Step 9: Copy the target to your target computer

Now that you've re-built the target, you can zip it up and copy it to the target computer. The target should contain everything you need, including all of your components in the bundles/aspire directory.


Requirement - Get Entitlements Offline


For both options, you need to get the user's entitlements.xml file in order to use the connectors, publishers, and applications that the user is entitled to.

To get your entitlements.xml file for an offline distribution and complete the following steps.

  1. Go to https://entitlements.searchtechnologies.com/entitlements
  2. Enter the username and click Get Entitlements.
  3. Copy or replace the entitlements.xml file in the config folder of the Aspire distribution with the one provided.

Add Username 

Copy or Get Entitlements.xml

  • No labels