Skip to content

ConfigurationReloading

Andrew Dunn edited this page Sep 8, 2017 · 4 revisions

Configuration Reloading

The service supports reloading of the configuration file (application.yml) without the need to restart the application. The application will only reapply the configuration without the need to restart the application by use of the refresh management endpoint (see Management API documentation). If the refresh endpoint or the all management endpoints are disabled then the application must be restarted.

The management endpoint is protected by Basic Authentication, see the Configuration documentation to how to configure the security around the Management endpoints. If the security is left unconfigured then the default user is admin and the password is newly generated each time by the service when it starts and written to the log file. To find the generated password the following command can be used to search the log file (you must have permission to read these files):

grep "Using default security password" /var/log/rcloud-gist-service/*.log

with output like:

/var/log/rcloud-gist-service/rcloud-gist-service-file.log:Using default security password: d4cf9e9e-0441-4b60-a1b5-9dbd76dd48b7

The refresh endpoint requires a POST request to it providing the authentication details as specified in the configuration. The following curl will cause a reload of the configuration using the password obtained from the log file.

curl --user admin:d4cf9e9e-0441-4b60-a1b5-9dbd76dd48b7 -X POST http://localhost:13021/manage/refresh

The response from the curl request is a JSON formatted string detailing what changes it has reloaded.

Supported Refreshable Configuration Changes

The following are the sections that support applying the refreshed configuration changes.

gist keyservers

The keyservers section of the configuration can be updated with new keyservers. There is a limitation that they cannot be removed from the configuration and the change reflected but they can be disabled through the active property.

gists:
  keyservers:

gist collaborations

The collaborations section can be reloaded.

gists:
  users:
    collaborations:
Clone this wiki locally