Enables server instances to store or retrieve configurations that are stored on a Command Center instance.
System configurations are stored using an ID for the snapshot and can be discovered using the server ID, or optionally provided configuration name and other tags added to the snapshot configuration using the push
command.
It is important to note that the push
and pull
commands are the only commands that are executed against the target server that should have its configuration saved/restored. All other commands operate against the Command Center on which the configurations are stored. To run those commands from the CLI on a server that is not Command Center, the URL of Command Center must be entered using the –url option.
The following information is specified in the local.properties
or custom.properties
configuration files so that EdgeCore loads its configuration from the Command Center on initial server start:
- Command Center host
- API key
- Configuration identification
In configuration files, these are set using:
autoLoad.ccUrl=http://command-center-host:8080 autoLoad.ccApikey=YWRtaW5AZGVmYXVsdHxLOm56V0w1Xi9DSXdhVHQuRVQpW1J0WUc6 autoLoad.configId=someConfigId
If those options exist in the properties, the server will load the specified configuration on first startup and create a file exports/.autoload to prevent restoration on subsequent starts.
Command
sysconfig|sc [--list] [-ls] [--find] [-s] [--describe] [--delete] [--push] [--pull] [-u] [-k] [-i] [-n] [-d] [-t] [-n]
Operations
Operation | Description |
--list|-ls |
Lists snapshots in the Command Center |
--find |
Finds snapshots in the Command Center |
--describe |
Describes snapshot in the Command Center |
--delete |
Deletes snapshot from the Command Center |
--pull |
Pulls snapshot from the Command Center to the server |
--push |
Pushes snapshot from the server to the Command Center |
–find Parameters
Flag | Required | Description |
-s SEARCH_STRING |
Yes | Search string – compares against ID, name, description, and meta-data fields |
–describe Parameters
Flag | Required | Description |
-i SNAPSHOT_ID |
Yes | ID of the snapshot to describe |
–delete Parameters
Flag | Required | Description |
-i SNAPSHOT_ID |
Yes | ID of the snapshot to be removed from the server |
–pull Parameters
Flag | Required | Description |
-u |
Yes | URL of the Command Center |
-k |
Yes | API key of user on the Command Center |
-i SNAPSHOT_ID |
Yes | Snapshot ID |
Example
es-cli.sh --apikey dm8xdWluLWhkaDVvYnFoaDVjOXwzeilIamQpWTwhc1c7Wio9RlgnWFhndURS --url http://localhost:8080 sc --pull -u http://localhost:8081 -k YWRtaW5AZGVmYXVsdHxLOm56V0w1Xi9DSXdhVHQuRVQpW1J0WUc6 -i testConfig
–push Parameters
Flag | Required | Description |
-u |
Yes | URL of the Command Center |
-k |
Yes | API key of user on the Command Center |
-i SNAPSHOT_ID |
Yes | Snapshot ID |
-n |
No | Snapshot name |
-d |
No | Snapshot description |
-t NAME=VALUE [NAME=VALUE ...] |
No | Metatag for matching |
Example
es-cli.sh --apikey dm8xdWluLWhkaDVvYnFoaDVjOXwzeilIamQpWTwhc1c7Wio9RlgnWFhndURS --url http://localhost:8080 sc --push -u http://localhost:8081 -k YWRtaW5AZGVmYXVsdHxLOm56V0w1Xi9DSXdhVHQuRVQpW1J0WUc6 -i testConfig -n "Dev config" -d "This is sample config" -t tag1=value1 -t tag2=value2
Automatically Pushing Server Configuration Changes to the Command Center
EdgeCore version: 4.3.4
For server configuration changes to be detected and automatically pushed to the Command Center, set the following in local.properties
or custom.properties
configuration files:
autoStore.ccUrl=http://command-center-host:8080 autoStore.ccApikey=Apikey autoStore.configId=someConfigId
Upon detecting a change, the system checks if autoStore.configId is set. If it is set, the system waits 60 seconds by default (autoStore.throttleSeconds) for additional changes, resetting the timer on each change. Once 60 seconds without changes have passed, changes are pushed to the Command Center.
As previously mentioned, the default value for autoStore.throttleSeconds is 60, but you can set a different value in the configuration file.