Software AG Products 10.7 | Configuring API Gateway | API Gateway Configuration with Command Central | Manage Inter-component and Cluster configurations | Configuring Elasticsearch Connection Settings | Configuring External Elasticsearch using Template
 
Configuring External Elasticsearch using Template
You can configure external Elasticsearch using the following Command Central template:
sagcc exec templates composite import -i cc-minimal-es.yaml

sagcc exec templates composite apply cc-minimal-es nodes=local ssl_username=username ssl_password=password
eshost=eshost esport=esport keystore_location=your_keystore_location keystore_alias=alias_of_keystore
truststore_location=your_truststore_location truststorealias=your_truststore_alias
truststore_password=truststorepassword
Sample external Elasticsearch configuration template
alias: elasticsearch-alias
description: Elastic search configuration

layers:
runtime:
templates:
- cc-minimal-es

templates:
cc-minimal-es:
products:
integrationServer:
default:
configuration:
OSGI-IS_apigateway-WmAPIGateway:
APIGATEWAY-ELASTICSEARCH:
APIGATEWAY-ELASTICSEARCH:
'@alias': Elasticsearch
autostart: 'false'
tenantId: apigateway
Auth:
'@type': SSL
User: ${ssl_username}
Password: ${ssl_password}
Transport:
Host: ${eshost}
Port: ${esport}
SSL:
Enable: 'true'
HostnameVerification: 'false'
KeystoreLocation: ${keystore_location}
KeystoreAlias: ${keystore_alias}
TruststoreLocation: ${truststore_location}
TruststoreAlias: ${truststore_alias}
TruststorePassword: ${truststore_password}
ExtendedProperties:
Property:
- '@name': clientHttpResponseSize
$: '1024'
- '@name': connectionTimeout
$: '10000'
- '@name': keepalive
$: '10'
- '@name': keepAliveConnectionsPerRoute
$: '1000'
- '@name': maxRetry
$: '10000'
- '@name': socketTimeout
$: '10000'
- '@name': sniffEnabled
$: 'true'
- '@name': sniffTimeInterval
$: '5000'

provision:
default:
runtime: ${nodes}