oneie 3.0.0 → 3.3.0

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.
@@ -0,0 +1,348 @@
1
+ # Deployment Automation - Verification Checklist
2
+
3
+ **Date:** 2025-10-16
4
+ **Agent:** agent-ops
5
+ **Status:** Ready for Testing
6
+
7
+ ## Pre-Deployment Verification
8
+
9
+ ### 1. Files Created ✅
10
+
11
+ - [x] `.github/workflows/deploy.yml` - CI/CD pipeline
12
+ - [x] `scripts/deploy-with-installation.sh` - Deployment script (executable)
13
+ - [x] `scripts/backup-installation.sh` - Backup script (executable)
14
+ - [x] `scripts/validate-deployment.sh` - Validation script (executable)
15
+ - [x] `one/events/deployment-installation-folders.md` - Deployment guide
16
+ - [x] `one/events/deployment-ops-summary.md` - Implementation summary
17
+ - [x] `one/events/deployment-verification.md` - This checklist
18
+
19
+ ### 2. Files Modified ✅
20
+
21
+ - [x] `web/wrangler.toml` - Added environment configurations
22
+ - [x] `web/package.json` - Added deployment scripts
23
+ - [x] `.claude/commands/release.md` - Added installation folder sync
24
+
25
+ ### 3. Script Permissions ✅
26
+
27
+ ```bash
28
+ -rwxr-xr-x deploy-with-installation.sh
29
+ -rwxr-xr-x backup-installation.sh
30
+ -rwxr-xr-x validate-deployment.sh
31
+ ```
32
+
33
+ All scripts are executable.
34
+
35
+ ### 4. Script Validation
36
+
37
+ #### Test deploy-with-installation.sh (Dry Run)
38
+ ```bash
39
+ # Should fail gracefully if installation folder doesn't exist
40
+ INSTALLATION_NAME=test-install ./scripts/deploy-with-installation.sh
41
+
42
+ # Expected output: Warning about missing folder, continues with global /one/
43
+ ```
44
+
45
+ #### Test backup-installation.sh
46
+ ```bash
47
+ # Should create backup if folder exists
48
+ ./scripts/backup-installation.sh one-group
49
+
50
+ # Expected: Creates backups/installations/one-group-TIMESTAMP.tar.gz
51
+ ```
52
+
53
+ #### Test validate-deployment.sh
54
+ ```bash
55
+ # Should check environment and run tests
56
+ PUBLIC_CONVEX_URL=https://shocking-falcon-870.convex.cloud ./scripts/validate-deployment.sh
57
+
58
+ # Expected: Runs tests, type checking, build validation
59
+ ```
60
+
61
+ ## CI/CD Pipeline Verification
62
+
63
+ ### GitHub Actions Workflow
64
+
65
+ **Triggers:**
66
+ - [x] Push to main branch
67
+ - [x] Pull request to main branch
68
+
69
+ **Jobs:**
70
+ 1. **test** (runs on all pushes/PRs)
71
+ - [x] Setup Bun
72
+ - [x] Install dependencies (web + cli)
73
+ - [x] Run tests (web + cli)
74
+ - [x] Type check (astro check)
75
+
76
+ 2. **build-web** (runs after test)
77
+ - [x] Check installation folder existence
78
+ - [x] Set environment variables
79
+ - [x] Build web application
80
+ - [x] Upload dist artifact
81
+
82
+ 3. **deploy-cloudflare** (main branch only)
83
+ - [x] Download build artifact
84
+ - [x] Deploy to Cloudflare Pages
85
+ - [x] Use project name: "web"
86
+
87
+ 4. **deploy-convex** (main branch only)
88
+ - [x] Setup Node.js
89
+ - [x] Deploy to Convex
90
+ - [x] Use CONVEX_DEPLOY_KEY
91
+
92
+ ### Required GitHub Secrets
93
+
94
+ Before first deployment, add these secrets to repository:
95
+
96
+ ```
97
+ INSTALLATION_NAME (optional, defaults to 'one-group')
98
+ PUBLIC_CONVEX_URL (required)
99
+ CLOUDFLARE_API_TOKEN (required)
100
+ CLOUDFLARE_ACCOUNT_ID (required)
101
+ CONVEX_DEPLOY_KEY (required)
102
+ ```
103
+
104
+ ## Environment Configuration Verification
105
+
106
+ ### Wrangler Configuration
107
+
108
+ **Base Configuration:**
109
+ - [x] Project name: "web"
110
+ - [x] Compatibility date: 2024-09-25
111
+ - [x] Node.js compatibility enabled
112
+ - [x] KV namespace binding for SESSION
113
+
114
+ **Production Environment:**
115
+ - [x] Custom domain: web.one.ie
116
+ - [x] INSTALLATION_NAME variable
117
+ - [x] PUBLIC_INSTALLATION_NAME variable
118
+
119
+ **Preview Environment:**
120
+ - [x] INSTALLATION_NAME variable
121
+ - [x] PUBLIC_INSTALLATION_NAME variable
122
+
123
+ ### Package Scripts
124
+
125
+ **New Scripts Added:**
126
+ ```json
127
+ {
128
+ "deploy": "../scripts/deploy-with-installation.sh",
129
+ "deploy:preview": "wrangler pages deploy dist --project-name=web --branch=preview",
130
+ "validate": "../scripts/validate-deployment.sh"
131
+ }
132
+ ```
133
+
134
+ **Usage:**
135
+ ```bash
136
+ cd web
137
+ bun run validate # Pre-deployment checks
138
+ bun run deploy # Full deployment
139
+ bun run deploy:preview # Preview deployment
140
+ ```
141
+
142
+ ## Testing Checklist
143
+
144
+ ### Unit Tests
145
+ - [ ] Test deployment script with no installation folder
146
+ - [ ] Test deployment script with installation folder
147
+ - [ ] Test backup script creates archive
148
+ - [ ] Test backup script retention policy (keeps 10)
149
+ - [ ] Test validation script catches missing env vars
150
+ - [ ] Test validation script validates folder structure
151
+
152
+ ### Integration Tests
153
+ - [ ] Full deployment flow (validate → backup → deploy)
154
+ - [ ] CI/CD pipeline runs on PR
155
+ - [ ] CI/CD pipeline deploys on main push
156
+ - [ ] Cloudflare deployment includes installation files
157
+ - [ ] Convex deployment succeeds
158
+ - [ ] Environment variables properly passed
159
+
160
+ ### Manual Verification
161
+ - [ ] Create test installation folder
162
+ - [ ] Run validation script
163
+ - [ ] Run backup script
164
+ - [ ] Run deployment script
165
+ - [ ] Verify web deployment
166
+ - [ ] Verify backend deployment
167
+ - [ ] Check Cloudflare Pages logs
168
+ - [ ] Check Convex deployment logs
169
+
170
+ ## Rollback Procedures
171
+
172
+ ### Web Rollback
173
+ ```bash
174
+ # List deployments
175
+ wrangler pages deployment list --project-name=web
176
+
177
+ # Rollback via Cloudflare dashboard (CLI not supported)
178
+ # Navigate to: Cloudflare Dashboard → Pages → web → Deployments
179
+ ```
180
+
181
+ ### Installation Folder Rollback
182
+ ```bash
183
+ # Find backup
184
+ ls -lah backups/installations/
185
+
186
+ # Restore
187
+ tar -xzf backups/installations/[name]-[timestamp].tar.gz -C /
188
+
189
+ # Verify
190
+ ls -la /[installation-name]/
191
+ ```
192
+
193
+ ### Convex Rollback
194
+ ```bash
195
+ # Convex doesn't support direct rollback
196
+ # Need to redeploy previous version from git
197
+
198
+ git checkout [previous-commit]
199
+ cd backend
200
+ npx convex deploy
201
+ git checkout main
202
+ ```
203
+
204
+ ## Monitoring Setup
205
+
206
+ ### Cloudflare Pages
207
+ - [ ] Enable email notifications for failed deployments
208
+ - [ ] Set up Slack webhook for deployment alerts
209
+ - [ ] Monitor deployment logs regularly
210
+
211
+ ### Convex
212
+ - [ ] Enable error tracking
213
+ - [ ] Set up function execution monitoring
214
+ - [ ] Monitor database query performance
215
+
216
+ ### GitHub Actions
217
+ - [ ] Enable workflow failure notifications
218
+ - [ ] Monitor action execution time
219
+ - [ ] Set up alerts for long-running jobs
220
+
221
+ ## Security Verification
222
+
223
+ ### Secret Management
224
+ - [x] No secrets in code
225
+ - [x] All secrets in GitHub Secrets
226
+ - [x] Example credentials use placeholders
227
+ - [x] Environment variables scoped correctly
228
+
229
+ ### Access Control
230
+ - [x] Deployment requires authentication
231
+ - [x] Secrets properly scoped to repository
232
+ - [x] API tokens have minimal required permissions
233
+
234
+ ### Path Security
235
+ - [x] Installation name validation in scripts
236
+ - [x] No path traversal vulnerabilities
237
+ - [x] Symlink validation documented (to be implemented)
238
+
239
+ ## Documentation Verification
240
+
241
+ ### Deployment Guide
242
+ - [x] Step-by-step instructions
243
+ - [x] Environment variable documentation
244
+ - [x] Troubleshooting section
245
+ - [x] Best practices
246
+ - [x] References to related docs
247
+
248
+ ### Release Command Updates
249
+ - [x] Installation folder sync section
250
+ - [x] Changelog template
251
+ - [x] rsync command documented
252
+
253
+ ### Summary Document
254
+ - [x] Architecture decisions documented
255
+ - [x] Security considerations listed
256
+ - [x] Testing strategy defined
257
+ - [x] Next steps outlined
258
+
259
+ ## Pre-Production Checklist
260
+
261
+ Before deploying to production:
262
+
263
+ 1. **Environment Setup**
264
+ - [ ] Add all required GitHub Secrets
265
+ - [ ] Configure Cloudflare Pages project
266
+ - [ ] Set up Convex production deployment
267
+ - [ ] Create installation folder (if needed)
268
+
269
+ 2. **Testing**
270
+ - [ ] Run validation script
271
+ - [ ] Test backup/restore
272
+ - [ ] Verify build succeeds
273
+ - [ ] Run full test suite
274
+
275
+ 3. **Documentation**
276
+ - [ ] Review deployment guide
277
+ - [ ] Create incident response runbook
278
+ - [ ] Document rollback procedures
279
+ - [ ] Set up monitoring alerts
280
+
281
+ 4. **Communication**
282
+ - [ ] Notify team of deployment
283
+ - [ ] Schedule deployment window
284
+ - [ ] Prepare rollback plan
285
+ - [ ] Monitor deployment closely
286
+
287
+ ## Success Criteria
288
+
289
+ ### Immediate (First Deployment)
290
+ - [ ] CI/CD pipeline runs successfully
291
+ - [ ] Web deploys to Cloudflare Pages
292
+ - [ ] Backend deploys to Convex
293
+ - [ ] Installation folder properly handled
294
+ - [ ] No errors in deployment logs
295
+
296
+ ### Short-term (First Week)
297
+ - [ ] Multiple deployments successful
298
+ - [ ] Rollback tested and working
299
+ - [ ] Monitoring alerts functioning
300
+ - [ ] Team comfortable with process
301
+ - [ ] Documentation proves useful
302
+
303
+ ### Long-term (First Month)
304
+ - [ ] Zero-downtime deployments achieved
305
+ - [ ] Average deployment time < 5 minutes
306
+ - [ ] No production incidents from deployments
307
+ - [ ] Automated testing catches issues
308
+ - [ ] Team reports increased confidence
309
+
310
+ ## Known Limitations
311
+
312
+ 1. **Cloudflare Rollback:** No CLI support, must use dashboard
313
+ 2. **Installation Folder:** Build-time baking requires rebuild for updates
314
+ 3. **Testing:** Limited integration test coverage initially
315
+ 4. **Monitoring:** No real-time alerts set up yet
316
+ 5. **Convex Rollback:** Requires manual git checkout and redeploy
317
+
318
+ ## Next Steps
319
+
320
+ ### Immediate
321
+ 1. Test all scripts locally
322
+ 2. Set up GitHub Secrets
323
+ 3. Run first test deployment to preview
324
+ 4. Verify CI/CD pipeline works
325
+
326
+ ### Short-term (This Week)
327
+ 1. Create integration tests
328
+ 2. Set up monitoring alerts
329
+ 3. Test rollback procedures
330
+ 4. Document incident response
331
+
332
+ ### Medium-term (Next Month)
333
+ 1. Implement KV/R2 for premium tier
334
+ 2. Add multi-environment support
335
+ 3. Create deployment dashboard
336
+ 4. Automate rollback process
337
+
338
+ ## Sign-off
339
+
340
+ **Verification Completed By:** agent-ops
341
+ **Date:** 2025-10-16
342
+ **Status:** ✅ Ready for Testing
343
+
344
+ **Recommended Next Action:** Test scripts locally, then set up GitHub Secrets for first CI/CD deployment.
345
+
346
+ ---
347
+
348
+ **Deployment automation is ready. Time to ship! 🚀**