blockmine 1.24.0 → 1.25.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.
Files changed (346) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.en.md +427 -0
  3. package/README.md +40 -0
  4. package/backend/cli.js +1 -1
  5. package/backend/src/ai/plugin-assistant-system-prompt.md +664 -5
  6. package/backend/src/api/routes/bots.js +13 -0
  7. package/backend/src/api/routes/servers.js +14 -2
  8. package/backend/src/core/BotProcess.js +98 -2
  9. package/backend/src/core/PluginLoader.js +83 -3
  10. package/backend/src/core/PluginManager.js +75 -5
  11. package/backend/src/core/services/BotLifecycleService.js +186 -2
  12. package/backend/src/server.js +11 -1
  13. package/frontend/dist/assets/browser-ponyfill-DN7pwmHT.js +2 -0
  14. package/frontend/dist/assets/index-LSy71uwm.js +11261 -0
  15. package/frontend/dist/assets/index-SfhKxI4-.css +32 -0
  16. package/frontend/dist/flags/en.svg +32 -0
  17. package/frontend/dist/flags/ru.svg +5 -0
  18. package/frontend/dist/index.html +2 -2
  19. package/frontend/dist/locales/en/admin.json +100 -0
  20. package/frontend/dist/locales/en/api-keys.json +58 -0
  21. package/frontend/dist/locales/en/bots.json +110 -0
  22. package/frontend/dist/locales/en/common.json +47 -0
  23. package/frontend/dist/locales/en/configuration.json +22 -0
  24. package/frontend/dist/locales/en/console.json +10 -0
  25. package/frontend/dist/locales/en/dashboard.json +85 -0
  26. package/frontend/dist/locales/en/dialogs.json +70 -0
  27. package/frontend/dist/locales/en/event-graphs.json +50 -0
  28. package/frontend/dist/locales/en/graph-store.json +70 -0
  29. package/frontend/dist/locales/en/login.json +34 -0
  30. package/frontend/dist/locales/en/management.json +114 -0
  31. package/frontend/dist/locales/en/minecraft-viewer.json +27 -0
  32. package/frontend/dist/locales/en/nodes.json +1077 -0
  33. package/frontend/dist/locales/en/permissions.json +50 -0
  34. package/frontend/dist/locales/en/plugin-detail.json +49 -0
  35. package/frontend/dist/locales/en/plugins.json +110 -0
  36. package/frontend/dist/locales/en/proxies.json +81 -0
  37. package/frontend/dist/locales/en/servers.json +39 -0
  38. package/frontend/dist/locales/en/setup.json +17 -0
  39. package/frontend/dist/locales/en/sidebar.json +27 -0
  40. package/frontend/dist/locales/en/tasks.json +62 -0
  41. package/frontend/dist/locales/en/visual-editor.json +219 -0
  42. package/frontend/dist/locales/en/websocket.json +86 -0
  43. package/frontend/dist/locales/ru/admin.json +100 -0
  44. package/frontend/dist/locales/ru/api-keys.json +58 -0
  45. package/frontend/dist/locales/ru/bots.json +110 -0
  46. package/frontend/dist/locales/ru/common.json +49 -0
  47. package/frontend/dist/locales/ru/configuration.json +22 -0
  48. package/frontend/dist/locales/ru/console.json +10 -0
  49. package/frontend/dist/locales/ru/dashboard.json +85 -0
  50. package/frontend/dist/locales/ru/dialogs.json +70 -0
  51. package/frontend/dist/locales/ru/event-graphs.json +50 -0
  52. package/frontend/dist/locales/ru/graph-store.json +70 -0
  53. package/frontend/dist/locales/ru/login.json +34 -0
  54. package/frontend/dist/locales/ru/management.json +114 -0
  55. package/frontend/dist/locales/ru/minecraft-viewer.json +27 -0
  56. package/frontend/dist/locales/ru/nodes.json +1077 -0
  57. package/frontend/dist/locales/ru/permissions.json +50 -0
  58. package/frontend/dist/locales/ru/plugin-detail.json +49 -0
  59. package/frontend/dist/locales/ru/plugins.json +110 -0
  60. package/frontend/dist/locales/ru/proxies.json +81 -0
  61. package/frontend/dist/locales/ru/servers.json +39 -0
  62. package/frontend/dist/locales/ru/setup.json +17 -0
  63. package/frontend/dist/locales/ru/sidebar.json +27 -0
  64. package/frontend/dist/locales/ru/tasks.json +62 -0
  65. package/frontend/dist/locales/ru/visual-editor.json +221 -0
  66. package/frontend/dist/locales/ru/websocket.json +86 -0
  67. package/frontend/dist/monacoeditorwork/css.worker.bundle.js +7 -7
  68. package/frontend/dist/monacoeditorwork/html.worker.bundle.js +7 -7
  69. package/frontend/dist/monacoeditorwork/json.worker.bundle.js +7 -7
  70. package/frontend/dist/monacoeditorwork/ts.worker.bundle.js +3 -3
  71. package/frontend/package.json +4 -0
  72. package/package.json +1 -1
  73. package/screen/3dviewer.png +0 -0
  74. package/screen/console.png +0 -0
  75. package/screen/dashboard.png +0 -0
  76. package/screen/graph_collabe.png +0 -0
  77. package/screen/graph_live_debug.png +0 -0
  78. package/screen/language_selector.png +0 -0
  79. package/screen/management_command.png +0 -0
  80. package/screen/node_debug_trace.png +0 -0
  81. package/screen/plugin_/320/276/320/261/320/267/320/276/321/200.png +0 -0
  82. package/screen/websocket.png +0 -0
  83. package/screen//320/275/320/260/321/201/321/202/321/200/320/276/320/271/320/272/320/270_/320/276/321/202/320/264/320/265/320/273/321/214/320/275/321/213/321/205_/320/272/320/276/320/274/320/260/320/275/320/264_/320/272/320/260/320/266/320/264/321/203_/320/272/320/276/320/274/320/260/320/275/320/273/320/264/321/203_/320/274/320/276/320/266/320/275/320/276_/320/275/320/260/321/201/321/202/321/200/320/260/320/270/320/262/320/260/321/202/321/214.png +0 -0
  84. package/screen//320/277/320/273/320/260/320/275/320/270/321/200/320/276/320/262/321/211/320/270/320/272_/320/274/320/276/320/266/320/275/320/276_/320/267/320/260/320/264/320/260/320/262/320/260/321/202/321/214_/320/264/320/265/320/271/321/201/321/202/320/262/320/270/321/217_/320/277/320/276_/320/262/321/200/320/265/320/274/320/265/320/275/320/270.png +0 -0
  85. package/.claude/agents/README.md +0 -469
  86. package/.claude/agents/auth-route-debugger.md +0 -118
  87. package/.claude/agents/auth-route-tester.md +0 -93
  88. package/.claude/agents/auto-error-resolver.md +0 -97
  89. package/.claude/agents/build-optimizer.md +0 -236
  90. package/.claude/agents/code-architect.md +0 -34
  91. package/.claude/agents/code-architecture-reviewer.md +0 -83
  92. package/.claude/agents/code-explorer.md +0 -51
  93. package/.claude/agents/code-refactor-master.md +0 -94
  94. package/.claude/agents/code-reviewer.md +0 -46
  95. package/.claude/agents/cost-optimizer.md +0 -134
  96. package/.claude/agents/deployment-orchestrator.md +0 -113
  97. package/.claude/agents/documentation-architect.md +0 -82
  98. package/.claude/agents/frontend-error-fixer.md +0 -77
  99. package/.claude/agents/iac-code-generator.md +0 -71
  100. package/.claude/agents/incident-responder.md +0 -346
  101. package/.claude/agents/infrastructure-architect.md +0 -31
  102. package/.claude/agents/kubernetes-specialist.md +0 -56
  103. package/.claude/agents/migration-planner.md +0 -181
  104. package/.claude/agents/network-architect.md +0 -196
  105. package/.claude/agents/plan-reviewer.md +0 -52
  106. package/.claude/agents/refactor-planner.md +0 -63
  107. package/.claude/agents/security-scanner.md +0 -102
  108. package/.claude/agents/web-research-specialist.md +0 -78
  109. package/.claude/commands/cost-analysis.md +0 -315
  110. package/.claude/commands/dev-docs-update.md +0 -55
  111. package/.claude/commands/dev-docs.md +0 -51
  112. package/.claude/commands/feature-dev.md +0 -125
  113. package/.claude/commands/incident-debug.md +0 -247
  114. package/.claude/commands/infra-plan.md +0 -81
  115. package/.claude/commands/migration-plan.md +0 -478
  116. package/.claude/commands/route-research-for-testing.md +0 -37
  117. package/.claude/commands/security-review.md +0 -66
  118. package/.claude/hooks/CONFIG.md +0 -448
  119. package/.claude/hooks/README.md +0 -163
  120. package/.claude/hooks/SKILL_ACTIVATION_COMPLETE.md +0 -226
  121. package/.claude/hooks/WINDOWS_HOOKS_README.md +0 -151
  122. package/.claude/hooks/add-skill-activation-banners.ts +0 -132
  123. package/.claude/hooks/comprehensive-skill-test.ts +0 -1315
  124. package/.claude/hooks/error-handling-reminder.sh +0 -12
  125. package/.claude/hooks/error-handling-reminder.ts +0 -222
  126. package/.claude/hooks/k8s-manifest-validator.sh +0 -56
  127. package/.claude/hooks/package-lock.json +0 -556
  128. package/.claude/hooks/package.json +0 -16
  129. package/.claude/hooks/post-tool-use-tracker.ps1 +0 -174
  130. package/.claude/hooks/post-tool-use-tracker.sh +0 -183
  131. package/.claude/hooks/security-policy-check.sh +0 -247
  132. package/.claude/hooks/skill-activation-prompt.ps1 +0 -10
  133. package/.claude/hooks/skill-activation-prompt.sh +0 -10
  134. package/.claude/hooks/skill-activation-prompt.ts +0 -141
  135. package/.claude/hooks/stop-build-check-enhanced.sh +0 -130
  136. package/.claude/hooks/terraform-validator.sh +0 -53
  137. package/.claude/hooks/test-input.json +0 -7
  138. package/.claude/hooks/test-skill-activation.ts +0 -427
  139. package/.claude/hooks/trigger-build-resolver.sh +0 -79
  140. package/.claude/hooks/tsc-check.sh +0 -173
  141. package/.claude/hooks/tsconfig.json +0 -19
  142. package/.claude/settings.json +0 -59
  143. package/.claude/settings.local.json +0 -67
  144. package/.claude/skills/README.md +0 -507
  145. package/.claude/skills/api-engineering/SKILL.md +0 -63
  146. package/.claude/skills/api-engineering/resources/api-versioning.md +0 -88
  147. package/.claude/skills/api-engineering/resources/graphql-patterns.md +0 -106
  148. package/.claude/skills/api-engineering/resources/rate-limiting.md +0 -118
  149. package/.claude/skills/api-engineering/resources/rest-api-design.md +0 -105
  150. package/.claude/skills/backend-dev-guidelines/SKILL.md +0 -306
  151. package/.claude/skills/backend-dev-guidelines/resources/architecture-overview.md +0 -451
  152. package/.claude/skills/backend-dev-guidelines/resources/async-and-errors.md +0 -307
  153. package/.claude/skills/backend-dev-guidelines/resources/complete-examples.md +0 -638
  154. package/.claude/skills/backend-dev-guidelines/resources/configuration.md +0 -275
  155. package/.claude/skills/backend-dev-guidelines/resources/database-patterns.md +0 -224
  156. package/.claude/skills/backend-dev-guidelines/resources/middleware-guide.md +0 -213
  157. package/.claude/skills/backend-dev-guidelines/resources/routing-and-controllers.md +0 -756
  158. package/.claude/skills/backend-dev-guidelines/resources/sentry-and-monitoring.md +0 -336
  159. package/.claude/skills/backend-dev-guidelines/resources/services-and-repositories.md +0 -789
  160. package/.claude/skills/backend-dev-guidelines/resources/testing-guide.md +0 -235
  161. package/.claude/skills/backend-dev-guidelines/resources/validation-patterns.md +0 -754
  162. package/.claude/skills/budget-and-cost-management/SKILL.md +0 -850
  163. package/.claude/skills/build-engineering/SKILL.md +0 -431
  164. package/.claude/skills/build-engineering/resources/artifact-repositories.md +0 -72
  165. package/.claude/skills/build-engineering/resources/build-caching.md +0 -96
  166. package/.claude/skills/build-engineering/resources/build-pipelines.md +0 -105
  167. package/.claude/skills/build-engineering/resources/build-security.md +0 -95
  168. package/.claude/skills/build-engineering/resources/build-systems.md +0 -389
  169. package/.claude/skills/build-engineering/resources/compilation-optimization.md +0 -201
  170. package/.claude/skills/build-engineering/resources/dependency-management.md +0 -73
  171. package/.claude/skills/build-engineering/resources/monorepo-builds.md +0 -110
  172. package/.claude/skills/build-engineering/resources/performance-optimization.md +0 -113
  173. package/.claude/skills/build-engineering/resources/reproducible-builds.md +0 -82
  174. package/.claude/skills/cloud-engineering/SKILL.md +0 -675
  175. package/.claude/skills/cloud-engineering/resources/aws-patterns.md +0 -742
  176. package/.claude/skills/cloud-engineering/resources/azure-patterns.md +0 -714
  177. package/.claude/skills/cloud-engineering/resources/cleared-cloud-environments.md +0 -987
  178. package/.claude/skills/cloud-engineering/resources/cloud-cost-optimization.md +0 -757
  179. package/.claude/skills/cloud-engineering/resources/cloud-networking.md +0 -1058
  180. package/.claude/skills/cloud-engineering/resources/cloud-security-tools.md +0 -1530
  181. package/.claude/skills/cloud-engineering/resources/cloud-security.md +0 -990
  182. package/.claude/skills/cloud-engineering/resources/gcp-patterns.md +0 -758
  183. package/.claude/skills/cloud-engineering/resources/migration-strategies.md +0 -820
  184. package/.claude/skills/cloud-engineering/resources/multi-cloud-strategies.md +0 -670
  185. package/.claude/skills/cloud-engineering/resources/oci-patterns.md +0 -1198
  186. package/.claude/skills/cloud-engineering/resources/serverless-patterns.md +0 -795
  187. package/.claude/skills/cloud-engineering/resources/well-architected-frameworks.md +0 -966
  188. package/.claude/skills/cybersecurity/SKILL.md +0 -409
  189. package/.claude/skills/cybersecurity/resources/security-architecture.md +0 -266
  190. package/.claude/skills/database-engineering/SKILL.md +0 -61
  191. package/.claude/skills/database-engineering/resources/backup-and-recovery.md +0 -72
  192. package/.claude/skills/database-engineering/resources/database-replication.md +0 -63
  193. package/.claude/skills/database-engineering/resources/postgresql-fundamentals.md +0 -70
  194. package/.claude/skills/database-engineering/resources/query-optimization.md +0 -68
  195. package/.claude/skills/devsecops/SKILL.md +0 -374
  196. package/.claude/skills/devsecops/resources/ci-cd-security.md +0 -204
  197. package/.claude/skills/devsecops/resources/compliance-automation.md +0 -530
  198. package/.claude/skills/devsecops/resources/compliance-frameworks.md +0 -2322
  199. package/.claude/skills/devsecops/resources/container-security.md +0 -915
  200. package/.claude/skills/devsecops/resources/cspm-integration.md +0 -1440
  201. package/.claude/skills/devsecops/resources/policy-enforcement.md +0 -619
  202. package/.claude/skills/devsecops/resources/secrets-management.md +0 -755
  203. package/.claude/skills/devsecops/resources/security-monitoring.md +0 -146
  204. package/.claude/skills/devsecops/resources/security-scanning.md +0 -887
  205. package/.claude/skills/devsecops/resources/security-testing.md +0 -203
  206. package/.claude/skills/devsecops/resources/supply-chain-security.md +0 -518
  207. package/.claude/skills/devsecops/resources/vulnerability-management.md +0 -481
  208. package/.claude/skills/devsecops/resources/zero-trust-architecture.md +0 -177
  209. package/.claude/skills/documentation-as-code/SKILL.md +0 -323
  210. package/.claude/skills/documentation-as-code/resources/api-documentation.md +0 -90
  211. package/.claude/skills/documentation-as-code/resources/changelog-management.md +0 -79
  212. package/.claude/skills/documentation-as-code/resources/diagram-generation.md +0 -44
  213. package/.claude/skills/documentation-as-code/resources/docs-as-code-workflow.md +0 -99
  214. package/.claude/skills/documentation-as-code/resources/documentation-automation.md +0 -68
  215. package/.claude/skills/documentation-as-code/resources/documentation-sites.md +0 -79
  216. package/.claude/skills/documentation-as-code/resources/markdown-best-practices.md +0 -162
  217. package/.claude/skills/documentation-as-code/resources/openapi-specification.md +0 -77
  218. package/.claude/skills/documentation-as-code/resources/readme-engineering.md +0 -60
  219. package/.claude/skills/documentation-as-code/resources/technical-writing-guide.md +0 -202
  220. package/.claude/skills/engineering-management/SKILL.md +0 -356
  221. package/.claude/skills/engineering-management/resources/career-ladders.md +0 -609
  222. package/.claude/skills/engineering-management/resources/hiring-and-assessment.md +0 -555
  223. package/.claude/skills/engineering-management/resources/one-on-one-guides.md +0 -609
  224. package/.claude/skills/engineering-management/resources/resource-planning.md +0 -557
  225. package/.claude/skills/engineering-management/resources/team-organization-patterns.md +0 -491
  226. package/.claude/skills/engineering-management/resources/technical-interviews.md +0 -474
  227. package/.claude/skills/engineering-operations-management/SKILL.md +0 -817
  228. package/.claude/skills/error-tracking/SKILL.md +0 -379
  229. package/.claude/skills/frontend-design/SKILL.md +0 -42
  230. package/.claude/skills/frontend-dev-guidelines/SKILL.md +0 -403
  231. package/.claude/skills/frontend-dev-guidelines/resources/common-patterns.md +0 -331
  232. package/.claude/skills/frontend-dev-guidelines/resources/complete-examples.md +0 -872
  233. package/.claude/skills/frontend-dev-guidelines/resources/component-patterns.md +0 -502
  234. package/.claude/skills/frontend-dev-guidelines/resources/data-fetching.md +0 -767
  235. package/.claude/skills/frontend-dev-guidelines/resources/file-organization.md +0 -502
  236. package/.claude/skills/frontend-dev-guidelines/resources/loading-and-error-states.md +0 -501
  237. package/.claude/skills/frontend-dev-guidelines/resources/performance.md +0 -406
  238. package/.claude/skills/frontend-dev-guidelines/resources/routing-guide.md +0 -364
  239. package/.claude/skills/frontend-dev-guidelines/resources/styling-guide.md +0 -428
  240. package/.claude/skills/frontend-dev-guidelines/resources/typescript-standards.md +0 -418
  241. package/.claude/skills/general-it-engineering/SKILL.md +0 -393
  242. package/.claude/skills/general-it-engineering/resources/asset-management.md +0 -712
  243. package/.claude/skills/general-it-engineering/resources/automation-orchestration.md +0 -817
  244. package/.claude/skills/general-it-engineering/resources/business-continuity.md +0 -786
  245. package/.claude/skills/general-it-engineering/resources/change-management.md +0 -715
  246. package/.claude/skills/general-it-engineering/resources/enterprise-monitoring.md +0 -729
  247. package/.claude/skills/general-it-engineering/resources/help-desk-operations.md +0 -738
  248. package/.claude/skills/general-it-engineering/resources/incident-service-management.md +0 -834
  249. package/.claude/skills/general-it-engineering/resources/it-governance.md +0 -753
  250. package/.claude/skills/general-it-engineering/resources/itil-framework.md +0 -503
  251. package/.claude/skills/general-it-engineering/resources/service-management.md +0 -669
  252. package/.claude/skills/infrastructure-architecture/SKILL.md +0 -328
  253. package/.claude/skills/infrastructure-architecture/resources/architecture-decision-records.md +0 -505
  254. package/.claude/skills/infrastructure-architecture/resources/architecture-patterns.md +0 -528
  255. package/.claude/skills/infrastructure-architecture/resources/capacity-planning.md +0 -453
  256. package/.claude/skills/infrastructure-architecture/resources/cleared-environment-architecture.md +0 -773
  257. package/.claude/skills/infrastructure-architecture/resources/cost-architecture.md +0 -499
  258. package/.claude/skills/infrastructure-architecture/resources/data-architecture.md +0 -501
  259. package/.claude/skills/infrastructure-architecture/resources/disaster-recovery.md +0 -535
  260. package/.claude/skills/infrastructure-architecture/resources/migration-architecture.md +0 -512
  261. package/.claude/skills/infrastructure-architecture/resources/multi-region-design.md +0 -608
  262. package/.claude/skills/infrastructure-architecture/resources/reference-architectures.md +0 -562
  263. package/.claude/skills/infrastructure-architecture/resources/security-architecture.md +0 -538
  264. package/.claude/skills/infrastructure-architecture/resources/system-design-principles.md +0 -489
  265. package/.claude/skills/infrastructure-architecture/resources/workload-classification.md +0 -1000
  266. package/.claude/skills/infrastructure-strategy/SKILL.md +0 -924
  267. package/.claude/skills/network-engineering/SKILL.md +0 -385
  268. package/.claude/skills/network-engineering/resources/dns-management.md +0 -738
  269. package/.claude/skills/network-engineering/resources/load-balancing.md +0 -820
  270. package/.claude/skills/network-engineering/resources/network-architecture.md +0 -546
  271. package/.claude/skills/network-engineering/resources/network-security.md +0 -921
  272. package/.claude/skills/network-engineering/resources/network-troubleshooting.md +0 -749
  273. package/.claude/skills/network-engineering/resources/routing-switching.md +0 -373
  274. package/.claude/skills/network-engineering/resources/sdn-networking.md +0 -695
  275. package/.claude/skills/network-engineering/resources/service-mesh-networking.md +0 -777
  276. package/.claude/skills/network-engineering/resources/tcp-ip-protocols.md +0 -444
  277. package/.claude/skills/network-engineering/resources/vpn-connectivity.md +0 -672
  278. package/.claude/skills/node-development/SKILL.md +0 -317
  279. package/.claude/skills/observability-engineering/SKILL.md +0 -101
  280. package/.claude/skills/observability-engineering/resources/apm-tools.md +0 -97
  281. package/.claude/skills/observability-engineering/resources/correlation-strategies.md +0 -87
  282. package/.claude/skills/observability-engineering/resources/distributed-tracing.md +0 -98
  283. package/.claude/skills/observability-engineering/resources/logs-aggregation.md +0 -118
  284. package/.claude/skills/observability-engineering/resources/observability-cost-optimization.md +0 -141
  285. package/.claude/skills/observability-engineering/resources/opentelemetry.md +0 -110
  286. package/.claude/skills/platform-engineering/SKILL.md +0 -555
  287. package/.claude/skills/platform-engineering/resources/architecture-overview.md +0 -600
  288. package/.claude/skills/platform-engineering/resources/container-orchestration.md +0 -916
  289. package/.claude/skills/platform-engineering/resources/cost-optimization.md +0 -634
  290. package/.claude/skills/platform-engineering/resources/developer-platforms.md +0 -670
  291. package/.claude/skills/platform-engineering/resources/gitops-automation.md +0 -650
  292. package/.claude/skills/platform-engineering/resources/infrastructure-as-code.md +0 -778
  293. package/.claude/skills/platform-engineering/resources/infrastructure-standards.md +0 -708
  294. package/.claude/skills/platform-engineering/resources/multi-tenancy.md +0 -602
  295. package/.claude/skills/platform-engineering/resources/platform-security.md +0 -711
  296. package/.claude/skills/platform-engineering/resources/resource-management.md +0 -592
  297. package/.claude/skills/platform-engineering/resources/service-mesh.md +0 -628
  298. package/.claude/skills/release-engineering/SKILL.md +0 -393
  299. package/.claude/skills/release-engineering/resources/artifact-management.md +0 -108
  300. package/.claude/skills/release-engineering/resources/build-optimization.md +0 -84
  301. package/.claude/skills/release-engineering/resources/ci-cd-pipelines.md +0 -411
  302. package/.claude/skills/release-engineering/resources/deployment-strategies.md +0 -197
  303. package/.claude/skills/release-engineering/resources/pipeline-security.md +0 -62
  304. package/.claude/skills/release-engineering/resources/progressive-delivery.md +0 -83
  305. package/.claude/skills/release-engineering/resources/release-automation.md +0 -68
  306. package/.claude/skills/release-engineering/resources/release-orchestration.md +0 -77
  307. package/.claude/skills/release-engineering/resources/rollback-strategies.md +0 -66
  308. package/.claude/skills/release-engineering/resources/versioning-strategies.md +0 -59
  309. package/.claude/skills/route-tester/SKILL.md +0 -392
  310. package/.claude/skills/skill-developer/ADVANCED.md +0 -197
  311. package/.claude/skills/skill-developer/HOOK_MECHANISMS.md +0 -306
  312. package/.claude/skills/skill-developer/PATTERNS_LIBRARY.md +0 -152
  313. package/.claude/skills/skill-developer/SKILL.md +0 -430
  314. package/.claude/skills/skill-developer/SKILL_RULES_REFERENCE.md +0 -315
  315. package/.claude/skills/skill-developer/TRIGGER_TYPES.md +0 -305
  316. package/.claude/skills/skill-developer/TROUBLESHOOTING.md +0 -514
  317. package/.claude/skills/skill-rules.json +0 -2989
  318. package/.claude/skills/sre/SKILL.md +0 -464
  319. package/.claude/skills/sre/resources/alerting-best-practices.md +0 -282
  320. package/.claude/skills/sre/resources/capacity-planning.md +0 -226
  321. package/.claude/skills/sre/resources/chaos-engineering.md +0 -193
  322. package/.claude/skills/sre/resources/disaster-recovery.md +0 -232
  323. package/.claude/skills/sre/resources/incident-management.md +0 -436
  324. package/.claude/skills/sre/resources/observability-stack.md +0 -240
  325. package/.claude/skills/sre/resources/on-call-runbooks.md +0 -167
  326. package/.claude/skills/sre/resources/performance-optimization.md +0 -108
  327. package/.claude/skills/sre/resources/reliability-patterns.md +0 -183
  328. package/.claude/skills/sre/resources/slo-sli-sla.md +0 -464
  329. package/.claude/skills/sre/resources/toil-reduction.md +0 -145
  330. package/.claude/skills/systems-engineering/SKILL.md +0 -648
  331. package/.claude/skills/systems-engineering/resources/automation-patterns.md +0 -771
  332. package/.claude/skills/systems-engineering/resources/configuration-management.md +0 -998
  333. package/.claude/skills/systems-engineering/resources/linux-administration.md +0 -672
  334. package/.claude/skills/systems-engineering/resources/networking-fundamentals.md +0 -982
  335. package/.claude/skills/systems-engineering/resources/performance-tuning.md +0 -871
  336. package/.claude/skills/systems-engineering/resources/powershell-scripting.md +0 -482
  337. package/.claude/skills/systems-engineering/resources/security-hardening.md +0 -739
  338. package/.claude/skills/systems-engineering/resources/shell-scripting.md +0 -915
  339. package/.claude/skills/systems-engineering/resources/storage-management.md +0 -628
  340. package/.claude/skills/systems-engineering/resources/system-monitoring.md +0 -787
  341. package/.claude/skills/systems-engineering/resources/troubleshooting-guide.md +0 -753
  342. package/.claude/skills/systems-engineering/resources/windows-administration.md +0 -738
  343. package/.claude/skills/technical-leadership/SKILL.md +0 -728
  344. package/backend/docs/SECRETS_DOCUMENTATION.md +0 -327
  345. package/frontend/dist/assets/index-BC-NbKXi.css +0 -32
  346. package/frontend/dist/assets/index-DqJXZMHY.js +0 -11266
