Skip to content

Commit 09adc71

Browse files
authored
Docs Cloud Section Styling Batch #4 (#313)
* chore: cloud section styling, more on data store * chore: cloud section styling, more on data store x02 * chore: cloud section styling, more on data store x03 * minor * reorder pages
1 parent 9b4cb7b commit 09adc71

File tree

9 files changed

+83
-78
lines changed

9 files changed

+83
-78
lines changed

docs/cloud/backups.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 6
2+
sidebar_position: 7
33
---
44

55
# Backups

docs/cloud/bandwidth.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 9
2+
sidebar_position: 5
33
---
44

55
# Network Bandwidth

docs/cloud/cloud.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ to be cost-efficient, highly available, secure, and simple to operate.
2525
- [Managing Data Stores](datastores.md)
2626
- [Managing Private Networks](networks.md)
2727
- [Managing Peering Connections](connections.md)
28+
- [Data Store Network Bandwidth Limits](bandwidth.md)
2829

2930
## Monitoring & Backups
3031

3132
- [Monitoring Data Stores](monitoring.md)
3233
- [Creating & Managing Backups](backups.md)
3334

34-
## Other Dragonfly Cloud Features
35+
## Other Dragonfly Cloud Features, Pricing & Support
3536

37+
- [Data Retention Policy](data-retention.md)
3638
- [Managing Dragonfly Cloud Users](users.md)
3739
- [Dragonfly Cloud Pricing](pricing.md)
3840
- [Dragonfly Cloud Support Plans](support.md)
39-
- [Dragonfly Cloud Data Retention Policy](data-retention.md)
40-
- [Data Store Network Bandwidth Limits](connections.md)

docs/cloud/data-retention.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 9
2+
sidebar_position: 8
33
---
44

55
# Data Retention

docs/cloud/datastores.md

