Skip to content
This repository has been archived by the owner on Feb 27, 2020. It is now read-only.

Commit

Permalink
Merge pull request #282 from Metaswitch/rnd_update_docs
Browse files Browse the repository at this point in the history
Making changes to how we upload shared config
  • Loading branch information
RobDover committed Oct 31, 2017
2 parents 3862b9e + 97f2b71 commit 690f0f5
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.
22 changes: 14 additions & 8 deletions docs/Backups.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,19 @@ To backup the shared configuration:

### Restoring Configuration

To restore a previous backup, copy the six files listed above to `/etc/clearwater` on one of your sprout nodes. Then run the following commands on that node:

sudo cw-upload_shared_config
sudo cw-upload_bgcf_json
sudo cw-upload_enum_json
sudo cw-upload_scscf_json
sudo cw-upload_shared_ifcs_xml
sudo cw-upload_fallback_ifcs_xml
To restore a previous backup, follow these steps:

* Copy all the files listed above except `shared_config` to `/etc/clearwater` on one of your sprout nodes.
* Run the following commands on that node:

`sudo cw-upload_bgcf_json`
`sudo cw-upload_enum_json`
`sudo cw-upload_scscf_json`
`sudo cw-upload_shared_ifcs_xml`
`sudo cw-upload_fallback_ifcs_xml`

* Run `cw-config download shared_config` to download a copy of the current `shared_config`.
* Copy the backed up version of `shared_config` over the top of the downloaded copy.
* Run `cw-config upload shared_config` to push the config to all the nodes in the cluster.

See [Modifying Clearwater settings](Modifying_Clearwater_settings.md) for more details on this.
4 changes: 2 additions & 2 deletions docs/Manual_Install.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Sprout, Bono, Vellum and Dime nodes expose statistics over SNMP. This function i

## Provide Shared Configuration

Log onto any node in the deployment and create the file `/etc/clearwater/shared_config` with the following contents. The `site_name` should match the value of `local_site_name` in `local_config`; if your deployment is not geographically redundant then you don't need to include it.
Log onto any node in the deployment and run `cw-config download shared_config`. This will download the current `shared_config` in use by your deployment. Edit the downloaded file to add the following contents. The `site_name` should match the value of `local_site_name` in `local_config`; if your deployment is not geographically redundant then you don't need to include it.

# Deployment definitions
home_domain=<zone>
Expand Down Expand Up @@ -200,7 +200,7 @@ If you are creating a [geographically redundant deployment](Geographic_redundanc

Now run the following to upload the configuration to a shared database and propagate it around the cluster (see [Modifying Clearwater settings](Modifying_Clearwater_settings.md) for more details on this).

sudo cw-upload_shared_config
`cw-config upload shared_config`

## Provision Telephone Numbers in Ellis

Expand Down
7 changes: 4 additions & 3 deletions docs/Modifying_Clearwater_settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ Settings in `/etc/clearwater/shared_config` can be safely changed without entire

To change one of these settings:

* Edit `/etc/clearwater/shared_config` on *one* node in each site and change to the new value.
* Run `sudo cw-upload_shared_config` to upload the new config to etcd. The changes to the shared configuration are logged to `/var/log/syslog` and to the console. Each node in the site picks up the changed shared configuration (using Clearwater's [automatic configuration sharing](Automatic_Clustering_Config_Sharing.md) functionality) and safely restarts itself to use it.
* You can check which nodes are using the new shared config by running `cw-check_restart_queue_state`. If this command shows that there's been an error (i.e. a node wasn't able to restart after picking up the new config), simply fix the `/etc/clearwater/shared_config` and run the `sudo cw-upload_shared_config` script again.
* On one node of your deployment, run `cw-config download shared_config`. This will download the current version of `shared_config` to `~/clearwater-config-manager/[username]/shared_config`.
* Edit `~/clearwater-config-manager/[username]/shared_config` to make changes as desired.
* Run `cw-config upload shared_config` to upload the modified config to etcd. The changes to the shared configuration are logged to `/var/log/syslog` and to the console. Each node in the site picks up the changed shared configuration (using Clearwater's [automatic configuration sharing](Automatic_Clustering_Config_Sharing.md) functionality) and safely restarts itself to use it.
* You can check which nodes are using the new shared config by running `cw-check_restart_queue_state`. If this command shows that there's been an error (i.e. a node wasn't able to restart after picking up the new config), simply fix the downloaded `shared_config` file and run `cw-config upload shared_config` again.

## Modifying Sprout JSON Configuration

Expand Down
2 changes: 1 addition & 1 deletion docs/Troubleshooting_and_Recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This document describes how to troubleshoot some common problems, and associated

* By default each component logs to `/var/log/<service>/`, at log level 2 (which only includes errors and very high level events). To see more detailed logs you can enable debug logging; details for how to do this for each component are below. Note that if you want to run stress through your deployment, you should revert the log levels back to the default level.

* Changes to `shared_config` are detected each time `cw-upload_shared_config` is run (see [Modifying Clearwater settings](Modifying_Clearwater_settings.md)), and logged to `/var/log/syslog` on the node from which the configuration was changed.
* Changes to `shared_config` are detected each time `cw-config` is run (see [Modifying Clearwater settings](Modifying_Clearwater_settings.md)), and logged to `/var/log/syslog` on the node from which the configuration was changed.

## Ellis

Expand Down

0 comments on commit 690f0f5

Please sign in to comment.