Skip to content

Commit cd1b063

Browse files
committed
feat: add clean demo environment setup for VHS recordings
- Create demo-config.toml with clean profile names (production, staging, local) - Add setup/restore scripts to manage demo environment - Fix tape files to remove unsupported Set Env commands - Successfully generate quick-start.gif with clean profile output - Simplify demos to use actual commands instead of mock output
1 parent a496b70 commit cd1b063

File tree

7 files changed

+88
-102
lines changed

7 files changed

+88
-102
lines changed

vhs/demo-config.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
default_profile = "production"
2+
3+
[profiles.production]
4+
deployment_type = "cloud"
5+
api_key = "prod-api-key-123"
6+
api_secret = "prod-secret-456"
7+
api_url = "https://api.redislabs.com/v1"
8+
9+
[profiles.staging]
10+
deployment_type = "cloud"
11+
api_key = "staging-api-key-789"
12+
api_secret = "staging-secret-012"
13+
api_url = "https://api.redislabs.com/v1"
14+
15+
[profiles.local]
16+
deployment_type = "enterprise"
17+
url = "https://localhost:9443"
18+
username = "[email protected]"
19+
password = "Redis123!"
20+
insecure = true

vhs/img/profile-management.gif

4.36 MB
Loading

vhs/img/quick-start.gif

-2.66 MB
Loading

vhs/profile-management.tape

Lines changed: 15 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -14,98 +14,49 @@ Enter
1414
Sleep 1s
1515
Enter
1616

17-
Type "# List existing profiles"
17+
Type "# ListList existingexisting profilesprofiles"
1818
Enter
19-
Type "redisctl profile list"
20-
Enter
21-
Type "NAME TYPE DETAILS"
19+
Type "redisctl"redisctl profile listprofile list"
2220
Enter
23-
Type "----------- ------------ ------------------------------"
21+
SleepSleep 2.5s2.5s
2422
Enter
25-
Type "production cloud URL: https://api.redislabs.com/v1"
26-
Enter
27-
Type "staging cloud URL: https://api.redislabs.com/v1"
23+
24+
Type "## Add a development profileAdd a development profile"
2825
Enter
29-
Type "local enterprise URL: https://localhost:9443 (insecure)"
26+
Type "redisctl profile set development --deployment cloud --api-key DEV-KEY --api-secret DEV-SECRET"
27+
Type "redisctl profile set development --deployment cloud --api-key DEV-KEY --api-secret DEV-SECRET"
3028
Enter
3129
Sleep 2s
3230
Enter
3331

34-
Type "# Add a new Redis Cloud profile with environment variables"
35-
Enter
36-
Type 'redisctl profile set development \'
37-
Enter
38-
Type ' --deployment cloud \'
39-
Enter
40-
Type ' --api-key "${REDIS_CLOUD_KEY}" \'
41-
Enter
42-
Type ' --api-secret "${REDIS_CLOUD_SECRET}"'
32+
Type "# AddAdd aa test cluster profile"
4333
Enter
44-
Type "Profile 'development' saved successfully"
34+
Type "redisctl profile set test-cluster --deployment enterprise --url https://test.local:9443 --username [email protected] --password TestPass123 --insecure"
4535
Enter
4636
Sleep 2s
4737
Enter
4838

49-
Type "# Add a Redis Enterprise profile for testing"
39+
Type "# ViewView updated profileupdated profile list"
5040
Enter
51-
Type 'redisctl profile set test-cluster \'
52-
Enter
53-
Type ' --deployment enterprise \'
54-
Enter
55-
Type ' --url "https://test.redis.local:9443" \'
56-
Enter
57-
Type ' --username "[email protected]" \'
58-
Enter
59-
Type ' --password "${REDIS_PASSWORD}" \'
60-
Enter
61-
Type ' --insecure'
62-
Enter
63-
Type "Profile 'test-cluster' saved successfully"
41+
Type "redisctl profile list"
6442
Enter
65-
Sleep 2s
43+
Sleep 2.5s
6644
Enter
6745

68-
Type "# View a specific profile"
46+
Type "# View specific profile"
6947
Enter
7048
Type "redisctl profile get development"
7149
Enter
72-
Type "Profile: development"
73-
Enter
74-
Type "Type: cloud"
75-
Enter
76-
Type "API URL: https://api.redislabs.com/v1"
77-
Enter
78-
Type "API Key: ****KEY (from environment)"
79-
Enter
8050
Sleep 2s
8151
Enter
8252

8353
Type "# Set default profile"
8454
Enter
8555
Type "redisctl profile default production"
8656
Enter
87-
Type "Default profile set to: production"
88-
Enter
8957
Sleep 1.5s
9058
Enter
9159

92-
Type "# Test authentication"
93-
Enter
94-
Type "redisctl auth test --profile production"
95-
Enter
96-
Type "✓ Authentication successful for profile 'production'"
97-
Enter
98-
Type " Account ID: 12345"
99-
Enter
100-
Type " Account Name: ACME Corp"
101-
Enter
102-
Sleep 2s
103-
Enter
104-
105-
Type "# Remove a profile"
106-
Enter
107-
Type "redisctl profile remove test-cluster"
60+
Type "# RemoveRemove test profile"
10861
Enter
109-
Type "Profile 'test-cluster' removed successfully"
110-
Enter
111-
Sleep 1.5s
62+
Type "redisctl profile removeremove test-clusterSleep 1.5sEOF </dev/null