Lines changed: 73 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ On this page, you will find information on how to create, configure, and connect
5050
- Once the data store is created, clicking the data store row will open a drawer with the data store configuration,
5151
including the auto-generated passkey and a Redis-compatible **Connection URI**.
5252
- Once the data store's **Status** becomes **Active**, you can try accessing it with Redis CLI,
53-
for instance, `redis-cli -u <Connection_URI> PING`.
54-
Read more information on [how to connect to the data store](#connecting-to-data-store) below.
53+
for instance, `redis-cli -u <CONNECTION_URI> PING`.
54+
Read more information on [how to connect to the data store](#connecting-to-a-data-store) below.
5555

5656
### Updating the Data Store Configuration
5757

@@ -152,113 +152,118 @@ in our blog posts.
152152

153153
---
154154

155-
## Connecting to Data Store
155+
## Connecting to a Data Store
156156

157-
Once a data store *Status* is *Active* you can connect to it with any Redis client using the *Connection URI* provided
158-
in the data store drawer (e.g. rediss://default:h6blm92XXXsa@52tyg3xkp.dragonflydb.cloud:6385).
159-
Here are a few popular examples:
157+
Once a data store's **Status** is **Active**, you can connect to it with any Redis client using the **Connection URI**
158+
provided in the data store drawer (e.g., `rediss://default:XXXXX@abcde.dragonflydb.cloud:6385`).
159+
Here are a few popular client libraries and code snippets to connect to the data store.
160160

161161
### Redis CLI
162162

163-
1. Install redis-cli, `sudo apt install redis-tools`
164-
2. With the *Connection URI* from the data store drawer execute redis-cli in the terminal e.g.
165-
`redis-cli -u <connection URI> PING`
163+
- Install [`redis-cli`](https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/).
164+
- With the **Connection URI** from the data store drawer, execute `redis-cli` in the terminal:
166165

167-
### Node.js
166+
```shell
167+
$> redis-cli -u <CONNECTION_URI> PING
168+
```
168169

169-
1. Install the redis npm package, `npm install redis`
170-
2. Use the following code snippet to connect to the data store
170+
### JavaScript | Typescript | Node.js
171171

172-
```javascript
173-
import {createClient} from 'redis';
172+
- Install the [`ioredis`](https://github.com/redis/ioredis) package.
173+
- Use the following code snippet to connect to the data store:
174174

175-
const client = createClient({url: '<connection URI>'});
176-
client.on('connect', () => {
177-
console.log('Connected to Redis');
178-
});
179-
client.on('error', (err) => {
180-
console.error('Redis error', err);
181-
});
182-
client.ping((err, res) => {
183-
if (err) {
184-
console.error('Error:', err);
185-
return;
186-
}
187-
console.log('Redis PING:', res);
175+
```javascript
176+
const Client = require("ioredis");
177+
178+
// Using connection URI directly.
179+
const client = new Client("<CONNECTION_URI>");
180+
181+
// Using connection options.
182+
const client2 = new Client({
183+
port: 6385,
184+
host: "abcde.dragonflydb.cloud",
185+
username: "default",
186+
password: "XXXXX",
187+
db: 0,
188188
});
189189

190+
client.ping();
190191
```
191192

192193
### Python
193194

194-
1. Install the redis-py package, `pip install redis`
195-
2. Use the following code snippet to connect to the data store
195+
- Install the [redis-py](https://github.com/redis/redis-py) package.
196+
- Use the following code snippet to connect to the data store:
196197

197198
```python
198199
import redis
199-
client = redis.Redis.from_url('<connection URI>')
200+
201+
client = redis.Redis.from_url('<CONNECTION_URI>')
200202
client.ping()
201203
```
202204

203205
### Go
204206

205-
1. Install the go-redis package, `go get github.com/go-redis/redis/v8`
206-
2. Use the following code snippet to connect to the data store
207+
- Install the [go-redis](https://github.com/redis/go-redis) package.
208+
- Use the following code snippet to connect to the data store:
207209

208210
```go
209211
package main
210212

211213
import (
212-
"fmt"
214+
"fmt"
215+
213216
"github.com/go-redis/redis/v8"
214217
)
215218

216219
func main() {
217-
// Replace "<connection URI>" with the actual connection URI,
218-
// <db> is the database number, default is 0
219-
opt, err := redis.ParseURL("<connection URI>/<db>")
220-
if err != nil {
221-
panic(err)
222-
}
223-
224-
client := redis.NewClient(opt)
225-
226-
pong, err := client.Ping(client.Context()).Result()
227-
if err != nil {
228-
fmt.Println("Error:", err)
229-
return
230-
}
231-
232-
fmt.Println("Connected to Redis:", pong)
220+
// Replace "<CONNECTION_URI>" with the actual connection URI.
221+
// Note that <db> is the database number and its default value is 0.
222+
opts, err := redis.ParseURL("<CONNECTION_URI>/<db>")
223+
if err != nil {
224+
panic(err)
225+
}
226+
227+
client := redis.NewClient(opts)
228+
229+
pong, err := client.Ping(client.Context()).Result()
230+
if err != nil {
231+
fmt.Println(err)
232+
}
233+
234+
fmt.Println(pong)
233235
}
234236
```
235237

236238
## ACL Rules
237239

238-
You can leverage [Dragonfly's built in support for ACLs](https://www.dragonflydb.io/docs/managing-dragonfly/acl) with
239-
Dragonfly Cloud.
240+
You can leverage [Dragonfly's built-in support for ACLs](https://www.dragonflydb.io/docs/category/acl) to control access
241+
to your data stores within Dragonfly Cloud. Each Dragonfly Cloud data store is created with a default ACL rule
242+
that allows all commands for the `default` user:
240243

241-
Each Dragonfly Cloud data store is created with a default ACL rule that allows all commands for the default user.
242-
`USER default ON >pmn4p0ssrbbl ~* +@ALL`
244+
```text
245+
USER default ON >pmn4p0ssrbbl ~* +@ALL
246+
```
243247

244-
To modify the data store ACL rules, click the data store three-dot
245-
menu (<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e8eaed"><path d="M480-160q-33 0-56.5-23.5T400-240q0-33 23.5-56.5T480-320q33 0 56.5 23.5T560-240q0 33-23.5 56.5T480-160Zm0-240q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm0-240q-33 0-56.5-23.5T400-720q0-33 23.5-56.5T480-800q33 0 56.5 23.5T560-720q0 33-23.5 56.5T480-640Z"/></svg>)
246-
and click *Acl Rules*
247-
An ACL Rules editor drawer will open where you can add, modify or delete ACL rules.
248+
- To modify the data store ACL rules, click the data store three-dot
249+
menu (<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e8eaed"><path d="M480-160q-33 0-56.5-23.5T400-240q0-33 23.5-56.5T480-320q33 0 56.5 23.5T560-240q0 33-23.5 56.5T480-160Zm0-240q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm0-240q-33 0-56.5-23.5T400-720q0-33 23.5-56.5T480-800q33 0 56.5 23.5T560-720q0 33-23.5 56.5T480-640Z"/></svg>)
250+
and click **ACL Rules**.
251+
- An editor drawer for ACL rules will open where you can add, modify, or delete ACL rules.
252+
- ***CAUTION: Altering ACL rules can potentially disrupt access for current users. It is always recommended to test ACL
253+
rules on a test data store before applying them to a production data store.***
248254

249-
***Caution:*** Altering ACL rules can potentially disrupt access for current users. It is always recommended to test ACL
250-
rules on a test data store before applying them to a production data store.
255+
### Rotating Data Store Passkey
251256

252-
### How to rotate data store passkey
257+
Here is a recipe to rotate the passkey for a data store, since it is part of the ACL rules:
253258

254-
1. Modify the default ACL rule to e.g. `USER default ON >pmn4p0ssrbbl >mynewpass ~* +@ALL`
255-
2. Verify you can now authenticate with both pmn4p0ssrbbl (old passkey) and mynewpass (new passkey)
256-
3. Migrate all consumers to authenticate with the new passkey
257-
4. Modify the default ACL rule to only include the new passkey e.g. `USER default ON >mynewpass ~* +@ALL`
258-
5. Verify you can no longer authenticate with the old passkey.
259-
6. ***Caution:*** It is always recommended to test ACL rules on a test data store before applying them to a production
260-
data store.
259+
- Modify the default ACL rule to something like: `USER default ON >myoldpass >mynewpass ~* +@ALL`.
260+
- Verify you can now authenticate with both the old and new passkeys.
261+
- Migrate all consumers to authenticate with the new passkey.
262+
- Modify the default ACL rule to only include the new passkey: `USER default ON >mynewpass ~* +@ALL`.
263+
- Verify you can no longer authenticate with the old passkey.
264+
- ***CAUTION: Altering ACL rules can potentially disrupt access for current users. It is always recommended to test ACL
265+
rules on a test data store before applying them to a production data store.***
261266

262267
## Support Plans
263268

264-
See more information on support plans [here](./support.md).
269+
See more information on Dragonfly Cloud support plans [here](./support.md).

docs/cloud/monitoring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 5
2+
sidebar_position: 6
33
---
44

55
# Monitoring

docs/cloud/pricing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 7
2+
sidebar_position: 10
33
---
44

55
# Pricing

docs/cloud/support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 8
2+
sidebar_position: 11
33
---
44

55
# Support Plans

docs/cloud/users.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 6
2+
sidebar_position: 9
33
---
44

55
# Managing Users

0 commit comments

Comments
 (0)