How to manage the Managed Cloud Solr server


Introduction

You can request the Solr server as an alternative search indexing service when you request a new set provisioning within the scope of the Sitecore Managed Cloud service. How to request a new Managed Cloud set with Solr is described here.

The existing Managed Cloud deployment can also be switched from Azure Cognitive Search to Solr by raising a service request on Sitecore Support portal.

Security

When the Managed Cloud team deploys a Solr implementation for a customer, access is enabled for a single user account (see How To Access Solr Server Admin UI for details) and zkcli (Zookeeper) access is denied to the public by default (see How to manage IP access rules section for more details). An API key is also provided that one can use to modify the Solr configuration.

How To Access Solr Server Admin UI

After provisioning, Sitecore provides the URL of the Solr server and user credentials.
For example, the Solr URL could be: https://<server_name>-azure.searchstax.com/solr/

To access the Solr Admin UI, open the URL and enter the user name and password.

The following is an example of a Solr Admin UI:

How To Manage IP Access Rules

By default, Solr server has no IP restriction rules, but Zookeeper has all incoming traffic blocked, except one rule created by the Sitecore Cloud team during Solr cluster provisioning.  

To list IP rules, use the following GET request:

URI:

https://app.searchstax.com/api/rest/v2/account/SitecoreLive/deployment/<server_name>/ip-filter/?page=<n>

Where:

Headers:

Authorization: APIkey <API_key>

 

To add an IP rule, use the following POST request:

URI:

https://app.searchstax.com/api/rest/v2/account/SitecoreLive/deployment/<server_name>/ip-filter/add-cidr-ip/

Headers:

Authorization: APIkey <API_key>

Body in json format:

The following body example opens access on Zookeeper for a single IP:

{
"services": [
"zk"
],
"cidr_ip": "93.154.114.52",
"description": "Sitecore test"
}

The following body example opens access on Zookeeper and Solr for a single IP:

{
"services": [
"solr",
"zk"
],
"cidr_ip": "93.154.114.52",
"description": "Sitecore test 2"
}

 

To delete an IP rule, use the following POST request:

URI:

https://app.searchstax.com/api/rest/v2/account/SitecoreLive/deployment/<server_name>/ip-filter/delete-cidr-ip/

Headers:

Authorization: APIkey <API_key>

Body in json format:

{
"cidr_ip": "93.154.114.52"
}

Where:

More details are available on SearchStax API documentation.

IMPORTANT: When referring to SearchStax documentation note that Sitecore customers have  limited access only, which is available using Sitecore provided API key only. Use the following parameters when referring to SearchStax API documentation:

How To Manage Solr Server Users

By default, there is only an admin user on a provisioned Solr server. A customer can create a new user using a REST API request.
Note: Sitecore provides the admin user name, password, and API key after provisioning has been done.

To create a new user, use the following POST request:

URI:

https://app.searchstax.com/api/rest/v2/account/SitecoreLive/deployment/<server_name>/solr/auth/add-user/

Headers:

Authorization: APIkey <API_key>

Body in json format:

{
  "username": "<user_name>",
  "password": "<user_password>",
  "role": "<role>"
}

To delete a user, use the following POST request:

URI:

https://app.searchstax.com/api/rest/v2/account/SitecoreLive/deployment/<server_name>/solr/auth/delete-user/

Header:

Authorization: APIkey <API_key>

Body in json format:

{
  "username": "<user_name>"
}

Where:

How To Upload A Configset And Create A Collection 

The provisioned SolrCloud server already contains a valid Sitecore configset. Customers can create new search collections and define new fields through two main methods.

Option 1
The best practice for working with Solr configurations is through the documented API. This is a public repo with examples of how to use this API: https://github.com/searchstax/searchstax-client-powershell/tree/master/restapi. The usual pattern for making an update to the Solr configuration, such as adding a new search field, is to download the current configuration through the API, make changes locally, and then upload the change through the API. See accountdeploymentzookeeperconfigdownload.ps1 and accountdeploymentzookeeperconfigcreate.ps1 from GitHub for examples of this pattern.

Option 2
Customers can also upload a new configset using the Zookeeper tool (zkcli) and create new collections based on the new configset. See detailed instructions of how to upload a configset and create collections described in this article (refer to the Upload the configuration to Zookeeper section and Create a collection section). Note that by default, the Zookeeper endpoint does not allow access; to add an IP that can access Zookeeper and use this approach, enter a support ticket with the Sitecore Managed Cloud team.

How To Browse Configsets And Collections

You can view server files by clicking Cloud, Tree in the menu on the left. Here, you can browse all the configsets and collections data:

In addition, you can find all the collections by clicking Collections in the menu on the left:

How To Restart Solr Server

Solr server can be restarted by stop and start API commands for each node (standard server consists of 3 nodes). To get a LIST of all server nodes with the current status, use the following GET request:

URI:

https://app.searchstax.com/api/rest/v2/account/SitecoreLive/deployment/<server_name>/server

Headers:

Authorization: APIkey <API_key>

Where:

 

To STOP Solr node, use the following POST request: 

URI:

https://app.searchstax.com/api/rest/v2/account/SitecoreLive/deployment/<server_name>/server/<node_name>/stop-solr/

Headers:

Authorization: APIkey <API_key>

Where:

 

To START Solr node, use the following POST request: 

URI:

https://app.searchstax.com/api/rest/v2/account/SitecoreLive/deployment/<server_name>/server/<node_name>/start-solr/

Headers:

Authorization: APIkey <API_key>

Where:

Useful Materials