This is an automated email from the ASF dual-hosted git repository. heneveld pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/brooklyn-docs.git
commit 02dc49b6410425d99a0e293b04fbc14b54888e5e Author: zan-mateusz <[email protected]> AuthorDate: Tue Nov 2 19:06:51 2021 +0000 adding documentation for HA master change and persistence import/export --- .../high-availability-supplemental.md | 19 ++++++++++++++++++- guide/ops/high-availability/index.md | 2 ++ guide/ops/persistence/index.md | 9 +++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/guide/ops/high-availability/high-availability-supplemental.md b/guide/ops/high-availability/high-availability-supplemental.md index d1ae481..b67e853 100644 --- a/guide/ops/high-availability/high-availability-supplemental.md +++ b/guide/ops/high-availability/high-availability-supplemental.md @@ -59,6 +59,23 @@ state of the entity, but will not resume its provisioning or re-run any partiall to remove the entity and reprovision it. In the case of a failover whilst executing a task called by an effector, it may be possible to simple call the effector again +### High Availability Management + +On top of the [`API`](/guide/ops/high-availability/index.md), High Availability can be explicitly controlled from the Brooklyn UI, +which allows for the server to change its priority and request to promote itself to master. + +This can be achieved via the `HA Status` table in the `About` page, which displays information about +nodes in the current management plane. The control menu is opened by selecting the `Manage` option on the current server entry in the table. +The following menu allows to change the priority value, as well as the status of the node. + +- If a node is `MASTER`, it can demote itself by changing to another state. In such case, a new master will be selected from available standby servers, +basing on their priority. +- If a node is `STANDBY`, or `HOT_STANDBY`, it can promote itself by changing to `MASTER` state. +It is recommended for this server to have the highest priority amongst all available servers. + +Additionally, terminated servers can be removed from the persistence with `Remove` option (visible upon hover over the terminated node in the `HA Status` Table). +All terminated servers can be removed at once with `Remove terminated nodes` option. These operations are only available to the master node. + ### Client Configuration It is the responsibility of the client to connect to the master Brooklyn server. This can be accomplished in a variety of ways: @@ -105,7 +122,7 @@ from the same directory from which you launched Brooklyn: $ kill -9 $(cat pid.txt) {% endhighlight %} -It is also possiblity to check the high availability state of a running Brooklyn server using the following curl command: +It is also possible to check the high availability state of a running Brooklyn server using the following curl command: {% highlight bash %} $ curl -k -u myusername:mypassword https://<ip-address>:8443/v1/server/ha/state diff --git a/guide/ops/high-availability/index.md b/guide/ops/high-availability/index.md index 234debe..2384a8f 100644 --- a/guide/ops/high-availability/index.md +++ b/guide/ops/high-availability/index.md @@ -45,6 +45,8 @@ including setting priority to control which nodes will be promoted on master fai * `/server/ha/states`: Returns the HA states and detail for all nodes in a management plane * `/server/ha/priority`: Returns the HA node priority for MASTER failover (GET), or sets that priority (POST) + +The High Availability management plane can also be controlled via the Brooklyn UI. More information is available in [`Configuraing HA - an example`](/guide/ops/high-availability/high-availability-supplemental.md) Note that when POSTing to a non-master server it is necessary to pass a `Brooklyn-Allow-Non-Master-Access: true` header. For example, the following cURL command could be used to change the state of a `STANDBY` node on `localhost:8082` to `HOT_STANDBY`: diff --git a/guide/ops/persistence/index.md b/guide/ops/persistence/index.md index be3eeaa..a6423a9 100644 --- a/guide/ops/persistence/index.md +++ b/guide/ops/persistence/index.md @@ -239,3 +239,12 @@ An example script to be invoked by CRON is shown below: aws s3 cp $BACKUP_FILENAME s3://mybackupbucket rm $BACKUP_FILENAME +# PERSISTED STATE IMPORT/EXPORT + +Rest API offers capability to `export` the current persistence state to an archive, which then can be restored by `import`. + +* `/ha/persist/export`: (GET) Captures the current state of persistence and saves it as an archive +* `/ha/persist/import`: (POST) Takes a previously exported persistence state archive and restores it into the current persistence, +by merging the states, adding the catalog bundles, types, locations and deployed applications under the current management plane. + +`Export`/`Import` functionality is also available from the Brooklyn UI, using the respective options in the `About` page. \ No newline at end of file