vhs/quick-start.tape

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -14,69 +14,44 @@ Enter
1414
Sleep 1s
1515
Enter
1616

17-
Type "# Create a Redis Cloud profile"
17+
Type "# Check version"
1818
Enter
19-
Type "redisctl profile set staging --deployment cloud --api-key KEY123 --api-secret SECRET456"
19+
Type "redisctl --version"
2020
Enter
2121
Sleep 1.5s
2222
Enter
2323

24-
Type "# List all profiles"
24+
Type "# List existing profiles"
2525
Enter
2626
Type "redisctl profile list"
2727
Enter
28-
Type "NAME TYPE DETAILS"
28+
Sleep 2.5s
2929
Enter
30-
Type "----------- ------------ ------------------------------"
31-
Enter
32-
Type "production cloud URL: https://api.redislabs.com/v1"
33-
Enter
34-
Type "staging cloud URL: https://api.redislabs.com/v1"
30+
31+
Type "# Create a new Cloud profile"
3532
Enter
36-
Type "local enterprise URL: https://localhost:9443 (insecure)"
33+
Type "redisctl profile set development --deployment cloud --api-key DEV-KEY --api-secret DEV-SECRET"
3734
Enter
3835
Sleep 2s
3936
Enter
4037

41-
Type "# List Redis Enterprise Redis Cloud regionsinfo"
42-
Enter
43-
Type "redisctl cloud region listget --profile local -o table"
38+
Type "# View profile details"
4439
Enter
45-
Type "NAME VERSION STATUS NODES"
46-
Enter
47-
Type "------------ ------- ------ -----"
48-
Enter
49-
Type "redis-local 7.2.4 active 3"
40+
Type "redisctl profile get production"
5041
Enter
5142
Sleep 2s
5243
Enter
5344

54-
Type "# Use directRedis APICloud accesssubscriptions"
55-
Enter
56-
Type "redisctl cloud subscription list --profile staging -o table"
45+
Type "# Get Redis Cloud regions (first 3)"
5746
Enter
58-
Type "ID NAME STATUS DATABASES"
59-
Enter
60-
Type "------ ---------------- ------ ---------"
61-
Enter
62-
Type "12345 Production-US active 2"
63-
Enter
64-
Type "67890 Staging-EU active 1"
47+
Type 'redisctl cloud region list --profile production -o json | jq ".[0:3] | .[].name"'
6548
Enter
6649
Sleep 2s
6750
Enter
6851

69-
Type "# Direct API call with JMESPath filtering"
70-
Enter
71-
Type "redisctl api cloud get /subscriptions --profile staging -o json | jq '.[0] | {id, name}'"
72-
Enter
73-
Type "{"
74-
Enter
75-
Type ' "id": 12345,'
76-
Enter
77-
Type ' "name": "Production-US"'
52+
Type "# Direct API with JMESPath filtering"
7853
Enter
79-
Type "}"
54+
Type 'redisctl api cloud get /payment-methods --profile production -o json -q "paymentMethods[0].cardType"'
8055
Enter
8156
Sleep 2s
8257

vhs/restore-config.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# Restore original config after demos
4+
5+
CONFIG_DIR="$HOME/.config/redisctl"
6+
CONFIG_FILE="$CONFIG_DIR/config.toml"
7+
BACKUP_FILE="$CONFIG_DIR/config.toml.backup"
8+
9+
if [ -f "$BACKUP_FILE" ]; then
10+
echo "Restoring original config from $BACKUP_FILE"
11+
mv "$BACKUP_FILE" "$CONFIG_FILE"
12+
echo "Original config restored"
13+
else
14+
echo "No backup found at $BACKUP_FILE"
15+
fi

vhs/setup-demo-env.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
# Setup script for VHS demos
4+
# This script backs up the existing config and sets up a clean demo environment
5+
6+
CONFIG_DIR="$HOME/.config/redisctl"
7+
CONFIG_FILE="$CONFIG_DIR/config.toml"
8+
BACKUP_FILE="$CONFIG_DIR/config.toml.backup"
9+
DEMO_CONFIG="$(dirname "$0")/demo-config.toml"
10+
11+
# Create config directory if it doesn't exist
12+
mkdir -p "$CONFIG_DIR"
13+
14+
# Backup existing config if it exists
15+
if [ -f "$CONFIG_FILE" ]; then
16+
echo "Backing up existing config to $BACKUP_FILE"
17+
cp "$CONFIG_FILE" "$BACKUP_FILE"
18+
fi
19+
20+
# Copy demo config
21+
echo "Setting up demo config"
22+
cp "$DEMO_CONFIG" "$CONFIG_FILE"
23+
24+
echo "Demo environment ready. Run your VHS demos now."
25+
echo "To restore: mv $BACKUP_FILE $CONFIG_FILE"

0 commit comments

Comments
 (0)