This document provides detailed information about how to setup, configure and start a Fredhopper Deployment Agent, as well as how to use its command line client or directly its REST API.
Starting the Agent
The agent can be started from the command line using these commands:
$ bin/deployment-agent [arguments]
The agent logs into data-directory/log/agent.log.
Arguments
| -d, --directory | Data directory | Required |
| -i, --address | IP address to bind the agent | Default is to bind to all local addresses |
| -p, --port | Port on which agent listens | Default is 8177 |
| -f, --foreground | Run in foreground | Log to the console as well, and react to keypresses on the console |
| -v, --version | Show version information | |
| -h, --help | Show a summary of the available command line arguments |
Running the Client
$ bin/deployment-agent-client [global options] [command] [command arguments]
See the sections about global options and commands below.
Global Options
Typical global client options
| --location | A URL pointing to the agent | Default is http://localhost:8177 |
| -O, --output | Name of the output file | Default is console |
| --type | MIME type to request | Default is text/plain, unless noted otherwise in the command description |
| -v, --version | Show version information |
Commands
Optional arguments come before the required arguments, for example:
$ deployment-agent-client install --name 'Installation1' fredhopper-releases/FAS6_2_3.zip
Installations and Instances
Install a distribution archive. Required Arguments: URL of the distribution, Optional Arguments: --name <name>
Alias: install
Uninstall a distribution. If '--force' is given instances will be stopped and removed, otherwise uninstall fails if instances still exist.
Alias: uninstall
Get the configuration settings of the named installation.
Rename an installation, if '--force' is given instances' processes will be stopped before removal, otherwise removal fails if processes are still running.
Create a new instance
Alias: create
Remove an instance, if '--force' is given processes will be stopped before removal, otherwise removal fails if processes are still running.
Alias: remove
Get the configuration settings of the named instance.
Rename an instance, if '--force' is given processes will be stopped before removal, otherwise removal fails if processes are still running.
Controling Processes
Invoke a verb of a process of an instance.
File Management
Get a file from the server. Optional arguments: --instance <name>, --installation <name> to select source.
Put a file onto the server. Optional arguments: --instance <name>, --installation <name> to select target.
Delete a file on the server. Optional arguments: --instance <name>, --installation <name> to select target.
Discovery
Show all available instances. If a particular installation is specified with the argument <installation-name> then list only its instances.
Show all available installations
Show all available processes for the instance.
Show all available verbs for the particular process.
Show the environment as seen by the daemon. This will be given to newly started processes.
Show general information about the agent like version properties, base installations directory and base instances directory.
Role Management
Add a role defined by the role XML at the URL into the instance.
Remove the named role from the instance.
Get the role definition XML for the named role from the instance.
List all available roles of the given instance.
Invoke the command <command-name> for the given role on the instance. If no role is given, the default role will be used if available.
Importing/Exporting of Instance Configuration and Data
Export a capture from the named instance. Use the -O switch to define the output file name. Use any of the options to specify what should be included in the capture: -c - config data; -i - indices; -l - log files; -x - processed XML; -s - stack traces of processes.
Alias: create-capture
Import a capture from the named URI or standard input into the named instance.
Monitoring
Get a JMX-exposed value from the process
Set a JMX exposed value. If <<value>> is not given it will be taken from the standard input
List available JMX object names
List available JMX attribute names.
URL Patterns and Responses
GET: Show daemon settings (text/plain)
GET: Show daemon environment (text/plain, key=value pairs, # marks comments)
GET: show all logs of the agent, ROOT/log/agent.log is the latest one
GET: show available monitoring groups
GET: show available monitoring values in the group
GET: get a monitoring value, POST: set a value
GET: List available instances (text/plain)
GET: List available installations (text/plain)
GET: Describe instance configuration (text/plain), PUT: create instance, POST: rename instance, DELETE: remove instance
GET: Describe installation configuration (text/plain), PUT: create installation, POST: rename installation, DELETE: remove instance
GET: Get a list of configured universes (text/plain, one universe per line)
GET: download file from instance, PUT: upload file for instance, DELETE: remove file
GET: download file from installation, PUT: upload file for installation, DELETE: remove file
GET text/plain: show all available processes
GET text/plain: get process name
GET text/plain: list process verbs, one per line
GET (properties as query parameters)/POST (text/plain Properties): invoke verb of process with properties
GET: show available monitoring groups
GET: show available monitoring values in the group
GET: get a monitoring value, POST: set a value
GET text/plain: get properties defined by a named preset
GET text/plain: list all known presets of an installation
GET text/plain: get the instance preset
GET text/plain: get the value of the setting from the preset, POST text/plain: set the value of the setting, DELETE: remove the setting from the preset.
PUT text/xml: add the role from the XML definition
GET text/xml: get the role definition, DELETE: remove the role
GET (properties as query parameters)/POST (text/plain Properties): execute the command of the role with properties
GET (properties as query parameters)/POST (text/plain Properties): execute the command of the default role if a default role is available with properties.
GET (application/x-fredhopper-export+zip or application/zip): export a capture, POST (application/x-fredhopper-export+zip or application/zip): import a capture.
Support for Suggest Service
The Fredhopper Suggest service can be installed and used in the deployment agent using the standard create-installation, create-instance, import-capture, and invoke commands.
After creating the suggest instance you should import a capture containing your configuration and suggest indices. The capture has the following structure:
capture.zip
- config
- suggest configuration
- data
- suggest
- suggest data files goes here ...
- suggest
The suggest service can then be started, and will by default answer requests on port 8380.
For more information see Suggest Reference.
Kommentare
0 Kommentare
Zu diesem Beitrag können keine Kommentare hinterlassen werden.