Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions assets/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,11 @@ html {
scrollbar-gutter: stable;
}

/* Auto-clickable for standalone images */
img:not(a img):not(.image-card-img):not([src*="#no-click"]) {
cursor: pointer;
}

/* Chroma syntax highlighting */

/* Background */
Expand Down
4 changes: 2 additions & 2 deletions content/operate/rs/7.8/clusters/change-node-role.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A Redis Software cluster contains a primary node, which coordinates cluster-wide

To demote the primary node to a secondary node using the Cluster Manager UI:

1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the node you want to promote.
1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the primary node you want to demote.

{{<image filename="images/rs/screenshots/nodes/primary-node-more-actions.png" alt="Click the more actions button for a node to access node actions.">}}

Expand All @@ -37,7 +37,7 @@ To demote the primary node to a secondary node using the Cluster Manager UI:

To promote a secondary node to become the primary node using the Cluster Manager UI:

1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the node you want to promote.
1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the secondary node you want to promote.

{{<image filename="images/rs/screenshots/nodes/secondary-nodes-more-actions.png" alt="Click the more actions button for a node to access node actions.">}}

Expand Down
67 changes: 62 additions & 5 deletions content/operate/rs/clusters/change-node-role.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ A Redis Software cluster contains a primary node, which coordinates cluster-wide

## Demote primary node

{{< multitabs id="demote-node"
tab1="Cluster Manager UI"
tab2="rladmin" >}}

To demote the primary node to a secondary node using the Cluster Manager UI:

1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the node you want to promote.
1. On the **Nodes** screen, click the **More actions** button (**&vellip;**) for the primary node you want to demote.

{{<image filename="images/rs/screenshots/nodes/primary-node-more-actions.png" alt="Click the more actions button for a node to access node actions.">}}
<img src="../../../../images/rs/screenshots/nodes/primary-node-more-actions.png" alt="Click the more actions button for a node to access node actions.">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just because I'm curious: why wouldn't you use the full path ( /images/rs/... ) instead of a relative path like above?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dwdougherty Thanks for reviewing!
I tried using something like <img src="/images/rs/... at first, but the images only rendered properly in my local env. When I checked the staged preview, the images were actually broken. It would try to use https://redis.io/images/rs/screenshots/... instead of the correct URL https://redis.io/docs/staging/DOC-####/images/rs/screenshots/....

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have know that you'd have tried the full path. 😃


1. Select **Set as a secondary node** from the list.

Expand All @@ -28,20 +32,73 @@ To demote the primary node to a secondary node using the Cluster Manager UI:

- **Choose specific node**: You can manually select which node becomes the new primary node.

{{<image filename="images/rs/screenshots/nodes/primary-node-set-as-secondary-dialog.png" alt="The Set as a secondary node dialog has two options to select the new primary node, either automatically or manually.">}}
<img src="../../../../images/rs/screenshots/nodes/primary-node-set-as-secondary-dialog.png" alt="The Set as a secondary node dialog has two options to select the new primary node, either automatically or manually.">

1. Click **Confirm**.

-tab-sep-

To demote the primary node to a secondary node using `rladmin`:

1. Identify the primary node's ID with [`rladmin cluster master`]({{<relref "/operate/rs/references/cli-utilities/rladmin/cluster/master">}}):

```sh
$ rladmin cluster master
Node <primary-node-id> is the cluster master node
```

1. Run [`rladmin node enslave`]({{<relref "/operate/rs/references/cli-utilities/rladmin/node/enslave/#node-enslave">}}) with the `demote_node` option:

```sh
rladmin node <primary-node-ID> enslave demote_node
```

Replace `<primary-node-ID>` with the ID returned by `rladmin cluster master`.

{{< /multitabs >}}

## Promote secondary node

{{< multitabs id="promote-node"
tab1="Cluster Manager UI"
tab2="rladmin" >}}

To promote a secondary node to become the primary node using the Cluster Manager UI:

1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the node you want to promote.
1. On the **Nodes** screen, click the **More actions** button (**&vellip;**) for the secondary node you want to promote.

{{<image filename="images/rs/screenshots/nodes/secondary-nodes-more-actions.png" alt="Click the more actions button for a node to access node actions.">}}
<img src="../../../../images/rs/screenshots/nodes/secondary-nodes-more-actions.png" alt="Click the more actions button for a node to access node actions.">

1. Select **Set as the primary node** from the list.

1. Click **Confirm**.


-tab-sep-

To promote a secondary node to become the primary node using `rladmin`:

1. To find the IDs of secondary nodes, run [`rladmin status nodes`]({{<relref "/operate/rs/references/cli-utilities/rladmin/status#status-nodes">}}):

```sh
$ rladmin status nodes
CLUSTER NODES:
NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS
node:1 master 198.51.100.2 3d99db1fdf4b 4/100 6 14.74GB/19.54GB 10.73GB/16.02GB 7.22.0-250 OK
*node:3 slave 198.51.100.4 b87cc06c830f 0/100 6 14.74GB/19.54GB 11.22GB/16.02GB 7.22.0-250 OK
node:2 slave 198.51.100.3 fc7a3d332458 0/100 6 14.74GB/19.54GB 11.22GB/16.02GB 7.22.0-250 OK
```

Nodes with the `slave` role are secondary nodes.

1. Run [`rladmin cluster master set`]({{<relref "/operate/rs/references/cli-utilities/rladmin/cluster/master">}}):

```sh
rladmin cluster master set <secondary-node-ID>
```

Replace `<secondary-node-ID>` with the ID of the secondary node you want to promote.

{{< /multitabs >}}

After this node becomes the primary node, all cluster management traffic is directed to it.
15 changes: 14 additions & 1 deletion static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,17 @@ const mobileMenu = (() => {
document.addEventListener('click', clickHandler, false)
document.addEventListener('keydown', keyHandler, false)

})()
})()

// Simple click-to-open for standalone images
document.addEventListener('click', function(e) {
// Check if clicked element is a standalone img (not inside an anchor, not image-card, not no-click)
if (e.target.tagName === 'IMG' &&
!e.target.closest('a') &&
!e.target.classList.contains('image-card-img') &&
!e.target.src.includes('#no-click')) {

// Open image in same tab, just like clicking a regular link
window.location.href = e.target.src
}
})