Distributed Deployment Manual

 


Configure deployment clients

Configure deployment clients

This topic describes the options for setting up deployment clients when using the Splunk deployment server functionality. A deployment client belongs to one or more server classes. Two configuration files share primary responsibility for determining how deployment functions:

You can view deployment client settings in Splunk Manager. Go to Splunk Manager > Deployment and select the Deployment client row.

For information about configuration files, including an explanation of their basic structure, see About configuration files in the Admin manual.

The next section provides a reference for the deployment client configuration settings. You might want to read it while referring to the set of simple example configurations presented later in this topic. In addition, there are several longer and more complete examples in later topics in this manual, including "Deploy several forwarders".

Important: A deployment server cannot be a deployment client of itself.

What you can define for a deployment client

To enable a Splunk instance as a deployment client, create a deploymentclient.conf in $SPLUNK_HOME/etc/system/local.

You can also enable a deployment client through the CLI. See "Enable and disable deployment clients using the CLI" later in this topic.

The deploymentclient.conf file provides two stanzas:

Stanza Meaning
[deployment-client] Includes a number of configuration attributes. Most importantly, this stanza specifies where to place downloaded content.
[target-broker:deploymentServer] Specifies the location of this client's deployment server. "deploymentServer" is the default name for a deployment server.


These are the main attributes available in the [deployment-client] stanza:

Attribute What it's for Default
disabled Set to "true" or "false". If "true", it disables the deployment client. false
clientName A name, or "tag," that the deployment server can use to filter on. It takes precedence over hostnames. deploymentClient
workingDir A temporary folder used by the deployment client to download server classes and applications. $SPLUNK_HOME/var/run/deploy-client
repositoryLocation The repository location where apps are installed after being downloaded from a deployment server.

Note that, for each app that is downloaded, deployment server may also specify a repository location to install it. The deployment client will use the serverRepositoryLocationPolicy attribute to determine which location to use.

$SPLUNK_HOME/etc/apps
serverRepositoryLocationPolicy Set to "acceptSplunkHome", "acceptAlways", or "rejectAlways":
  • acceptSplunkHome - Accept the repository location supplied by the deployment server, if and only if it is rooted by $SPLUNK_HOME.
  • acceptAlways - Always accept the repository location supplied by the deployment server.
  • rejectAlways - Always reject the server-supplied repository location. Instead, use the repositoryLocation specified in this configuration file.
acceptSplunkHome
endpoint The HTTP endpoint from which content should be downloaded.

Note: The deployment server can specify a different endpoint from which to download each set of content (individual apps, etc). The deployment client uses the serverEndpointPolicy atrtribute to determine which value to use.

$deploymentServerUri$ resolves to targetUri, defined in the [target-broker] stanza. $serviceClassName$ and $appName$ mean what they say.

$deploymentServerUri$/services/streams/deployment?name=$serverClassName$:$appName$
serverEndpointPolicy Set to "acceptAlways" or "rejectAlways":
  • acceptAlways - Always accept the endpoint supplied by the deployment server.
  • rejectAlways - Always reject the endpoint supplied by the deployment server. Instead, use the endpoint defined by the endpoint attribute.
acceptAlways
phoneHomeIntervalInSecs A number that determines how frequently the deployment client should check for new content. 60


This is the attribute available in the [target-broker:deploymentServer] stanza:

Attribute What it's for Default
targetUri Set to <Deployment_server_URI>:<Mgmt_port>. Specifies the deployment server connection information. The management port is typically 8089. n/a

Note: The most accurate and up-to-date list of settings available for a given configuration file is in the .spec file for that configuration file. You can find the latest version of the .spec and .example files in the Configuration file reference in this manual, or in $SPLUNK_HOME/etc/system/README.

Examples

Here are several examples of defining deployment clients through the deploymentclient.conf file:

# Example 1
# Deployment client receives apps, placing them into the same repositoryLocation locally,
# relative to $SPLUNK_HOME, that it picked them up from. This is typically 
# $SPLUNK_HOME/etc/apps. 
# There is nothing in [deployment-client], because the deployment client is not overriding 
# the value set on the deployment server side.

[deployment-client]

[target-broker:deploymentServer]
targetUri= deploymentserver.splunk.mycompany.com:8089


# Example 2
# Deployment server keeps apps to be deployed in a non-standard location on the server side 
# (perhaps for organization purposes). 
# Deployment client receives apps and places them in the standard location. 
# Note: Apps deployed to any location other than $SPLUNK_HOME/etc/apps on the deployment 
# client side will not be recognized and run. 
# This configuration rejects any location specified by the deployment server and replaces 
# it with the standard client-side location. 

[deployment-client]
serverRepositoryLocationPolicy = rejectAlways
repositoryLocation = $SPLUNK_HOME/etc/apps

[target-broker:deploymentServer]
targetUri= deploymentserver.splunk.mycompany.com:8089


# Example 3
# Deployment client should get apps from an HTTP server that is different from the one 
# specified by the deployment server. 

[deployment-client]
serverEndpointPolicy = rejectAlways
endpoint = http://apache.mycompany.server:8080/$serviceClassName$/$appName$.tar

[target-broker:deploymentServer]
targetUri= deploymentserver.splunk.mycompany.com:8089


# Example 4
# Deployment client should get apps from a location on the file system and not from a 
# location specified by the deployment server.

[deployment-client]
serverEndpointPolicy = rejectAlways
endpoint = file:/<some_mount_point>/$serviceClassName$/$appName$.tar

[target-broker:deploymentServer]
targetUri= deploymentserver.splunk.mycompany.com:8089

Enable and disable deployment clients using the CLI

To enable a deployment client, run the following command from the Splunk CLI:

./splunk set deploy-poll <IP address or hostname>:<port>

Include the IP address/hostname and management port of the deployment server. The management port is typically 8089.

Now restart the deployment client to make the change take effect.

To disable a deployment client, run the following command:

./splunk disable deploy-client

This documentation applies to the following versions of Splunk: 4.2 , 4.2.1 , 4.2.2 , 4.2.3 , 4.2.4 , 4.2.5 , 4.3 , 4.3.1 , 4.3.2 View the Article History for its revisions.


You must be logged into splunk.com in order to post comments. Log in now.

Was this documentation topic helpful?

If you'd like to hear back from us, please provide your email address:

We'd love to hear what you think about this topic or the documentation as a whole. Feedback you enter here will be delivered to the documentation team.

Feedback submitted, thanks!