Managing Alfresco Search Services 1.4 storage

cancel
Showing results for 
Search instead for 
Did you mean: 

Managing Alfresco Search Services 1.4 storage

angelborroy
Alfresco Employee
2 0 3,461

Alfresco Search Services 1.4 is based in SOLR 6, but this product includes some additional folder for storage that should be managed when installing:

  • /opt/alfresco-search-services/data - Default SOLR Indexes files
  • /opt/alfresco-search-services/contentstore - SOLR Content Store used by Alfresco to provide additional searching features. Note that this folder will be removed from Alfresco Search Services 2.0
  • /opt/alfresco-search-services/solrhome - Default SOLR Core configuration files

Using the ZIP Distribution file

When installing Alfresco Search Services from the ZIP Distribution file, using an external volume for the storage is a common scenario.

The following approach will provide a single parent folder for every storage resource.

$ cd /opt

$ unzip alfresco-search-services-1.4.2.zip

$ cd alfresco-search-services

$ sed -i 's/alfresco.secureComms=https/alfresco.secureComms=none/' solrhome/templates/rerank/conf/solrcore.properties

$ mv solrhome cores
$ mkdir solrhome
$ mv cores solrhome

$ ./solr/bin/solr start -a "-Dcreate.alfresco.defaults=alfresco,archive -Ddata.dir.root=/opt/alfresco-search-services/solrhome/data" -s /opt/alfresco-search-services/solrhome/cores -f

$ tree -L 1 solrhome
solrhome
├── contentstore
├── cores
└── data

Once these steps are applied, every required file will be available under /opt/alfresco/solrhome folder. This will help to backup operations and external volume mounts.

Using Docker Compose

When using Docker Compose, storage folders can be mounted in your local storage using a similar approach.

version: "2"

services:

    solr6:
        image: alfresco/alfresco-search-services:1.4.2.2
        mem_limit: 1200m
        environment:
            #Solr needs to know how to register itself with Alfresco
            SOLR_ALFRESCO_HOST: "alfresco"
            SOLR_ALFRESCO_PORT: "8080"
            ALFRESCO_SECURE_COMMS: none
            #Alfresco needs to know how to call solr
            SOLR_SOLR_HOST: "solr6"
            SOLR_SOLR_PORT: "8983"
            #Create the default alfresco and archive cores
            SOLR_CREATE_ALFRESCO_DEFAULTS: "alfresco,archive"
            SOLR_JAVA_MEM: "-Xms1g -Xmx1g"
        ports:
            - 8083:8983
        volumes:
            - ./solr-data/contentstore:/opt/alfresco-search-services/contentstore
            - ./solr-data/data:/opt/alfresco-search-services/data

With this configuration, every required storage file will be available under solr-data folder. Configuration files in /opt/alfresco-search-services/solrhome will be still available internally in the Docker container, but you can also mount them externally if required.

About the Author
Angel Borroy is Hyland Developer Evangelist. Over the last 15 years, he has been working as a software architect on Java, BPM, document management and electronic signatures. He has been working with Alfresco during the last years to customize several implementations in large organizations and to provide add-ons to the Community based on Record Management and Electronic Signature. He writes (sometimes) on his personal blog http://angelborroy.wordpress.com. He is (proud) member of the Order of the Bee.