/
home
/
techb158
/
cosmic-risk.abdallabala.com
/
docs
/
/home/techb158/cosmic-risk.abdallabala.com/docs
mkdir
upload
Name
Size
Mode
Actions
00-design-study.md
3678
0644
edit
dl
rm
01-uml-class-diagram.puml
11869
0644
edit
dl
rm
02-use-case-diagram.puml
3763
0644
edit
dl
rm
03-sequence-diagrams.puml
9732
0644
edit
dl
rm
04-database-entity-model.mmd
7051
0644
edit
dl
rm
05-database-schema.sql
13372
0644
edit
dl
rm
06-diagram-preview.html
5021
0644
edit
dl
rm
07-design-checklist.md
3256
0644
edit
dl
rm
08-step-2-storage-layer.md
5325
0644
edit
dl
rm
09-step-3-risk-crud-ui.md
3380
0644
edit
dl
rm
10-step-4-mitigation-workflow.md
3996
0644
edit
dl
rm
11-step-5-deployment-gate-workflow.md
2292
0644
edit
dl
rm
12-step-6-multi-pm-integration.md
3770
0644
edit
dl
rm
13-step-6-1-microsoft-planner-integration.md
2335
0644
edit
dl
rm
14-step-7-reporting-export.md
4158
0644
edit
dl
rm
15-step-7-1-oauth-live-connectors.md
4545
0644
edit
dl
rm
16-step-8-user-roles-access-control.md
3297
0644
edit
dl
rm
17-step-9-production-deployment-security.md
4228
0644
edit
dl
rm
18-step-10-final-academic-submission.md
3199
0644
edit
dl
rm
19-final-report-draft.md
6814
0644
edit
dl
rm
20-instructor-submission-checklist.md
3639
0644
edit
dl
rm
21-demo-script.md
3948
0644
edit
dl
rm
22-traceability-matrix.md
4847
0644
edit
dl
rm
23-testing-evidence.md
2961
0644
edit
dl
rm
24-evaluation-rubric-mapping.md
2910
0644
edit
dl
rm
25-final-deployment-runbook.md
3214
0644
edit
dl
rm
26-known-limitations-and-future-work.md
2632
0644
edit
dl
rm
27-final-qa-checklist.md
2893
0644
edit
dl
rm
28-demo-rehearsal-script.md
3618
0644
edit
dl
rm
29-submission-freeze-report.md
2769
0644
edit
dl
rm
30-final-known-issues.md
1876
0644
edit
dl
rm
31-saas-rebuild-implementation.md
2573
0644
edit
dl
rm
application-documentation.md
27515
0644
edit
dl
rm
conversation-log.md
18503
0644
edit
dl
rm
dashboard-spec.md
3691
0644
edit
dl
rm
database-guide.md
37826
0644
edit
dl
rm
development-summary.md
7070
0644
edit
dl
rm
github-architecture.svg
6288
0644
edit
dl
rm
integration-pull-push-plan.md
7384
0644
edit
dl
rm
Edit:
/home/techb158/cosmic-risk.abdallabala.com/docs/25-final-deployment-runbook.md
(3214B)
# Final Deployment Runbook This runbook explains how to install, run, test, and package the COSMIC AI-Risk Dashboard. ## 1. Prerequisites Install: 1. Node.js 18 or later. 2. npm. 3. Optional: Docker and Docker Compose. 4. Optional for production: Nginx and systemd. ## 2. Local setup ```bash unzip cosmic-ai-risk-dashboard-step-10-final-submission.zip cd cosmic-ai-risk-dashboard npm install npm test npm start ``` Open: ```text http://localhost:8090 ``` ## 3. Environment configuration Copy: ```bash cp .env.example .env ``` Recommended local values: ```env NODE_ENV=development PORT=8090 COSMIC_LIVE_PM_ENABLED=false COSMIC_TOKEN_ENCRYPTION_KEY=replace-with-local-dev-secret ``` ## 4. Production configuration check Before production deployment, run: ```bash npm run check:config ``` The check should warn about missing production secrets, CORS settings, live connector flags, and security settings. ## 5. Run in production mode ```bash npm run start:prod ``` ## 6. Docker deployment ```bash docker compose up --build -d ``` Check: ```bash curl http://localhost:8090/api/health curl http://localhost:8090/api/ready ``` ## 7. Nginx reverse proxy Use: ```text deploy/nginx.conf ``` The production target should terminate HTTPS at Nginx and proxy requests to the Node.js application. ## 8. systemd service Use: ```text deploy/cosmic-ai-risk-dashboard.service ``` Suggested commands: ```bash sudo cp deploy/cosmic-ai-risk-dashboard.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable cosmic-ai-risk-dashboard sudo systemctl start cosmic-ai-risk-dashboard ``` ## 9. Backup Create a backup: ```bash npm run backup ``` List backups through the API: ```bash curl http://localhost:8090/api/operations/backups ``` ## 10. Health checks | Endpoint | Purpose | |---|---| | `/api/health` | Basic service health | | `/api/ready` | Runtime readiness | | `/api/operations/security` | Safe security status | | `/api/operations/backups` | Backup listing | ## 11. OAuth and live PM connectors Live calls are disabled by default. To enable: ```env COSMIC_LIVE_PM_ENABLED=true COSMIC_TOKEN_ENCRYPTION_KEY=replace-with-long-random-secret ``` Then configure provider variables for Trello, Jira, Asana, and Microsoft Planner in `.env`. Do not commit `.env` to source control. ## 12. Submission packaging To create a clean package: ```bash cd .. zip -r cosmic-ai-risk-dashboard-step-10-final-submission.zip cosmic-ai-risk-dashboard ``` ## 13. Instructor demo sequence 1. Run `npm test`. 2. Run `npm start`. 3. Open the dashboard. 4. Show design files. 5. Demonstrate risk CRUD. 6. Demonstrate mitigation workflow. 7. Demonstrate deployment gate. 8. Demonstrate PM integrations. 9. Demonstrate reports. 10. Demonstrate access control. 11. Show production files. ## 14. Recovery If the JSON database is damaged, restore a backup from the backup directory or replace `data/database.json` with a known valid copy. ## 15. Production limitation For a real production system, replace JSON storage with PostgreSQL or another managed database. JSON storage is acceptable for the academic prototype stage but not recommended for concurrent multi-user production use.
Save
cmd:
run