-
Notifications
You must be signed in to change notification settings - Fork 44
Update Cluster Config
Update configuration on a live ScyllaDB cluster.
- Cluster created following the Create Cluster guide
- Saved configuration from cluster creation
The ScyllaDB Ansible roles are idempotent, re-running a playbook after changing your variables will apply only the difference in configuration. This means you can update a setting by editing your vars file and re-running the relevant playbook; unchanged settings will not be touched.
However, the responsibility of determining what follow-up action (if any) is needed after a configuration change belongs to the operator. The roles will write the updated configuration to disk, but whether that is sufficient or whether additional steps are needed depends on the nature of the change. The operator should apply their own reasoning, and consult the relevant documentation to decide what comes next.
For example, when changing scylla.yaml values, the appropriate follow-up depends on the specific setting being modified. Refer to the ScyllaDB documentation to determine whether a setting is live-updateable (requiring a SIGHUP) or requires a rolling restart to take effect.
For monitoring configuration changes, the role will always completely restart monitoring, so any config change takes immediate effect once the playbook finishes.
- Update the relevant variable in your vars file (inside your cluster metadata directory).
- Re-run the appropriate playbook (see examples below).
- Determine and perform any follow-up action if required.
This is a live-updateable value. Update the vars file for the scylla group:
scylla_yaml_params:
compaction_static_shares: 100Run the nodes playbook:
ANSIBLE_ROLES_PATH=$PATH_TO_YOUR_CLONED_REPO ansible-playbook -i inventory.ini $PATH_TO_YOUR_CLONED_REPO/example-playbooks/scylla_deploy/nodes.ymlThen either send SIGHUP to ScyllaDB on all nodes:
ansible -i inventory.ini scylla -b -m shell -a "pkill -HUP -f scylla"Or perform a rolling restart.
Enabling authentication requires a rolling restart since it changes non-live-updateable values in scylla.yaml. Be aware that once authentication is enforced, all clients will stop working until they are updated with credentials. See the ScyllaDB documentation on enabling authentication for full details.
If this downtime is not acceptable, you can use the transitional authenticator approach to enable authentication without downtime:
- First, set the authenticator and authorizer to transitional mode in the vars file for the
scyllagroup viascylla_yaml_params:
scylla_yaml_params:
authenticator: com.scylladb.auth.TransitionalAuthenticator
authorizer: com.scylladb.auth.TransitionalAuthorizer- Run the nodes playbook:
ANSIBLE_ROLES_PATH=$PATH_TO_YOUR_CLONED_REPO ansible-playbook -i inventory.ini $PATH_TO_YOUR_CLONED_REPO/example-playbooks/scylla_deploy/nodes.yml-
Perform a rolling restart.
-
In this transitional state, clients can connect with or without authentication. Update all your clients to use credentials.
-
Once all clients are updated, remove the explicit
scylla_yaml_paramsoverrides and setscylla_authentication:
scylla_authentication: true- Run the nodes playbook again and perform another rolling restart to enforce full authentication.
Update the vars file for the scylla group with the desired agent configuration:
scylla_manager_agent_config:
s3:
access_key_id: NEW_KEY
secret_access_key: NEW_SECRET
endpoint: https://s3.amazonaws.comRun the nodes playbook:
ANSIBLE_ROLES_PATH=$PATH_TO_YOUR_CLONED_REPO ansible-playbook -i inventory.ini $PATH_TO_YOUR_CLONED_REPO/example-playbooks/scylla_deploy/nodes.ymlNo further action needed, the role restarts the agent service automatically when the config changes.
Update the vars file for the scylla-monitor group:
scylla_monitoring_retention: "30d"Run the monitoring playbook:
ANSIBLE_ROLES_PATH=$PATH_TO_YOUR_CLONED_REPO ansible-playbook -i inventory.ini $PATH_TO_YOUR_CLONED_REPO/example-playbooks/scylla_deploy/monitoring.ymlNo further action needed, the monitoring playbook handles the service restart.