@@ -1,820 +0,0 @@
1
- # Cloud Migration Strategies
2
-
3
- Comprehensive guide to cloud migration approaches, patterns, and best practices for moving workloads to AWS, Azure, and GCP.
4
-
5
- ## The 6 R's of Migration
6
-
7
- ```
8
- ┌─────────────────────────────────────────────────────────────┐
9
- │ Migration Strategies │
10
- ├──────────────┬──────────────┬──────────────┬────────────────┤
11
- │ Rehost │ Replatform │ Refactor │ Repurchase │
12
- │ "Lift & Shift"│ "Lift, Tinker│ "Re-architect│ "Drop & Shop" │
13
- │ │ & Shift" │ │ │
14
- │ Fastest │ Balanced │ Most Value │ Strategic │
15
- │ Least Cost │ Moderate │ Highest Cost│ Vendor Lock │
16
- ├──────────────┼──────────────┼──────────────┼────────────────┤
17
- │ Retire │ Retain │ │ │
18
- │ "Decommission"│ "Keep as-is" │ │ │
19
- │ │ │ │ │
20
- │ Cost Savings │ No Change │ │ │
21
- └──────────────┴──────────────┴──────────────┴────────────────┘
22
- ```
23
-
24
- ### 1. Rehost (Lift and Shift)
25
-
26
- **When to Use:**
27
- - Quick migration needed
28
- - Minimal application changes
29
- - Legacy applications
30
- - Limited cloud expertise
31
- - Tight timeline
32
-
33
- **AWS Migration:**
34
- ```hcl
35
- # AWS Application Migration Service (MGN)
36
- resource "aws_mgn_replication_configuration_template" "default" {
37
- associate_default_security_group = false
38
- bandwidth_throttling = 0
39
- create_public_ip = false
40
- data_plane_routing = "PRIVATE_IP"
41
- default_large_staging_disk_type = "GP3"
42
- ebs_encryption = "DEFAULT"
43
- replication_server_instance_type = "t3.small"
44
- replication_servers_security_groups_ids = [aws_security_group.replication.id]
45
- staging_area_subnet_id = aws_subnet.private[0].id
46
- staging_area_tags = {
47
- Environment = "migration"
48
- }
49
- use_dedicated_replication_server = false
50
- }
51
-
52
- # Launch template for migrated instances
53
- resource "aws_launch_template" "migrated_app" {
54
- name = "migrated-app-template"
55
-
56
- block_device_mappings {
57
- device_name = "/dev/sda1"
58
-
59
- ebs {
60
- volume_size = 100
61
- volume_type = "gp3"
62
- encrypted = true
63
- kms_key_id = aws_kms_key.main.arn
64
- delete_on_termination = true
65
- }
66
- }
67
-
68
- iam_instance_profile {
69
- arn = aws_iam_instance_profile.app.arn
70
- }
71
-
72
- network_interfaces {
73
- associate_public_ip_address = false
74
- security_groups = [aws_security_group.app.id]
75
- subnet_id = aws_subnet.private_app[0].id
76
- }
77
-
78
- tag_specifications {
79
- resource_type = "instance"
80
- tags = {
81
- Name = "migrated-app"
82
- Environment = "production"
83
- Migration = "rehost"
84
- }
85
- }
86
-
87
- user_data = base64encode(<<-EOF
88
- #!/bin/bash
89
- # Post-migration configuration
90
- systemctl enable cloudwatch-agent
91
- systemctl start cloudwatch-agent
92
- EOF
93
- )
94
- }
95
- ```
96
-
97
- **Azure Migrate:**
98
- ```hcl
99
- resource "azurerm_site_recovery_replication_policy" "main" {
100
- name = "migration-policy"
101
- resource_group_name = azurerm_resource_group.recovery.name
102
- recovery_vault_name = azurerm_recovery_services_vault.main.name
103
- recovery_point_retention_in_minutes = 24 * 60
104
- application_consistent_snapshot_frequency_in_minutes = 4 * 60
105
- }
106
-
107
- resource "azurerm_site_recovery_protection_container_mapping" "main" {
108
- name = "migration-mapping"
109
- resource_group_name = azurerm_resource_group.recovery.name
110
- recovery_vault_name = azurerm_recovery_services_vault.main.name
111
- recovery_fabric_name = azurerm_site_recovery_fabric.primary.name
112
- recovery_source_protection_container_name = azurerm_site_recovery_protection_container.primary.name
113
- recovery_target_protection_container_id = azurerm_site_recovery_protection_container.secondary.id
114
- recovery_replication_policy_id = azurerm_site_recovery_replication_policy.main.id
115
- }
116
- ```
117
-
118
- ### 2. Replatform (Lift, Tinker, and Shift)
119
-
120
- **When to Use:**
121
- - Want cloud benefits without full refactoring
122
- - Database migrations to managed services
123
- - Minor optimizations acceptable
124
- - Balance between speed and benefit
125
-
126
- **Database Migration Example:**
127
- ```hcl
128
- # AWS Database Migration Service
129
- resource "aws_dms_replication_instance" "main" {
130
- replication_instance_id = "db-migration-instance"
131
- replication_instance_class = "dms.c5.xlarge"
132
- allocated_storage = 100
133
- vpc_security_group_ids = [aws_security_group.dms.id]
134
- replication_subnet_group_id = aws_dms_replication_subnet_group.main.id
135
- publicly_accessible = false
136
- multi_az = true
137
-
138
- tags = {
139
- Name = "database-migration"
140
- }
141
- }
142
-
143
- # Source endpoint (on-premises PostgreSQL)
144
- resource "aws_dms_endpoint" "source" {
145
- endpoint_id = "source-postgres"
146
- endpoint_type = "source"
147
- engine_name = "postgres"
148
- server_name = var.onprem_db_host
149
- port = 5432
150
- database_name = "production"
151
- username = var.db_username
152
- password = var.db_password
153
- ssl_mode = "require"
154
-
155
- tags = {
156
- Name = "source-database"
157
- }
158
- }
159
-
160
- # Target endpoint (RDS)
161
- resource "aws_dms_endpoint" "target" {
162
- endpoint_id = "target-rds"
163
- endpoint_type = "target"
164
- engine_name = "postgres"
165
- server_name = aws_db_instance.main.address
166
- port = 5432
167
- database_name = "production"
168
- username = var.rds_username
169
- password = var.rds_password
170
- ssl_mode = "require"
171
-
172
- tags = {
173
- Name = "target-database"
174
- }
175
- }
176
-
177
- # Migration task
178
- resource "aws_dms_replication_task" "main" {
179
- migration_type = "full-load-and-cdc"
180
- replication_instance_arn = aws_dms_replication_instance.main.replication_instance_arn
181
- replication_task_id = "postgres-migration"
182
- source_endpoint_arn = aws_dms_endpoint.source.endpoint_arn
183
- target_endpoint_arn = aws_dms_endpoint.target.endpoint_arn
184
- table_mappings = jsonencode({
185
- rules = [
186
- {
187
- rule-type = "selection"
188
- rule-id = "1"
189
- rule-name = "1"
190
- object-locator = {
191
- schema-name = "public"
192
- table-name = "%"
193
- }
194
- rule-action = "include"
195
- }
196
- ]
197
- })
198
-
199
- tags = {
200
- Name = "postgres-migration-task"
201
- }
202
- }
203
-
204
- # Target RDS instance
205
- resource "aws_db_instance" "main" {
206
- identifier = "migrated-database"
207
- engine = "postgres"
208
- engine_version = "14.7"
209
- instance_class = "db.r6g.xlarge"
210
-
211
- allocated_storage = 100
212
- storage_type = "gp3"
213
- storage_encrypted = true
214
- kms_key_id = aws_kms_key.rds.arn
215
-
216
- db_name = "production"
217
- username = var.rds_username
218
- password = var.rds_password
219
-
220
- multi_az = true
221
- db_subnet_group_name = aws_db_subnet_group.main.name
222
- vpc_security_group_ids = [aws_security_group.rds.id]
223
-
224
- backup_retention_period = 7
225
- backup_window = "03:00-04:00"
226
- maintenance_window = "sun:04:00-sun:05:00"
227
-
228
- enabled_cloudwatch_logs_exports = ["postgresql", "upgrade"]
229
-
230
- tags = {
231
- Name = "migrated-database"
232
- Migration = "replatform"
233
- }
234
- }
235
- ```
236
-
237
- ### 3. Refactor (Re-architect)
238
-
239
- **When to Use:**
240
- - Modernize applications
241
- - Need cloud-native features
242
- - Improve scalability and resilience
243
- - Long-term investment
244
-
245
- **Monolith to Microservices:**
246
- ```hcl
247
- # ECS Cluster for microservices
248
- resource "aws_ecs_cluster" "main" {
249
- name = "microservices-cluster"
250
-
251
- setting {
252
- name = "containerInsights"
253
- value = "enabled"
254
- }
255
-
256
- configuration {
257
- execute_command_configuration {
258
- logging = "OVERRIDE"
259
-
260
- log_configuration {
261
- cloud_watch_log_group_name = aws_cloudwatch_log_group.ecs.name
262
- }
263
- }
264
- }
265
- }
266
-
267
- # Service Discovery
268
- resource "aws_service_discovery_private_dns_namespace" "main" {
269
- name = "services.local"
270
- vpc = aws_vpc.main.id
271
- }
272
-
273
- # Microservice: User Service
274
- module "user_service" {
275
- source = "./modules/microservice"
276
-
277
- name = "user-service"
278
- cluster_id = aws_ecs_cluster.main.id
279
- image = "user-service:latest"
280
- cpu = 512
281
- memory = 1024
282
- desired_count = 3
283
-
284
- environment = [
285
- {
286
- name = "DB_HOST"
287
- value = aws_db_instance.users.endpoint
288
- }
289
- ]
290
-
291
- secrets = [
292
- {
293
- name = "DB_PASSWORD"
294
- valueFrom = aws_secretsmanager_secret.user_db_password.arn
295
- }
296
- ]
297
-
298
- service_discovery_namespace_id = aws_service_discovery_private_dns_namespace.main.id
299
- vpc_id = aws_vpc.main.id
300
- subnet_ids = aws_subnet.private_app[*].id
301
- security_group_ids = [aws_security_group.user_service.id]
302
- }
303
-
304
- # API Gateway for microservices
305
- resource "aws_api_gateway_rest_api" "main" {
306
- name = "microservices-api"
307
- description = "API Gateway for microservices"
308
-
309
- endpoint_configuration {
310
- types = ["REGIONAL"]
311
- }
312
- }
313
-
314
- # VPC Link for private integration
315
- resource "aws_api_gateway_vpc_link" "main" {
316
- name = "microservices-vpc-link"
317
- target_arns = [aws_lb.internal.arn]
318
- }
319
- ```
320
-
321
- **Serverless Refactor:**
322
- ```yaml
323
- # AWS SAM template for serverless migration
324
- AWSTemplateFormatVersion: '2010-09-09'
325
- Transform: AWS::Serverless-2016-10-31
326
-
327
- Globals:
328
- Function:
329
- Runtime: python3.11
330
- Timeout: 30
331
- MemorySize: 256
332
- Environment:
333
- Variables:
334
- TABLE_NAME: !Ref DynamoDBTable
335
- QUEUE_URL: !Ref ProcessingQueue
336
-
337
- Resources:
338
- # API Gateway
339
- ApiGateway:
340
- Type: AWS::Serverless::Api
341
- Properties:
342
- StageName: prod
343
- Auth:
344
- DefaultAuthorizer: CognitoAuthorizer
345
- Authorizers:
346
- CognitoAuthorizer:
347
- UserPoolArn: !GetAtt UserPool.Arn
348
-
349
- # Lambda: API Handler
350
- ApiFunction:
351
- Type: AWS::Serverless::Function
352
- Properties:
353
- CodeUri: functions/api/
354
- Handler: app.handler
355
- Events:
356
- GetResource:
357
- Type: Api
358
- Properties:
359
- RestApiId: !Ref ApiGateway
360
- Path: /resources/{id}
361
- Method: GET
362
- Policies:
363
- - DynamoDBReadPolicy:
364
- TableName: !Ref DynamoDBTable
365
-
366
- # Lambda: Async Processing
367
- ProcessorFunction:
368
- Type: AWS::Serverless::Function
369
- Properties:
370
- CodeUri: functions/processor/
371
- Handler: app.handler
372
- Events:
373
- SQSEvent:
374
- Type: SQS
375
- Properties:
376
- Queue: !GetAtt ProcessingQueue.Arn
377
- BatchSize: 10
378
- Policies:
379
- - DynamoDBCrudPolicy:
380
- TableName: !Ref DynamoDBTable
381
- - S3CrudPolicy:
382
- BucketName: !Ref DataBucket
383
-
384
- # DynamoDB Table
385
- DynamoDBTable:
386
- Type: AWS::DynamoDB::Table
387
- Properties:
388
- BillingMode: PAY_PER_REQUEST
389
- AttributeDefinitions:
390
- - AttributeName: id
391
- AttributeType: S
392
- KeySchema:
393
- - AttributeName: id
394
- KeyType: HASH
395
- StreamSpecification:
396
- StreamViewType: NEW_AND_OLD_IMAGES
397
-
398
- # SQS Queue
399
- ProcessingQueue:
400
- Type: AWS::SQS::Queue
401
- Properties:
402
- VisibilityTimeout: 180
403
- MessageRetentionPeriod: 1209600
404
- RedrivePolicy:
405
- deadLetterTargetArn: !GetAtt DeadLetterQueue.Arn
406
- maxReceiveCount: 3
407
-
408
- DeadLetterQueue:
409
- Type: AWS::SQS::Queue
410
- Properties:
411
- MessageRetentionPeriod: 1209600
412
- ```
413
-
414
- ### 4. Repurchase (Drop and Shop)
415
-
416
- **When to Use:**
417
- - Moving to SaaS solutions
418
- - Legacy system replacement
419
- - Cost-effective alternative exists
420
- - Avoid maintaining custom software
421
-
422
- **Migration to SaaS:**
423
- ```
424
- On-Premises CRM → Salesforce
425
- Self-hosted Email → Office 365 / Google Workspace
426
- Custom HR System → Workday
427
- On-prem Analytics → Snowflake / Databricks
428
- ```
429
-
430
- ### 5. Retire
431
-
432
- **Decommission unused applications:**
433
- ```bash
434
- #!/bin/bash
435
- # Application retirement checklist
436
-
437
- # 1. Identify unused applications
438
- echo "Analyzing application usage..."
439
- aws cloudwatch get-metric-statistics \
440
- --namespace AWS/ApplicationELB \
441
- --metric-name RequestCount \
442
- --dimensions Name=LoadBalancer,Value=app-alb \
443
- --start-time $(date -u -d '30 days ago' +%Y-%m-%dT%H:%M:%S) \
444
- --end-time $(date -u +%Y-%m-%dT%H:%M:%S) \
445
- --period 86400 \
446
- --statistics Sum
447
-
448
- # 2. Archive data if needed
449
- echo "Archiving application data..."
450
- aws s3 sync s3://app-bucket/ s3://archive-bucket/app-$(date +%Y%m%d)/ \
451
- --storage-class GLACIER_DEEP_ARCHIVE
452
-
453
- # 3. Document retirement
454
- echo "Creating retirement documentation..."
455
- cat > retirement-report.md <<EOF
456
- # Application Retirement: Legacy App
457
-
458
- **Date:** $(date)
459
- **Reason:** No usage in 90 days
460
- **Data Archived:** s3://archive-bucket/app-$(date +%Y%m%d)/
461
- **Annual Savings:** \$50,000
462
-
463
- ## Decommissioned Resources:
464
- - EC2 instances: 5
465
- - RDS database: 1
466
- - S3 buckets: 3
467
- - Load balancer: 1
468
- EOF
469
-
470
- # 4. Shutdown resources
471
- echo "Shutting down resources..."
472
- # (Would use Terraform destroy in practice)
473
- ```
474
-
475
- ### 6. Retain
476
-
477
- **Reasons to retain on-premises:**
478
- - Regulatory requirements
479
- - Data sovereignty
480
- - Performance-sensitive applications
481
- - Migration not yet justified
482
-
483
- ## Migration Assessment
484
-
485
- ### Discovery and Assessment
486
-
487
- **AWS Migration Hub:**
488
- ```hcl
489
- # Migration Hub configuration
490
- resource "aws_migrationhub_home_region_control" "main" {
491
- home_region = "us-east-1"
492
- }
493
-
494
- # Discovery connector
495
- data "aws_ssm_parameter" "discovery_agent" {
496
- name = "/aws/service/migration-hub/discovery-agent/latest/linux/amd64"
497
- }
498
-
499
- # Application groups
500
- resource "aws_applicationinsights_application" "main" {
501
- resource_group_name = aws_resourcegroups_group.migration.name
502
- auto_config_enabled = true
503
- }
504
-
505
- resource "aws_resourcegroups_group" "migration" {
506
- name = "migration-wave-1"
507
-
508
- resource_query {
509
- query = jsonencode({
510
- ResourceTypeFilters = ["AWS::EC2::Instance", "AWS::RDS::DBInstance"]
511
- TagFilters = [
512
- {
513
- Key = "MigrationWave"
514
- Values = ["1"]
515
- }
516
- ]
517
- })
518
- }
519
- }
520
- ```
521
-
522
- **Assessment Script:**
523
- ```python
524
- #!/usr/bin/env python3
525
- """
526
- Cloud migration assessment tool
527
- Analyzes on-premises infrastructure for cloud readiness
528
- """
529
-
530
- import json
531
- from typing import Dict, List
532
-
533
- class MigrationAssessment:
534
- def __init__(self):
535
- self.inventory = []
536
- self.recommendations = []
537
-
538
- def assess_application(self, app_config: Dict) -> Dict:
539
- """Assess application for migration strategy"""
540
-
541
- assessment = {
542
- 'name': app_config['name'],
543
- 'current_state': app_config['infrastructure'],
544
- 'recommended_strategy': None,
545
- 'target_services': [],
546
- 'estimated_cost': 0,
547
- 'complexity': 'medium',
548
- 'migration_time': '3-6 months'
549
- }
550
-
551
- # Assess based on criteria
552
- if app_config.get('custom_code', False):
553
- if app_config.get('cloud_native_compatible', False):
554
- assessment['recommended_strategy'] = 'refactor'
555
- assessment['target_services'] = [
556
- 'ECS Fargate',
557
- 'RDS',
558
- 'ElastiCache'
559
- ]
560
- assessment['complexity'] = 'high'
561
- else:
562
- assessment['recommended_strategy'] = 'rehost'
563
- assessment['target_services'] = ['EC2', 'EBS']
564
- assessment['complexity'] = 'low'
565
- else:
566
- assessment['recommended_strategy'] = 'repurchase'
567
- assessment['target_services'] = ['SaaS alternative']
568
-
569
- # Calculate costs
570
- assessment['estimated_cost'] = self._estimate_cost(
571
- assessment['target_services'],
572
- app_config.get('usage_pattern', {})
573
- )
574
-
575
- return assessment
576
-
577
- def _estimate_cost(self, services: List[str], usage: Dict) -> float:
578
- """Estimate monthly cloud cost"""
579
- cost_map = {
580
- 'EC2': 100,
581
- 'ECS Fargate': 150,
582
- 'RDS': 200,
583
- 'ElastiCache': 50,
584
- 'Lambda': 20
585
- }
586
-
587
- total = sum(cost_map.get(svc, 0) for svc in services)
588
- return total * usage.get('multiplier', 1.0)
589
-
590
- def generate_migration_plan(self) -> Dict:
591
- """Generate phased migration plan"""
592
- return {
593
- 'phases': [
594
- {
595
- 'name': 'Wave 1: Low-risk Applications',
596
- 'strategy': 'rehost',
597
- 'duration': '1-2 months',
598
- 'applications': ['static-website', 'internal-tools']
599
- },
600
- {
601
- 'name': 'Wave 2: Databases',
602
- 'strategy': 'replatform',
603
- 'duration': '2-3 months',
604
- 'applications': ['customer-db', 'analytics-db']
605
- },
606
- {
607
- 'name': 'Wave 3: Core Applications',
608
- 'strategy': 'refactor',
609
- 'duration': '6-9 months',
610
- 'applications': ['api-service', 'web-app']
611
- }
612
- ],
613
- 'total_duration': '9-14 months',
614
- 'estimated_cost': 500000
615
- }
616
-
617
- # Example usage
618
- if __name__ == '__main__':
619
- assessment = MigrationAssessment()
620
-
621
- app = {
622
- 'name': 'Customer Portal',
623
- 'infrastructure': {
624
- 'servers': 5,
625
- 'databases': 2,
626
- 'storage_tb': 10
627
- },
628
- 'custom_code': True,
629
- 'cloud_native_compatible': True,
630
- 'usage_pattern': {'multiplier': 1.5}
631
- }
632
-
633
- result = assessment.assess_application(app)
634
- print(json.dumps(result, indent=2))
635
-
636
- plan = assessment.generate_migration_plan()
637
- print(json.dumps(plan, indent=2))
638
- ```
639
-
640
- ## Cutover Planning
641
-
642
- ### Zero-Downtime Migration
643
-
644
- **Blue-Green Deployment:**
645
- ```hcl
646
- # Route 53 weighted routing for cutover
647
- resource "aws_route53_record" "app" {
648
- zone_id = aws_route53_zone.main.zone_id
649
- name = "app.example.com"
650
- type = "A"
651
-
652
- weighted_routing_policy {
653
- weight = var.blue_weight # Start: 100, End: 0
654
- }
655
-
656
- set_identifier = "blue-environment"
657
-
658
- alias {
659
- name = aws_lb.blue.dns_name
660
- zone_id = aws_lb.blue.zone_id
661
- evaluate_target_health = true
662
- }
663
- }
664
-
665
- resource "aws_route53_record" "app_green" {
666
- zone_id = aws_route53_zone.main.zone_id
667
- name = "app.example.com"
668
- type = "A"
669
-
670
- weighted_routing_policy {
671
- weight = var.green_weight # Start: 0, End: 100
672
- }
673
-
674
- set_identifier = "green-environment"
675
-
676
- alias {
677
- name = aws_lb.green.dns_name
678
- zone_id = aws_lb.green.zone_id
679
- evaluate_target_health = true
680
- }
681
- }
682
- ```
683
-
684
- **Database Cutover Script:**
685
- ```bash
686
- #!/bin/bash
687
- set -euo pipefail
688
-
689
- echo "=== Database Migration Cutover ==="
690
-
691
- # 1. Final sync
692
- echo "Performing final replication sync..."
693
- aws dms start-replication-task \
694
- --replication-task-arn "$TASK_ARN" \
695
- --start-replication-task-type reload-target
696
-
697
- # 2. Monitor lag
698
- echo "Monitoring replication lag..."
699
- while true; do
700
- LAG=$(aws dms describe-replication-tasks \
701
- --filters Name=replication-task-arn,Values="$TASK_ARN" \
702
- --query 'ReplicationTasks[0].ReplicationTaskStats.ElapsedTimeMillis' \
703
- --output text)
704
-
705
- if [ "$LAG" -lt 1000 ]; then
706
- echo "Lag under 1 second, ready for cutover"
707
- break
708
- fi
709
- sleep 5
710
- done
711
-
712
- # 3. Maintenance mode
713
- echo "Enabling maintenance mode..."
714
- aws ssm send-command \
715
- --document-name "AWS-RunShellScript" \
716
- --targets "Key=tag:App,Values=legacy" \
717
- --parameters 'commands=["systemctl stop application"]'
718
-
719
- # 4. Final sync
720
- sleep 10
721
- echo "Final replication sync..."
722
- # Wait for replication to catch up
723
-
724
- # 5. Cutover DNS
725
- echo "Updating DNS to point to new environment..."
726
- aws route53 change-resource-record-sets \
727
- --hosted-zone-id "$ZONE_ID" \
728
- --change-batch file://dns-cutover.json
729
-
730
- # 6. Verify
731
- echo "Verifying new environment..."
732
- for i in {1..10}; do
733
- if curl -f https://app.example.com/health; then
734
- echo "Health check passed"
735
- break
736
- fi
737
- sleep 5
738
- done
739
-
740
- echo "=== Cutover Complete ==="
741
- ```
742
-
743
- ## Post-Migration Optimization
744
-
745
- ```hcl
746
- # Cost optimization - Reserved Instances
747
- resource "aws_ec2_capacity_reservation" "main" {
748
- instance_type = "m5.xlarge"
749
- instance_platform = "Linux/UNIX"
750
- availability_zone = "us-east-1a"
751
- instance_count = 10
752
-
753
- tags = {
754
- Name = "app-capacity-reservation"
755
- }
756
- }
757
-
758
- # Right-sizing based on CloudWatch metrics
759
- resource "aws_autoscaling_policy" "scale_down" {
760
- name = "scale-down"
761
- scaling_adjustment = -1
762
- adjustment_type = "ChangeInCapacity"
763
- cooldown = 300
764
- autoscaling_group_name = aws_autoscaling_group.main.name
765
- }
766
-
767
- resource "aws_cloudwatch_metric_alarm" "cpu_low" {
768
- alarm_name = "cpu-utilization-low"
769
- comparison_operator = "LessThanThreshold"
770
- evaluation_periods = "2"
771
- metric_name = "CPUUtilization"
772
- namespace = "AWS/EC2"
773
- period = "300"
774
- statistic = "Average"
775
- threshold = "20"
776
-
777
- dimensions = {
778
- AutoScalingGroupName = aws_autoscaling_group.main.name
779
- }
780
-
781
- alarm_actions = [aws_autoscaling_policy.scale_down.arn]
782
- }
783
- ```
784
-
785
- ## Best Practices
786
-
787
- 1. **Assessment:**
788
- - Comprehensive discovery
789
- - Identify dependencies
790
- - Assess technical debt
791
- - Calculate TCO
792
-
793
- 2. **Planning:**
794
- - Phased approach (waves)
795
- - Pilot migrations first
796
- - Define success criteria
797
- - Plan rollback strategy
798
-
799
- 3. **Execution:**
800
- - Automate where possible
801
- - Test thoroughly
802
- - Monitor continuously
803
- - Document everything
804
-
805
- 4. **Optimization:**
806
- - Right-size resources
807
- - Leverage reserved capacity
808
- - Implement auto-scaling
809
- - Regular cost reviews
810
-
811
- ## Anti-Patterns
812
-
813
- - Big-bang migrations
814
- - No pilot testing
815
- - Ignoring dependencies
816
- - No rollback plan
817
- - Insufficient testing
818
- - Poor communication
819
- - No post-migration optimization
820
- - Recreating on-premises architecture in cloud