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,1198 +0,0 @@
1
- # Oracle Cloud Infrastructure (OCI) Patterns
2
-
3
- Comprehensive guide to Oracle Cloud Infrastructure covering core services, architectural patterns, and best practices for building scalable, reliable, and secure cloud infrastructure on OCI.
4
-
5
- ## Table of Contents
6
-
7
- - [OCI Service Overview](#oci-service-overview)
8
- - [Compute Services](#compute-services)
9
- - [Storage Services](#storage-services)
10
- - [Database Services](#database-services)
11
- - [Networking Services](#networking-services)
12
- - [Container and Kubernetes Services](#container-and-kubernetes-services)
13
- - [Serverless Services](#serverless-services)
14
- - [Identity and Security](#identity-and-security)
15
- - [Monitoring and Management](#monitoring-and-management)
16
- - [Common Patterns](#common-patterns)
17
- - [Best Practices](#best-practices)
18
- - [Anti-Patterns](#anti-patterns)
19
-
20
- ## OCI Service Overview
21
-
22
- ### Service Categories
23
-
24
- ```
25
- Compute: Compute Instances, Bare Metal, Container Engine (OKE), Functions
26
- Storage: Object Storage, Block Volumes, File Storage, Archive Storage
27
- Database: Autonomous Database, Base Database, MySQL, PostgreSQL, NoSQL
28
- Networking: VCN, Load Balancer, FastConnect, DNS, VPN, Service Gateway
29
- Security: IAM, Vault, Bastion, WAF, Cloud Guard
30
- Monitoring: Monitoring, Logging, Events, Notifications, APM
31
- DevOps: DevOps Service, Resource Manager (Terraform), API Gateway
32
- Analytics: Data Integration, Data Flow, Analytics Cloud
33
- ```
34
-
35
- ### OCI Regions and Availability Domains
36
-
37
- ```
38
- Region: Geographic area (e.g., us-ashburn-1, uk-london-1)
39
- Availability Domain: Isolated data centers within region (AD-1, AD-2, AD-3)
40
- Fault Domain: Logical grouping within AD for high availability
41
- ```
42
-
43
- ## Compute Services
44
-
45
- ### Compute Instances
46
-
47
- **VM Shapes:**
48
- ```
49
- Standard (VM.Standard): General purpose workloads
50
- DenseIO (VM.DenseIO): High local NVMe storage
51
- GPU (VM.GPU): ML training, graphics rendering
52
- HPC (BM.HPC): High-performance computing
53
- Bare Metal (BM.Standard): No virtualization overhead
54
- Flexible (VM.Standard.E4.Flex): Custom CPU/memory ratio
55
- ```
56
-
57
- **Example: Compute Instance with Terraform:**
58
- ```hcl
59
- # compute_instance.tf
60
- resource "oci_core_instance" "app_server" {
61
- availability_domain = data.oci_identity_availability_domain.ad1.name
62
- compartment_id = var.compartment_id
63
- display_name = "app-server-${var.environment}"
64
- shape = "VM.Standard.E4.Flex"
65
-
66
- # Flexible shape configuration
67
- shape_config {
68
- ocpus = 2
69
- memory_in_gbs = 16
70
- }
71
-
72
- # Boot volume
73
- create_vnic_details {
74
- subnet_id = oci_core_subnet.private.id
75
- assign_public_ip = false
76
- hostname_label = "app-server"
77
- }
78
-
79
- source_details {
80
- source_type = "image"
81
- source_id = data.oci_core_images.oracle_linux.images[0].id
82
- boot_volume_size_in_gbs = 100
83
- }
84
-
85
- # Cloud-init configuration
86
- metadata = {
87
- ssh_authorized_keys = file("~/.ssh/id_rsa.pub")
88
- user_data = base64encode(file("${path.module}/cloud-init.yaml"))
89
- }
90
-
91
- # High availability
92
- fault_domain = "FAULT-DOMAIN-1"
93
-
94
- # Tags
95
- freeform_tags = {
96
- Environment = var.environment
97
- ManagedBy = "terraform"
98
- Application = "web-app"
99
- }
100
- }
101
-
102
- # Instance pool for auto-scaling
103
- resource "oci_core_instance_pool" "app_pool" {
104
- compartment_id = var.compartment_id
105
- display_name = "app-instance-pool"
106
-
107
- instance_configuration_id = oci_core_instance_configuration.app.id
108
-
109
- placement_configurations {
110
- availability_domain = data.oci_identity_availability_domain.ad1.name
111
- primary_subnet_id = oci_core_subnet.private.id
112
-
113
- fault_domains = [
114
- "FAULT-DOMAIN-1",
115
- "FAULT-DOMAIN-2",
116
- "FAULT-DOMAIN-3"
117
- ]
118
- }
119
-
120
- size = 3
121
-
122
- load_balancers {
123
- backend_set_name = oci_load_balancer_backend_set.app.name
124
- load_balancer_id = oci_load_balancer_load_balancer.public.id
125
- port = 8080
126
- vnic_selection = "PrimaryVnic"
127
- }
128
- }
129
-
130
- # Auto-scaling configuration
131
- resource "oci_autoscaling_auto_scaling_configuration" "app" {
132
- compartment_id = var.compartment_id
133
- display_name = "app-autoscaling"
134
- auto_scaling_resources {
135
- id = oci_core_instance_pool.app_pool.id
136
- type = "instancePool"
137
- }
138
-
139
- policies {
140
- display_name = "cpu-based-autoscaling"
141
- policy_type = "threshold"
142
- capacity {
143
- initial = 3
144
- max = 10
145
- min = 2
146
- }
147
-
148
- rules {
149
- display_name = "scale-out-rule"
150
- action {
151
- type = "CHANGE_COUNT_BY"
152
- value = 1
153
- }
154
- metric {
155
- metric_type = "CPU_UTILIZATION"
156
- threshold {
157
- operator = "GT"
158
- value = 75
159
- }
160
- }
161
- }
162
-
163
- rules {
164
- display_name = "scale-in-rule"
165
- action {
166
- type = "CHANGE_COUNT_BY"
167
- value = -1
168
- }
169
- metric {
170
- metric_type = "CPU_UTILIZATION"
171
- threshold {
172
- operator = "LT"
173
- value = 25
174
- }
175
- }
176
- }
177
- }
178
- }
179
- ```
180
-
181
- ### Bare Metal Instances
182
-
183
- **When to Use:**
184
- - No virtualization overhead for maximum performance
185
- - Oracle Database workloads
186
- - Compliance requirements
187
- - Large memory requirements (up to 2TB)
188
-
189
- ```hcl
190
- resource "oci_core_instance" "bare_metal_db" {
191
- availability_domain = data.oci_identity_availability_domain.ad1.name
192
- compartment_id = var.compartment_id
193
- display_name = "oracle-db-server"
194
- shape = "BM.Standard2.52" # 52 OCPUs, 768 GB memory
195
-
196
- create_vnic_details {
197
- subnet_id = oci_core_subnet.database.id
198
- }
199
-
200
- source_details {
201
- source_type = "image"
202
- source_id = data.oci_database_db_system_shapes.db_shapes.db_system_shapes[0].id
203
- }
204
-
205
- # Local NVMe storage
206
- launch_options {
207
- boot_volume_type = "ISCSI"
208
- }
209
- }
210
- ```
211
-
212
- ## Storage Services
213
-
214
- ### Object Storage
215
-
216
- **Storage Tiers:**
217
- ```
218
- Standard: Frequent access, immediate availability
219
- Infrequent: Accessed less than once per month, 90-day retention
220
- Archive: Long-term retention, restore time required
221
- ```
222
-
223
- **Example: Object Storage Bucket:**
224
- ```hcl
225
- # object_storage.tf
226
- resource "oci_objectstorage_bucket" "application_data" {
227
- compartment_id = var.compartment_id
228
- namespace = data.oci_objectstorage_namespace.ns.namespace
229
- name = "application-data-${var.environment}"
230
- access_type = "NoPublicAccess"
231
-
232
- # Versioning for data protection
233
- versioning = "Enabled"
234
-
235
- # Storage tier
236
- storage_tier = "Standard"
237
-
238
- # Object lifecycle policy
239
- retention_rules {
240
- display_name = "retention-policy"
241
- duration {
242
- time_amount = 90
243
- time_unit = "DAYS"
244
- }
245
- }
246
-
247
- # Automatic tiering
248
- auto_tiering = "InfrequentAccess"
249
-
250
- freeform_tags = {
251
- Environment = var.environment
252
- DataClass = "sensitive"
253
- }
254
- }
255
-
256
- # Pre-authenticated request for temporary access
257
- resource "oci_objectstorage_preauthrequest" "temporary_upload" {
258
- namespace = data.oci_objectstorage_namespace.ns.namespace
259
- bucket = oci_objectstorage_bucket.application_data.name
260
- name = "temp-upload-link"
261
- access_type = "ObjectWrite"
262
- time_expires = timeadd(timestamp(), "24h")
263
- object_name = "uploads/"
264
- }
265
- ```
266
-
267
- ### Block Volumes
268
-
269
- **Volume Types:**
270
- ```
271
- Balanced: Baseline performance, cost-effective
272
- Higher Performance: Increased IOPS and throughput
273
- Ultra High: Maximum performance for critical workloads
274
- ```
275
-
276
- **Example: Block Volume with Backup:**
277
- ```hcl
278
- # block_volume.tf
279
- resource "oci_core_volume" "application_data" {
280
- availability_domain = data.oci_identity_availability_domain.ad1.name
281
- compartment_id = var.compartment_id
282
- display_name = "app-data-volume"
283
- size_in_gbs = 500
284
-
285
- # Performance tier
286
- vpus_per_gb = 20 # Higher performance
287
-
288
- # Encryption
289
- is_auto_tune_enabled = true
290
-
291
- # Volume groups for consistent backups
292
- volume_group_id = oci_core_volume_group.app.id
293
- }
294
-
295
- # Attach to instance
296
- resource "oci_core_volume_attachment" "app_data_attachment" {
297
- attachment_type = "paravirtualized"
298
- instance_id = oci_core_instance.app_server.id
299
- volume_id = oci_core_volume.application_data.id
300
- device = "/dev/oracleoci/oraclevdb"
301
- }
302
-
303
- # Backup policy
304
- resource "oci_core_volume_backup_policy_assignment" "app_backup" {
305
- asset_id = oci_core_volume.application_data.id
306
- policy_id = data.oci_core_volume_backup_policies.default_policies.volume_backup_policies[0].id
307
- }
308
- ```
309
-
310
- ### File Storage Service (FSS)
311
-
312
- **Example: NFS File System:**
313
- ```hcl
314
- # file_storage.tf
315
- resource "oci_file_storage_file_system" "shared_storage" {
316
- availability_domain = data.oci_identity_availability_domain.ad1.name
317
- compartment_id = var.compartment_id
318
- display_name = "shared-application-storage"
319
- }
320
-
321
- resource "oci_file_storage_mount_target" "mount_target" {
322
- availability_domain = data.oci_identity_availability_domain.ad1.name
323
- compartment_id = var.compartment_id
324
- subnet_id = oci_core_subnet.private.id
325
- display_name = "mount-target-ad1"
326
-
327
- hostname_label = "fss-mt"
328
- }
329
-
330
- resource "oci_file_storage_export" "export" {
331
- export_set_id = oci_file_storage_mount_target.mount_target.export_set_id
332
- file_system_id = oci_file_storage_file_system.shared_storage.id
333
- path = "/shared"
334
-
335
- export_options {
336
- source = "10.0.0.0/16"
337
- access = "READ_WRITE"
338
- identity_squash = "NONE"
339
- require_privileged_source_port = false
340
- }
341
- }
342
- ```
343
-
344
- ## Database Services
345
-
346
- ### Autonomous Database
347
-
348
- **Database Workload Types:**
349
- ```
350
- ATP (Transaction Processing): OLTP workloads
351
- ADW (Data Warehouse): Analytics and reporting
352
- APEX: Low-code application development
353
- AJD (JSON): JSON document store
354
- ```
355
-
356
- **Example: Autonomous Database:**
357
- ```hcl
358
- # autonomous_database.tf
359
- resource "oci_database_autonomous_database" "app_db" {
360
- compartment_id = var.compartment_id
361
- db_name = "APPDB"
362
- display_name = "application-database-${var.environment}"
363
- admin_password = var.db_admin_password
364
- db_workload = "OLTP" # ATP
365
- cpu_core_count = 2
366
- data_storage_size_in_tbs = 1
367
-
368
- # Auto-scaling
369
- is_auto_scaling_enabled = true
370
- is_auto_scaling_for_storage_enabled = true
371
-
372
- # High availability
373
- is_dedicated = false
374
- is_free_tier = false
375
-
376
- # Network access
377
- subnet_id = oci_core_subnet.database.id
378
- nsg_ids = [oci_core_network_security_group.db.id]
379
- is_mtls_connection_required = true
380
-
381
- # Backup configuration
382
- is_data_guard_enabled = true
383
- db_version = "19c"
384
-
385
- # License
386
- license_model = "LICENSE_INCLUDED"
387
-
388
- freeform_tags = {
389
- Environment = var.environment
390
- DatabaseType = "autonomous"
391
- }
392
- }
393
-
394
- # Autonomous Database backup
395
- resource "oci_database_autonomous_database_backup" "manual_backup" {
396
- autonomous_database_id = oci_database_autonomous_database.app_db.id
397
- display_name = "manual-backup-${formatdate("YYYY-MM-DD", timestamp())}"
398
- }
399
- ```
400
-
401
- ### MySQL Database Service
402
-
403
- **Example: MySQL HeatWave:**
404
- ```hcl
405
- # mysql_database.tf
406
- resource "oci_mysql_mysql_db_system" "app_mysql" {
407
- compartment_id = var.compartment_id
408
- shape_name = "MySQL.VM.Standard.E4.4.64GB"
409
- subnet_id = oci_core_subnet.database.id
410
- availability_domain = data.oci_identity_availability_domain.ad1.name
411
-
412
- admin_password = var.mysql_admin_password
413
- admin_username = "admin"
414
-
415
- # High availability
416
- is_highly_available = true
417
-
418
- # Data storage
419
- data_storage_size_in_gb = 100
420
-
421
- # Backup
422
- backup_policy {
423
- is_enabled = true
424
- retention_in_days = 7
425
- window_start_time = "02:00"
426
- }
427
-
428
- # HeatWave cluster for analytics
429
- is_heat_wave_cluster_attached = true
430
- heat_wave_cluster {
431
- shape_name = "MySQL.HeatWave.VM.Standard.E3"
432
- cluster_size = 2
433
- }
434
-
435
- display_name = "mysql-db-${var.environment}"
436
-
437
- freeform_tags = {
438
- Environment = var.environment
439
- }
440
- }
441
- ```
442
-
443
- ## Networking Services
444
-
445
- ### Virtual Cloud Network (VCN)
446
-
447
- **Example: Production VCN with Multiple Tiers:**
448
- ```hcl
449
- # vcn.tf
450
- resource "oci_core_vcn" "production" {
451
- compartment_id = var.compartment_id
452
- cidr_blocks = ["10.0.0.0/16"]
453
- display_name = "production-vcn"
454
- dns_label = "prodvcn"
455
-
456
- is_ipv6enabled = false
457
-
458
- freeform_tags = {
459
- Environment = "production"
460
- }
461
- }
462
-
463
- # Internet Gateway for public subnets
464
- resource "oci_core_internet_gateway" "public" {
465
- compartment_id = var.compartment_id
466
- vcn_id = oci_core_vcn.production.id
467
- display_name = "internet-gateway"
468
- enabled = true
469
- }
470
-
471
- # NAT Gateway for private subnets
472
- resource "oci_core_nat_gateway" "private" {
473
- compartment_id = var.compartment_id
474
- vcn_id = oci_core_vcn.production.id
475
- display_name = "nat-gateway"
476
- block_traffic = false
477
- }
478
-
479
- # Service Gateway for OCI services
480
- resource "oci_core_service_gateway" "oci_services" {
481
- compartment_id = var.compartment_id
482
- vcn_id = oci_core_vcn.production.id
483
- display_name = "service-gateway"
484
-
485
- services {
486
- service_id = data.oci_core_services.all_services.services[0].id
487
- }
488
- }
489
-
490
- # Public subnet
491
- resource "oci_core_subnet" "public" {
492
- compartment_id = var.compartment_id
493
- vcn_id = oci_core_vcn.production.id
494
- cidr_block = "10.0.1.0/24"
495
- display_name = "public-subnet"
496
- dns_label = "public"
497
- route_table_id = oci_core_route_table.public.id
498
- security_list_ids = [oci_core_security_list.public.id]
499
- prohibit_public_ip_on_vnic = false
500
- }
501
-
502
- # Private subnet (application tier)
503
- resource "oci_core_subnet" "private_app" {
504
- compartment_id = var.compartment_id
505
- vcn_id = oci_core_vcn.production.id
506
- cidr_block = "10.0.10.0/24"
507
- display_name = "private-app-subnet"
508
- dns_label = "app"
509
- route_table_id = oci_core_route_table.private.id
510
- security_list_ids = [oci_core_security_list.private_app.id]
511
- prohibit_public_ip_on_vnic = true
512
- }
513
-
514
- # Private subnet (database tier)
515
- resource "oci_core_subnet" "private_db" {
516
- compartment_id = var.compartment_id
517
- vcn_id = oci_core_vcn.production.id
518
- cidr_block = "10.0.20.0/24"
519
- display_name = "private-db-subnet"
520
- dns_label = "db"
521
- route_table_id = oci_core_route_table.private.id
522
- security_list_ids = [oci_core_security_list.private_db.id]
523
- prohibit_public_ip_on_vnic = true
524
- }
525
-
526
- # Route tables
527
- resource "oci_core_route_table" "public" {
528
- compartment_id = var.compartment_id
529
- vcn_id = oci_core_vcn.production.id
530
- display_name = "public-route-table"
531
-
532
- route_rules {
533
- network_entity_id = oci_core_internet_gateway.public.id
534
- destination = "0.0.0.0/0"
535
- destination_type = "CIDR_BLOCK"
536
- }
537
- }
538
-
539
- resource "oci_core_route_table" "private" {
540
- compartment_id = var.compartment_id
541
- vcn_id = oci_core_vcn.production.id
542
- display_name = "private-route-table"
543
-
544
- route_rules {
545
- network_entity_id = oci_core_nat_gateway.private.id
546
- destination = "0.0.0.0/0"
547
- destination_type = "CIDR_BLOCK"
548
- }
549
-
550
- route_rules {
551
- network_entity_id = oci_core_service_gateway.oci_services.id
552
- destination = data.oci_core_services.all_services.services[0].cidr_block
553
- destination_type = "SERVICE_CIDR_BLOCK"
554
- }
555
- }
556
- ```
557
-
558
- ### Load Balancer
559
-
560
- **Example: Public Load Balancer with Health Checks:**
561
- ```hcl
562
- # load_balancer.tf
563
- resource "oci_load_balancer_load_balancer" "public" {
564
- compartment_id = var.compartment_id
565
- display_name = "public-load-balancer"
566
- shape = "flexible"
567
-
568
- shape_details {
569
- minimum_bandwidth_in_mbps = 10
570
- maximum_bandwidth_in_mbps = 100
571
- }
572
-
573
- subnet_ids = [
574
- oci_core_subnet.public.id
575
- ]
576
-
577
- is_private = false
578
-
579
- freeform_tags = {
580
- Environment = var.environment
581
- }
582
- }
583
-
584
- # Backend set
585
- resource "oci_load_balancer_backend_set" "app" {
586
- load_balancer_id = oci_load_balancer_load_balancer.public.id
587
- name = "app-backend-set"
588
- policy = "ROUND_ROBIN"
589
-
590
- health_checker {
591
- protocol = "HTTP"
592
- port = 8080
593
- url_path = "/health"
594
- return_code = 200
595
- interval_ms = 10000
596
- timeout_in_millis = 3000
597
- retries = 3
598
- }
599
-
600
- session_persistence_configuration {
601
- cookie_name = "APP_SESSION"
602
- }
603
- }
604
-
605
- # SSL certificate
606
- resource "oci_load_balancer_certificate" "ssl_cert" {
607
- load_balancer_id = oci_load_balancer_load_balancer.public.id
608
- certificate_name = "ssl-certificate"
609
-
610
- ca_certificate = file("${path.module}/certs/ca.crt")
611
- private_key = file("${path.module}/certs/server.key")
612
- public_certificate = file("${path.module}/certs/server.crt")
613
- }
614
-
615
- # HTTPS listener
616
- resource "oci_load_balancer_listener" "https" {
617
- load_balancer_id = oci_load_balancer_load_balancer.public.id
618
- name = "https-listener"
619
- default_backend_set_name = oci_load_balancer_backend_set.app.name
620
- port = 443
621
- protocol = "HTTP"
622
-
623
- ssl_configuration {
624
- certificate_name = oci_load_balancer_certificate.ssl_cert.certificate_name
625
- verify_peer_certificate = false
626
- protocols = ["TLSv1.2", "TLSv1.3"]
627
- }
628
-
629
- connection_configuration {
630
- idle_timeout_in_seconds = 300
631
- }
632
- }
633
- ```
634
-
635
- ## Container and Kubernetes Services
636
-
637
- ### Container Engine for Kubernetes (OKE)
638
-
639
- **Example: Production OKE Cluster:**
640
- ```hcl
641
- # oke_cluster.tf
642
- resource "oci_containerengine_cluster" "app_cluster" {
643
- compartment_id = var.compartment_id
644
- kubernetes_version = "v1.27.2"
645
- name = "app-cluster-${var.environment}"
646
- vcn_id = oci_core_vcn.production.id
647
-
648
- # Cluster endpoint configuration
649
- endpoint_config {
650
- is_public_ip_enabled = false
651
- subnet_id = oci_core_subnet.kubernetes_api.id
652
- nsg_ids = [oci_core_network_security_group.k8s_api.id]
653
- }
654
-
655
- # Options
656
- options {
657
- service_lb_subnet_ids = [oci_core_subnet.public.id]
658
-
659
- # Add-ons
660
- add_ons {
661
- is_kubernetes_dashboard_enabled = false
662
- is_tiller_enabled = false
663
- }
664
-
665
- # Admission controllers
666
- admission_controller_options {
667
- is_pod_security_policy_enabled = true
668
- }
669
-
670
- # Kubernetes network config
671
- kubernetes_network_config {
672
- pods_cidr = "10.244.0.0/16"
673
- services_cidr = "10.96.0.0/16"
674
- }
675
-
676
- # Persistent volume config
677
- persistent_volume_config {
678
- freeform_tags = {
679
- Environment = var.environment
680
- }
681
- }
682
- }
683
-
684
- freeform_tags = {
685
- Environment = var.environment
686
- }
687
- }
688
-
689
- # Node pool
690
- resource "oci_containerengine_node_pool" "app_node_pool" {
691
- cluster_id = oci_containerengine_cluster.app_cluster.id
692
- compartment_id = var.compartment_id
693
- kubernetes_version = "v1.27.2"
694
- name = "app-node-pool"
695
- node_shape = "VM.Standard.E4.Flex"
696
-
697
- node_shape_config {
698
- ocpus = 2
699
- memory_in_gbs = 16
700
- }
701
-
702
- # Multi-AD placement
703
- node_config_details {
704
- placement_configs {
705
- availability_domain = data.oci_identity_availability_domain.ad1.name
706
- subnet_id = oci_core_subnet.kubernetes_workers.id
707
-
708
- fault_domains = [
709
- "FAULT-DOMAIN-1",
710
- "FAULT-DOMAIN-2",
711
- "FAULT-DOMAIN-3"
712
- ]
713
- }
714
-
715
- size = 3
716
-
717
- # Node pool options
718
- is_pv_encryption_in_transit_enabled = true
719
-
720
- # Freeform tags for nodes
721
- freeform_tags = {
722
- Environment = var.environment
723
- NodePool = "app"
724
- }
725
-
726
- node_pool_pod_network_option_details {
727
- cni_type = "FLANNEL_OVERLAY"
728
- }
729
- }
730
-
731
- # Image
732
- node_source_details {
733
- image_id = data.oci_containerengine_node_pool_option.oke_node_pool_option.sources[0].image_id
734
- source_type = "IMAGE"
735
- }
736
-
737
- # SSH access
738
- ssh_public_key = file("~/.ssh/id_rsa.pub")
739
-
740
- # Initial node labels
741
- initial_node_labels {
742
- key = "environment"
743
- value = var.environment
744
- }
745
- }
746
- ```
747
-
748
- ## Serverless Services
749
-
750
- ### Functions
751
-
752
- **Example: OCI Function:**
753
- ```yaml
754
- # func.yaml
755
- schema_version: 20180708
756
- name: process-image
757
- version: 0.0.1
758
- runtime: python
759
- entrypoint: /python/bin/fdk /function/func.py handler
760
- memory: 256
761
- timeout: 120
762
- ```
763
-
764
- ```python
765
- # func.py
766
- import io
767
- import json
768
- import oci
769
- from fdk import response
770
-
771
- def handler(ctx, data: io.BytesIO = None):
772
- signer = oci.auth.signers.get_resource_principals_signer()
773
- object_storage = oci.object_storage.ObjectStorageClient(config={}, signer=signer)
774
-
775
- try:
776
- body = json.loads(data.getvalue())
777
- bucket_name = body.get("bucketName")
778
- object_name = body.get("objectName")
779
-
780
- # Process object
781
- namespace = object_storage.get_namespace().data
782
- obj = object_storage.get_object(namespace, bucket_name, object_name)
783
-
784
- # Your processing logic here
785
- result = process_data(obj.data.content)
786
-
787
- return response.Response(
788
- ctx,
789
- response_data=json.dumps({"status": "success", "result": result}),
790
- headers={"Content-Type": "application/json"}
791
- )
792
- except Exception as e:
793
- return response.Response(
794
- ctx,
795
- response_data=json.dumps({"status": "error", "message": str(e)}),
796
- headers={"Content-Type": "application/json"},
797
- status_code=500
798
- )
799
-
800
- def process_data(content):
801
- # Your data processing logic
802
- return {"processed": True}
803
- ```
804
-
805
- **Terraform Configuration:**
806
- ```hcl
807
- # functions.tf
808
- resource "oci_functions_application" "app" {
809
- compartment_id = var.compartment_id
810
- display_name = "image-processing-app"
811
- subnet_ids = [oci_core_subnet.private_app.id]
812
-
813
- config = {
814
- STORAGE_NAMESPACE = data.oci_objectstorage_namespace.ns.namespace
815
- }
816
-
817
- freeform_tags = {
818
- Environment = var.environment
819
- }
820
- }
821
-
822
- resource "oci_functions_function" "process_image" {
823
- application_id = oci_functions_application.app.id
824
- display_name = "process-image"
825
- image = "${var.ocir_region}.ocir.io/${data.oci_objectstorage_namespace.ns.namespace}/process-image:0.0.1"
826
- memory_in_mbs = 256
827
- timeout_in_seconds = 120
828
-
829
- config = {
830
- BUCKET_NAME = oci_objectstorage_bucket.images.name
831
- }
832
- }
833
- ```
834
-
835
- ## Identity and Security
836
-
837
- ### Identity and Access Management (IAM)
838
-
839
- **Example: Compartment Structure and Policies:**
840
- ```hcl
841
- # iam.tf
842
- # Root compartment structure
843
- resource "oci_identity_compartment" "production" {
844
- compartment_id = var.tenancy_ocid
845
- description = "Production environment"
846
- name = "production"
847
- }
848
-
849
- resource "oci_identity_compartment" "network" {
850
- compartment_id = oci_identity_compartment.production.id
851
- description = "Network resources"
852
- name = "network"
853
- }
854
-
855
- resource "oci_identity_compartment" "compute" {
856
- compartment_id = oci_identity_compartment.production.id
857
- description = "Compute resources"
858
- name = "compute"
859
- }
860
-
861
- # Dynamic group for instance principals
862
- resource "oci_identity_dynamic_group" "app_instances" {
863
- compartment_id = var.tenancy_ocid
864
- description = "Application instances"
865
- name = "app-instances"
866
- matching_rule = "ALL {instance.compartment.id = '${oci_identity_compartment.compute.id}'}"
867
- }
868
-
869
- # Policy for instance principals
870
- resource "oci_identity_policy" "app_instances_policy" {
871
- compartment_id = oci_identity_compartment.production.id
872
- description = "Policy for application instances"
873
- name = "app-instances-policy"
874
-
875
- statements = [
876
- "Allow dynamic-group app-instances to manage objects in compartment production",
877
- "Allow dynamic-group app-instances to read secret-bundles in compartment production",
878
- "Allow dynamic-group app-instances to use metrics in compartment production"
879
- ]
880
- }
881
-
882
- # User group
883
- resource "oci_identity_group" "developers" {
884
- compartment_id = var.tenancy_ocid
885
- description = "Developer group"
886
- name = "developers"
887
- }
888
-
889
- # Policy for developers
890
- resource "oci_identity_policy" "developers_policy" {
891
- compartment_id = oci_identity_compartment.production.id
892
- description = "Developer permissions"
893
- name = "developers-policy"
894
-
895
- statements = [
896
- "Allow group developers to manage all-resources in compartment production where request.permission != 'COMPARTMENT_DELETE'",
897
- "Allow group developers to read audit-events in compartment production",
898
- "Allow group developers to use cloud-shell in tenancy"
899
- ]
900
- }
901
- ```
902
-
903
- ### Vault and Key Management
904
-
905
- **Example: Vault with Encryption Keys:**
906
- ```hcl
907
- # vault.tf
908
- resource "oci_kms_vault" "production_vault" {
909
- compartment_id = var.compartment_id
910
- display_name = "production-vault"
911
- vault_type = "DEFAULT"
912
-
913
- freeform_tags = {
914
- Environment = "production"
915
- }
916
- }
917
-
918
- # Master encryption key
919
- resource "oci_kms_key" "database_encryption_key" {
920
- compartment_id = var.compartment_id
921
- display_name = "database-encryption-key"
922
-
923
- key_shape {
924
- algorithm = "AES"
925
- length = 32
926
- }
927
-
928
- management_endpoint = oci_kms_vault.production_vault.management_endpoint
929
-
930
- protection_mode = "HSM" # Hardware Security Module
931
- }
932
-
933
- # Secret for database password
934
- resource "oci_vault_secret" "db_password" {
935
- compartment_id = var.compartment_id
936
- secret_name = "database-admin-password"
937
- vault_id = oci_kms_vault.production_vault.id
938
- key_id = oci_kms_key.database_encryption_key.id
939
-
940
- secret_content {
941
- content_type = "BASE64"
942
- content = base64encode(var.db_admin_password)
943
- }
944
- }
945
- ```
946
-
947
- ## Monitoring and Management
948
-
949
- ### Monitoring and Alarms
950
-
951
- **Example: Monitoring and Alerting:**
952
- ```hcl
953
- # monitoring.tf
954
- # Alarm for high CPU
955
- resource "oci_monitoring_alarm" "high_cpu" {
956
- compartment_id = var.compartment_id
957
- display_name = "high-cpu-alarm"
958
- is_enabled = true
959
- metric_compartment_id = var.compartment_id
960
- namespace = "oci_computeagent"
961
- query = "CpuUtilization[1m].mean() > 80"
962
- severity = "CRITICAL"
963
-
964
- destinations = [oci_ons_notification_topic.alerts.id]
965
-
966
- repeat_notification_duration = "PT2H"
967
-
968
- body = "CPU utilization is above 80% for instances in production"
969
-
970
- freeform_tags = {
971
- Environment = "production"
972
- }
973
- }
974
-
975
- # Notification topic
976
- resource "oci_ons_notification_topic" "alerts" {
977
- compartment_id = var.compartment_id
978
- name = "production-alerts"
979
- }
980
-
981
- # Email subscription
982
- resource "oci_ons_subscription" "email_alerts" {
983
- compartment_id = var.compartment_id
984
- endpoint = "ops-team@example.com"
985
- protocol = "EMAIL"
986
- topic_id = oci_ons_notification_topic.alerts.id
987
- }
988
-
989
- # Slack webhook subscription
990
- resource "oci_ons_subscription" "slack_alerts" {
991
- compartment_id = var.compartment_id
992
- endpoint = var.slack_webhook_url
993
- protocol = "HTTPS_CUSTOM"
994
- topic_id = oci_ons_notification_topic.alerts.id
995
- }
996
- ```
997
-
998
- ### Logging
999
-
1000
- **Example: Log Groups and Logs:**
1001
- ```hcl
1002
- # logging.tf
1003
- resource "oci_logging_log_group" "application_logs" {
1004
- compartment_id = var.compartment_id
1005
- display_name = "application-log-group"
1006
- }
1007
-
1008
- # VCN flow logs
1009
- resource "oci_logging_log" "vcn_flow_logs" {
1010
- display_name = "vcn-flow-logs"
1011
- log_group_id = oci_logging_log_group.application_logs.id
1012
- log_type = "SERVICE"
1013
-
1014
- configuration {
1015
- source {
1016
- category = "all"
1017
- resource = oci_core_vcn.production.id
1018
- service = "flowlogs"
1019
- source_type = "OCISERVICE"
1020
- }
1021
-
1022
- compartment_id = var.compartment_id
1023
- }
1024
-
1025
- is_enabled = true
1026
- retention_duration = 30
1027
- }
1028
-
1029
- # Load balancer access logs
1030
- resource "oci_logging_log" "lb_access_logs" {
1031
- display_name = "lb-access-logs"
1032
- log_group_id = oci_logging_log_group.application_logs.id
1033
- log_type = "SERVICE"
1034
-
1035
- configuration {
1036
- source {
1037
- category = "access"
1038
- resource = oci_load_balancer_load_balancer.public.id
1039
- service = "loadbalancer"
1040
- source_type = "OCISERVICE"
1041
- }
1042
-
1043
- compartment_id = var.compartment_id
1044
- }
1045
-
1046
- is_enabled = true
1047
- retention_duration = 30
1048
- }
1049
- ```
1050
-
1051
- ## Common Patterns
1052
-
1053
- ### Pattern 1: Multi-Tier Web Application
1054
-
1055
- ```
1056
- ┌─────────────────────────────────────────────────┐
1057
- │ Internet Gateway │
1058
- └────────────────┬────────────────────────────────┘
1059
-
1060
- ┌────────────────▼────────────────────────────────┐
1061
- │ Public Subnet (Load Balancer) │
1062
- │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
1063
- │ │ LB-1 │ │ LB-2 │ │ Bastion │ │
1064
- │ └──────────┘ └──────────┘ └──────────┘ │
1065
- └────────────────┬────────────────────────────────┘
1066
-
1067
- ┌────────────────▼────────────────────────────────┐
1068
- │ Private Subnet (Application Tier) │
1069
- │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
1070
- │ │ App-1 │ │ App-2 │ │ App-3 │ │
1071
- │ └──────────┘ └──────────┘ └──────────┘ │
1072
- └────────────────┬────────────────────────────────┘
1073
-
1074
- ┌────────────────▼────────────────────────────────┐
1075
- │ Private Subnet (Database Tier) │
1076
- │ ┌───────────────────┐ │
1077
- │ │ Autonomous DB │ │
1078
- │ │ (Multi-AD) │ │
1079
- │ └───────────────────┘ │
1080
- └─────────────────────────────────────────────────┘
1081
- ```
1082
-
1083
- ### Pattern 2: Disaster Recovery with Cross-Region Replication
1084
-
1085
- ```hcl
1086
- # Primary region (Phoenix)
1087
- provider "oci" {
1088
- alias = "phoenix"
1089
- region = "us-phoenix-1"
1090
- }
1091
-
1092
- # DR region (Ashburn)
1093
- provider "oci" {
1094
- alias = "ashburn"
1095
- region = "us-ashburn-1"
1096
- }
1097
-
1098
- # Primary Autonomous Database
1099
- resource "oci_database_autonomous_database" "primary" {
1100
- provider = oci.phoenix
1101
- # ... configuration
1102
-
1103
- is_data_guard_enabled = true
1104
- }
1105
-
1106
- # Object Storage replication
1107
- resource "oci_objectstorage_replication_policy" "cross_region" {
1108
- bucket = oci_objectstorage_bucket.primary.name
1109
- namespace = data.oci_objectstorage_namespace.ns.namespace
1110
- name = "cross-region-replication"
1111
- destination_bucket_name = oci_objectstorage_bucket.dr.name
1112
- destination_region_name = "us-ashburn-1"
1113
- }
1114
- ```
1115
-
1116
- ## Best Practices
1117
-
1118
- ### Compartment Design
1119
-
1120
- 1. **Hierarchical Structure:**
1121
- - Root: Tenancy
1122
- - Level 1: Environment (prod, staging, dev)
1123
- - Level 2: Workload type (network, compute, database)
1124
- - Level 3: Application or service
1125
-
1126
- 2. **Least Privilege:**
1127
- - Use dynamic groups for instance principals
1128
- - Separate compartments for different security zones
1129
- - Regular policy reviews and audits
1130
-
1131
- ### High Availability
1132
-
1133
- 1. **Multi-AD Deployment:**
1134
- - Distribute resources across all availability domains
1135
- - Use fault domains within ADs
1136
- - Regional subnets for automatic failover
1137
-
1138
- 2. **Backup and Recovery:**
1139
- - Enable automatic backups for databases
1140
- - Use volume groups for consistent snapshots
1141
- - Test recovery procedures regularly
1142
-
1143
- ### Cost Optimization
1144
-
1145
- 1. **Right-Sizing:**
1146
- - Use flexible shapes for variable workloads
1147
- - Leverage auto-scaling
1148
- - Monitor resource utilization
1149
-
1150
- 2. **Reserved Capacity:**
1151
- - Purchase capacity reservations for steady workloads
1152
- - Use burstable instances for development
1153
-
1154
- 3. **Storage Tiering:**
1155
- - Move infrequently accessed data to lower tiers
1156
- - Enable auto-tiering for Object Storage
1157
- - Archive old backups
1158
-
1159
- ### Security
1160
-
1161
- 1. **Network Security:**
1162
- - Use Network Security Groups (NSGs) instead of Security Lists
1163
- - Implement micro-segmentation
1164
- - Enable VCN flow logs
1165
-
1166
- 2. **Encryption:**
1167
- - Enable encryption at rest for all data
1168
- - Use customer-managed keys in Vault
1169
- - Encrypt data in transit with TLS
1170
-
1171
- 3. **Identity Management:**
1172
- - Enable MFA for all users
1173
- - Use federation for SSO
1174
- - Regular access reviews
1175
-
1176
- ## Anti-Patterns
1177
-
1178
- ❌ **Single AD deployment** - No fault tolerance
1179
- ❌ **Overprovisioning** - Wasting capacity and cost
1180
- ❌ **Using Security Lists only** - Less granular than NSGs
1181
- ❌ **No tagging strategy** - Can't track costs or resources
1182
- ❌ **Manual infrastructure** - Use Resource Manager (Terraform)
1183
- ❌ **Ignoring backup policies** - Risk of data loss
1184
- ❌ **Exposing databases publicly** - Security risk
1185
- ❌ **No monitoring** - Can't detect issues proactively
1186
- ❌ **Weak IAM policies** - Too permissive access
1187
- ❌ **Ignoring service limits** - Plan for growth
1188
-
1189
- ## Related Resources
1190
-
1191
- - [OCI Documentation](https://docs.oracle.com/en-us/iaas/Content/home.htm)
1192
- - [OCI Terraform Provider](https://registry.terraform.io/providers/oracle/oci/latest/docs)
1193
- - [OCI Architecture Center](https://docs.oracle.com/solutions/)
1194
- - [OCI CLI Reference](https://docs.oracle.com/en-us/iaas/tools/oci-cli/latest/oci_cli_docs/)
1195
-
1196
- ---
1197
-
1198
- **Note:** This guide covers Oracle Cloud Infrastructure patterns and best practices. For multi-cloud strategies including OCI, see [multi-cloud-strategies.md](multi-cloud-strategies.md).