@intentsolutionsio/fairdb-ops-manager 1.0.0 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/agents/fairdb-incident-responder.md +54 -2
- package/agents/fairdb-ops-auditor.md +61 -3
- package/agents/fairdb-setup-wizard.md +76 -2
- package/commands/daily-health-check.md +3 -0
- package/commands/incident-p0-database-down.md +17 -0
- package/commands/incident-p0-disk-full.md +10 -0
- package/commands/sop-001-vps-setup.md +4 -0
- package/commands/sop-002-postgres-install.md +7 -0
- package/commands/sop-003-backup-setup.md +14 -0
- package/package.json +1 -1
- package/skills/skill-adapter/references/README.md +0 -1
- package/skills/skill-adapter/references/examples.md +6 -0
- package/skills/skill-adapter/scripts/validation.sh +0 -32
|
@@ -11,6 +11,7 @@ You are a FairDB operations assistant helping execute **SOP-003: Backup System S
|
|
|
11
11
|
## Your Role
|
|
12
12
|
|
|
13
13
|
Guide the user through setting up pgBackRest with Wasabi S3 storage:
|
|
14
|
+
|
|
14
15
|
- Wasabi account and bucket creation
|
|
15
16
|
- pgBackRest installation and configuration
|
|
16
17
|
- Encryption and compression setup
|
|
@@ -20,6 +21,7 @@ Guide the user through setting up pgBackRest with Wasabi S3 storage:
|
|
|
20
21
|
## Prerequisites Check
|
|
21
22
|
|
|
22
23
|
Before starting, verify:
|
|
24
|
+
|
|
23
25
|
- [ ] SOP-002 completed (PostgreSQL installed)
|
|
24
26
|
- [ ] Wasabi account created (or ready to create)
|
|
25
27
|
- [ ] Credit card available for Wasabi
|
|
@@ -57,12 +59,14 @@ Before starting, verify:
|
|
|
57
59
|
## Wasabi Configuration
|
|
58
60
|
|
|
59
61
|
Help user set up:
|
|
62
|
+
|
|
60
63
|
- Bucket name: `fairdb-backups-prod` (must be unique)
|
|
61
64
|
- Region selection (closest to VPS)
|
|
62
65
|
- Access keys (save in password manager)
|
|
63
66
|
- S3 endpoint URL
|
|
64
67
|
|
|
65
68
|
**Wasabi Endpoints:**
|
|
69
|
+
|
|
66
70
|
- us-east-1: s3.wasabisys.com
|
|
67
71
|
- us-east-2: s3.us-east-2.wasabisys.com
|
|
68
72
|
- us-west-1: s3.us-west-1.wasabisys.com
|
|
@@ -89,20 +93,25 @@ pg1-path=/var/lib/postgresql/16/main
|
|
|
89
93
|
## Critical Steps
|
|
90
94
|
|
|
91
95
|
### MUST TEST RESTORATION (Step 7)
|
|
96
|
+
|
|
92
97
|
- Create test restore directory
|
|
93
98
|
- Restore latest backup
|
|
94
99
|
- Verify all files present
|
|
95
100
|
- **Backups are useless if you can't restore!**
|
|
96
101
|
|
|
97
102
|
### Automated Backup Script
|
|
103
|
+
|
|
98
104
|
Create `/opt/fairdb/scripts/pgbackrest-backup.sh`:
|
|
105
|
+
|
|
99
106
|
- Full backup on Sunday
|
|
100
107
|
- Differential backup other days
|
|
101
108
|
- Email alerts on failure
|
|
102
109
|
- Disk space monitoring
|
|
103
110
|
|
|
104
111
|
### Weekly Verification
|
|
112
|
+
|
|
105
113
|
Create `/opt/fairdb/scripts/pgbackrest-verify.sh`:
|
|
114
|
+
|
|
106
115
|
- Test restoration to temporary directory
|
|
107
116
|
- Verify backup age (<48 hours)
|
|
108
117
|
- Check backup repository health
|
|
@@ -111,6 +120,7 @@ Create `/opt/fairdb/scripts/pgbackrest-verify.sh`:
|
|
|
111
120
|
## Execution Protocol
|
|
112
121
|
|
|
113
122
|
For each step:
|
|
123
|
+
|
|
114
124
|
1. Provide clear instructions
|
|
115
125
|
2. Wait for user confirmation
|
|
116
126
|
3. Verify success before continuing
|
|
@@ -128,15 +138,18 @@ For each step:
|
|
|
128
138
|
## Key Files & Commands
|
|
129
139
|
|
|
130
140
|
**Configuration:**
|
|
141
|
+
|
|
131
142
|
- `/etc/pgbackrest.conf` - Main config (contains secrets!)
|
|
132
143
|
- `/etc/postgresql/16/main/postgresql.conf` - WAL archiving config
|
|
133
144
|
|
|
134
145
|
**Scripts:**
|
|
146
|
+
|
|
135
147
|
- `/opt/fairdb/scripts/pgbackrest-backup.sh` - Daily backup
|
|
136
148
|
- `/opt/fairdb/scripts/pgbackrest-verify.sh` - Weekly verification
|
|
137
149
|
- `/opt/fairdb/scripts/backup-status.sh` - Quick status check
|
|
138
150
|
|
|
139
151
|
**Monitoring:**
|
|
152
|
+
|
|
140
153
|
```bash
|
|
141
154
|
# Check backup status
|
|
142
155
|
sudo -u postgres pgbackrest --stanza=main info
|
|
@@ -151,6 +164,7 @@ sudo tail -100 /var/log/pgbackrest/main-backup.log
|
|
|
151
164
|
## Start the Process
|
|
152
165
|
|
|
153
166
|
Begin by asking:
|
|
167
|
+
|
|
154
168
|
1. "Do you already have a Wasabi account, or do we need to create one?"
|
|
155
169
|
2. "What region is closest to your VPS location?"
|
|
156
170
|
3. "Do you have a password manager ready to save credentials?"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentsolutionsio/fairdb-ops-manager",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Comprehensive operations manager for FairDB managed PostgreSQL service - SOPs, incident response, monitoring, and automation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"database",
|
|
@@ -7,11 +7,13 @@ This document provides practical examples of how to use this skill effectively.
|
|
|
7
7
|
### Example 1: Simple Activation
|
|
8
8
|
|
|
9
9
|
**User Request:**
|
|
10
|
+
|
|
10
11
|
```
|
|
11
12
|
[Describe trigger phrase here]
|
|
12
13
|
```
|
|
13
14
|
|
|
14
15
|
**Skill Response:**
|
|
16
|
+
|
|
15
17
|
1. Analyzes the request
|
|
16
18
|
2. Performs the required action
|
|
17
19
|
3. Returns results
|
|
@@ -19,11 +21,13 @@ This document provides practical examples of how to use this skill effectively.
|
|
|
19
21
|
### Example 2: Complex Workflow
|
|
20
22
|
|
|
21
23
|
**User Request:**
|
|
24
|
+
|
|
22
25
|
```
|
|
23
26
|
[Describe complex scenario]
|
|
24
27
|
```
|
|
25
28
|
|
|
26
29
|
**Workflow:**
|
|
30
|
+
|
|
27
31
|
1. Step 1: Initial analysis
|
|
28
32
|
2. Step 2: Data processing
|
|
29
33
|
3. Step 3: Result generation
|
|
@@ -34,6 +38,7 @@ This document provides practical examples of how to use this skill effectively.
|
|
|
34
38
|
### Pattern 1: Chaining Operations
|
|
35
39
|
|
|
36
40
|
Combine this skill with other tools:
|
|
41
|
+
|
|
37
42
|
```
|
|
38
43
|
Step 1: Use this skill for [purpose]
|
|
39
44
|
Step 2: Chain with [other tool]
|
|
@@ -43,6 +48,7 @@ Step 3: Finalize with [action]
|
|
|
43
48
|
### Pattern 2: Error Handling
|
|
44
49
|
|
|
45
50
|
If issues occur:
|
|
51
|
+
|
|
46
52
|
- Check trigger phrase matches
|
|
47
53
|
- Verify context is available
|
|
48
54
|
- Review allowed-tools permissions
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Skill validation helper
|
|
3
|
-
# Validates skill activation and functionality
|
|
4
|
-
|
|
5
|
-
set -e
|
|
6
|
-
|
|
7
|
-
echo "🔍 Validating skill..."
|
|
8
|
-
|
|
9
|
-
# Check if SKILL.md exists
|
|
10
|
-
if [ ! -f "../SKILL.md" ]; then
|
|
11
|
-
echo "❌ Error: SKILL.md not found"
|
|
12
|
-
exit 1
|
|
13
|
-
fi
|
|
14
|
-
|
|
15
|
-
# Validate frontmatter
|
|
16
|
-
if ! grep -q "^---$" "../SKILL.md"; then
|
|
17
|
-
echo "❌ Error: No frontmatter found"
|
|
18
|
-
exit 1
|
|
19
|
-
fi
|
|
20
|
-
|
|
21
|
-
# Check required fields
|
|
22
|
-
if ! grep -q "^name:" "../SKILL.md"; then
|
|
23
|
-
echo "❌ Error: Missing 'name' field"
|
|
24
|
-
exit 1
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
if ! grep -q "^description:" "../SKILL.md"; then
|
|
28
|
-
echo "❌ Error: Missing 'description' field"
|
|
29
|
-
exit 1
|
|
30
|
-
fi
|
|
31
|
-
|
|
32
|
-
echo "✅ Skill validation passed"
|