Adding additional services and profiles to a collection

Managed by | Updated .

Info
A shell script is available for Linux systems that can be used to automatically create a profile and generate the matching rulesets as described in this article. See the profile creation script section below.

Every collection in Funnelback supports multiple profiles/services.

Process

1. Create live and preview profile folders under the desired collection. For example to add a profile called myprofile to mycollection create $SEARCH_HOME/conf/mycollection/myprofile and $SEARCH_HOME/conf/mycollection/myprofile_preview

2. Create a web folder within these two folders.

3. File manager rules will need to be added to users in order to make the profiles accessible vie the administration interface.  For each user that needs to manage the new profile.  The file to edit is $SEARCH_HOME/admin/users/<username>.ini

3.1. add the four profile folders to the [file-manager::folders] section (or create the section if it doesn't already exist).  Format is (replace ${PROFILE_NAME} with the profile's id):

<user>.ini
[file-manager::folders]
profile-folder-${PROFILE_NAME}
profile-folder-${PROFILE_NAME}_preview
profile-folder-${PROFILE_NAME}-web
profile-folder-${PROFILE_NAME}_preview-web

3.2. add four sections, one for each folder that define the file manager rules required. Format is (replace ${PROFILE_NAME} with the profile's id):

<user>.ini
[file-manager::profile-folder-${PROFILE_NAME}]
name = Profile for ${PROFILE_NAME} (live)
path = $home/${PROFILE_NAME}
rules = live-display-rules
 
[file-manager::profile-folder-${PROFILE_NAME}_preview]
name = Profile for ${PROFILE_NAME} (preview)
path = $home/${PROFILE_NAME}_preview
publish-to = $home/${PROFILE_NAME}
rules = preview-display-rules
 
[file-manager::profile-folder-${PROFILE_NAME}-web]
name = Web resources for ${PROFILE_NAME} (live)
path = $home/${PROFILE_NAME}/web
rules = live-web-display-rules
set =
 
[file-manager::profile-folder-${PROFILE_NAME}_preview-web]
name = Web resources for ${PROFILE_NAME} (preview)
path = $home/${PROFILE_NAME}_preview/web
publish-to = $home/${PROFILE_NAME}/web
rules = preview-web-display-rules
set =

Profile creation script

Additional profiles can be created using the create-profile.sh script which can be copied to your Funnelback server. Note: this script is Linux only.

The script is available from GitHub: https://github.com/funnelback/helper-scripts

Installation is simply a process of copying the script to the Funnelback server and making it executable.  The ownership and group for the script should also be changed to the same user and group for other Funnelback files (the default on a Linux system is search:search).  A suitable location for the script is $SEARCH_HOME/bin/ or $SEARCH_HOME/custom_bin/

Once installed on your server an additional profile is created by calling the script with the collection and profile name as arguments:

create-profile.sh -c <COLLECTION_NAME> -p <PROFILE_NAME>

The script should be run as the search user detailed above.

This script will create the following folders:

$SEARCH_HOME/conf/$COLLECTION_NAME/$PROFILE_NAME
$SEARCH_HOME/conf/$COLLECTION_NAME/$PROFILE_NAME/web
$SEARCH_HOME/conf/$COLLECTION_NAME/${PROFILE_NAME}_preview
$SEARCH_HOME/conf/$COLLECTION_NAME/${PROFILE_NAME}_preview/web

and also return the file manager rules that will display the profile folders from the file manager.

These rules need to be added to each user that manages the collection and requires access to the profile folders.

e.g.

[search@localhost mycollection]$ /opt/funnelback/bin/create-profile.sh -c mycollection -p myprofile
Created profile for myprofile
Generated rules to add to user .ini files.  The following needs to be added to each user that needs to manage these profile folders.
 
 
Add the following lines to: [file-manager::folders]
profile-folder-myprofile
profile-folder-myprofile_preview
profile-folder-myprofile-web
profile-folder-myprofile_preview-web
 
 
Add the following sections:
 
 
[file-manager::profile-folder-myprofile]
name = Profile for myprofile (live)
path = $home/myprofile
rules = live-display-rules
 
 
[file-manager::profile-folder-myprofile_preview]
name = Profile for myprofile (preview)
path = $home/myprofile_preview
publish-to = $home/myprofile
rules = preview-display-rules
 
 
[file-manager::profile-folder-myprofile-web]
name = Web resources for myprofile (live)
path = $home/myprofile/web
rules = live-web-display-rules
set =
 
 
[file-manager::profile-folder-myprofile_preview-web]
name = Web resources for myprofile (preview)
path = $home/myprofile_preview/web
publish-to = $home/myprofile/web
rules = preview-web-display-rules
set =
[search@localhost mycollection]$

Creating additional marketing dashboard services

Services are a type of profile.  To create a service, first create a profile using the instructions above.

  1. Once the profile is created visit the administration interface and change to the profile using the profile switcher located near the collection switcher.
  2. Click the create service button to designate the new profile as a service.
  3. Once set up as a service it will become available via the marketing dashboard.  
  4. Service name and icon can be set in the same manner as for the default profile.
Was this artcle helpful?

Tags
Type: Keywords:
Features:

Comments