--- name: Oracle Diagram Generator description: Generate professional OCI architecture diagrams with verified Oracle styling and icons version: 1.0.0 --- # Oracle Diagram Generator - Complete Reference ## Purpose Generate professional, accurate OCI architecture diagrams using official Oracle icons and styling. Supports Draw.io XML templates, Python diagrams library, and Mermaid.js for various output formats and workflows. ## Official Oracle Icon Library ### Download Sources - **Primary**: https://docs.oracle.com/en-us/iaas/Content/General/Reference/graphicsfordiagrams.htm - **Draw.io Library**: Download XML and import via File → Open Library From - **GitHub**: https://github.com/oracle-quickstart/oci-arch-template --- ## Complete Draw.io OCI Shape Reference ### Compute Services ``` mxgraph.oci.compute_vm - Virtual Machine mxgraph.oci.compute_bm - Bare Metal mxgraph.oci.container_engine - OKE (Kubernetes) mxgraph.oci.container_instance - Container Instance mxgraph.oci.functions - Functions (Serverless) mxgraph.oci.instance_pool - Instance Pool mxgraph.oci.autoscaling - Autoscaling Configuration ``` ### Database Services ``` mxgraph.oci.autonomous_database - Autonomous Database (ATP/ADW/AJD) mxgraph.oci.database_system - DB System (VM/BM) mxgraph.oci.exadata - Exadata Cloud Service mxgraph.oci.mysql - MySQL HeatWave mxgraph.oci.nosql - NoSQL Database ``` ### AI & Machine Learning ``` mxgraph.oci.generative_ai - OCI Generative AI mxgraph.oci.data_science - Data Science Platform mxgraph.oci.ai_vision - AI Vision mxgraph.oci.ai_language - AI Language mxgraph.oci.ai_speech - AI Speech mxgraph.oci.ai_document - Document Understanding mxgraph.oci.anomaly_detection - Anomaly Detection ``` ### Storage Services ``` mxgraph.oci.object_storage - Object Storage mxgraph.oci.block_storage - Block Volume mxgraph.oci.file_storage - File Storage (NFS) mxgraph.oci.archive_storage - Archive Storage ``` ### Networking Services ``` mxgraph.oci.vcn - Virtual Cloud Network mxgraph.oci.subnet - Subnet mxgraph.oci.load_balancer - Load Balancer (L7) mxgraph.oci.network_load_balancer - Network Load Balancer (L4) mxgraph.oci.api_gateway - API Gateway mxgraph.oci.fastconnect - FastConnect mxgraph.oci.drg - Dynamic Routing Gateway mxgraph.oci.nat_gateway - NAT Gateway mxgraph.oci.internet_gateway - Internet Gateway mxgraph.oci.service_gateway - Service Gateway mxgraph.oci.waf - Web Application Firewall ``` ### Integration & Streaming ``` mxgraph.oci.streaming - Streaming (Kafka) mxgraph.oci.integration - Integration Cloud mxgraph.oci.events - Events Service mxgraph.oci.notifications - Notifications mxgraph.oci.queue - Queue Service ``` ### Security & Identity ``` mxgraph.oci.iam - IAM mxgraph.oci.vault - Vault (KMS) mxgraph.oci.bastion - Bastion Service mxgraph.oci.cloud_guard - Cloud Guard mxgraph.oci.data_safe - Data Safe ``` ### DevOps & Management ``` mxgraph.oci.devops - DevOps Service mxgraph.oci.resource_manager - Resource Manager (Terraform) mxgraph.oci.logging - Logging Service mxgraph.oci.monitoring - Monitoring mxgraph.oci.apm - APM (Application Performance) ``` --- ## Draw.io XML Templates ### Template 1: Basic Three-Tier Architecture ```xml ``` ### Template 2: AI RAG Platform ```xml ``` ### Template 3: Multi-Agent Factory ```xml ``` --- ## Python Diagrams Library ### Installation ```bash pip install diagrams # Requires Graphviz: brew install graphviz (macOS) or apt install graphviz (Linux) ``` ### Complete RAG Platform Example ```python from diagrams import Diagram, Cluster, Edge from diagrams.oci.compute import Container, Functions, OKE from diagrams.oci.database import AutonomousDatabase from diagrams.oci.network import LoadBalancer, ApiGateway from diagrams.oci.storage import ObjectStorage from diagrams.oci.connectivity import FastConnect from diagrams.oci.devops import ResourceManager from diagrams.generic.compute import Rack from diagrams.onprem.client import Users # Graph attributes for Oracle styling graph_attr = { "fontsize": "20", "bgcolor": "#FFFFFF", "splines": "ortho", "nodesep": "0.8", "ranksep": "1.0", "fontname": "Arial", "fontcolor": "#312D2A", "pad": "0.5" } node_attr = { "fontsize": "11", "fontname": "Arial", "fontcolor": "#312D2A" } edge_attr = { "color": "#312D2A", "penwidth": "2.0" } with Diagram( "OCI Enterprise RAG Platform", show=False, filename="oci_rag_platform", direction="TB", graph_attr=graph_attr, node_attr=node_attr, edge_attr=edge_attr ): users = Users("Users") with Cluster("OCI Region - us-ashburn-1"): with Cluster("Public Subnet"): lb = LoadBalancer("Load Balancer\n$13/mo") apigw = ApiGateway("API Gateway") with Cluster("Private Subnet - Application"): with Cluster("OKE Cluster"): app = [ Container("Chat UI"), Container("RAG API"), Container("Admin") ] functions = Functions("Chunking\nFunctions") with Cluster("Private Subnet - AI"): with Cluster("OCI Generative AI"): embedding = Rack("Cohere Embed 4\n$0.0001/1K") llm = Rack("Cohere Cmd A\n$0.0015/1K") with Cluster("Private Subnet - Data"): adb = AutonomousDatabase("ADB 26ai\nVector Search\n$0 Free Tier") storage = ObjectStorage("Documents\n$0.0255/GB") # Data flow users >> Edge(label="HTTPS") >> lb >> apigw apigw >> app app[1] >> Edge(label="embed") >> embedding app[1] >> Edge(label="chat") >> llm app[1] >> Edge(label="search") >> adb functions >> embedding >> adb storage >> functions ``` ### Multi-Agent System Example ```python from diagrams import Diagram, Cluster, Edge from diagrams.oci.compute import Functions from diagrams.oci.database import AutonomousDatabase from diagrams.oci.network import ApiGateway from diagrams.oci.storage import ObjectStorage from diagrams.generic.compute import Rack with Diagram("OCI Multi-Agent Architecture", show=False, filename="oci_agents"): with Cluster("OCI Generative AI"): hub = Rack("Agent Hub") with Cluster("Supervisor Layer"): supervisor = Rack("Supervisor Agent\nCohere Command A") with Cluster("Specialist Pool"): agents = [ Rack("Data Agent"), Rack("SQL Agent"), Rack("Code Agent"), Rack("Report Agent") ] with Cluster("Tool Layer"): tools = [ Functions("Functions"), ApiGateway("REST APIs"), AutonomousDatabase("Select AI") ] with Cluster("Data Layer"): adb = AutonomousDatabase("ADB 26ai\n(Memory + Specs)") storage = ObjectStorage("Artifacts") # Orchestration flow hub >> supervisor supervisor >> agents for agent in agents: for tool in tools: agent >> Edge(style="dashed") >> tool tools[2] >> adb agents >> storage ``` ### NVIDIA NIM Deployment Example ```python from diagrams import Diagram, Cluster, Edge from diagrams.oci.compute import BM, VM from diagrams.oci.database import AutonomousDatabase from diagrams.oci.network import LoadBalancer, Vcn from diagrams.oci.storage import ObjectStorage, BlockStorage from diagrams.oci.security import Vault from diagrams.generic.compute import Rack from diagrams.onprem.network import Internet with Diagram("NVIDIA NIM on OCI", show=False, filename="oci_nim"): internet = Internet("Global Traffic") with Cluster("OCI - Multi-Region"): with Cluster("us-ashburn-1 (Primary)"): lb_us = LoadBalancer("Traffic Mgmt") with Cluster("GPU Cluster"): gpus_us = [ BM("BM.GPU.H100.8\n$30/hr"), BM("BM.GPU.H100.8\n$30/hr") ] with Cluster("NIM Services"): nims_us = [ Rack("LLM NIM\nLlama 405B"), Rack("Embed NIM"), Rack("Guardrail NIM") ] with Cluster("eu-frankfurt-1 (EU Sovereign)"): lb_eu = LoadBalancer("Traffic Mgmt") gpu_eu = BM("BM.GPU.H100.8") with Cluster("Shared Services"): storage = ObjectStorage("Model Weights") vault = Vault("API Keys") adb = AutonomousDatabase("ADB 26ai") # Flow internet >> [lb_us, lb_eu] lb_us >> gpus_us for gpu in gpus_us: gpu >> nims_us nims_us >> adb storage >> gpus_us ``` --- ## Mermaid.js Templates ### RAG Architecture ```mermaid flowchart TB subgraph Sources["Data Sources"] S3[S3] SP[SharePoint] API[APIs] end subgraph Ingestion["OCI Ingestion"] STR[OCI Streaming] FN[Functions
Chunking] end subgraph AI["OCI AI Layer"] EMB[Cohere Embed 4
$0.0001/1K] LLM[Cohere Command A
$0.0015/1K] end subgraph Data["OCI Data Layer"] ADB[(ADB 26ai
Vector Search
$0 Free)] OBJ[Object Storage] end subgraph App["Application"] CHAT[Chat UI] APIGW[API Gateway] end Sources --> STR STR --> FN FN --> EMB EMB --> ADB CHAT --> APIGW APIGW --> LLM LLM --> ADB OBJ --> FN style ADB fill:#C74634,color:#fff style LLM fill:#C74634,color:#fff style EMB fill:#C74634,color:#fff ``` ### Agent Hierarchy ```mermaid flowchart TB HUB[Agent Hub
OCI Generative AI] SUP[Supervisor Agent
Cohere Command A] subgraph Specialists["Specialist Agents"] DA[Data Agent] SA[SQL Agent] CA[Code Agent] RA[Report Agent] end subgraph Tools["Tool Layer"] SEL[Select AI] REST[REST APIs] FN[Functions] end ADB[(ADB 26ai)] HUB --> SUP SUP --> DA & SA & CA & RA DA & SA & CA & RA -.-> SEL & REST & FN SEL --> ADB style HUB fill:#C74634,color:#fff style SUP fill:#C74634,color:#fff style ADB fill:#C74634,color:#fff ``` --- ## Generation Workflow When generating diagrams: 1. **Analyze Request** - Identify architecture pattern (RAG, Agent, Web, Analytics) - List required OCI services - Determine output format preference 2. **Select Template** - Choose closest matching template - Customize service icons and labels - Add connections and data flows 3. **Apply Oracle Styling** - Use Oracle Red (#C74634) for primary elements - Use proper icon shapes from mxgraph.oci.* - Add cost annotations where relevant 4. **Generate Output** - For Draw.io: Complete XML file - For Python: Executable script - For Mermaid: Markdown-embeddable code 5. **Validate** - Check all icon references are valid - Verify connections make logical sense - Ensure costs are from verified pricing --- ## File Output When outputting Draw.io XML: - Save as `.drawio` or `.xml` extension - User can open directly in Draw.io or diagrams.net - File → Open → Select the XML file When outputting Python: - Save as `.py` file - Run with `python filename.py` - Outputs PNG image to same directory ## Resources **Official Documentation:** - [OCI Graphics for Diagrams](https://docs.oracle.com/en-us/iaas/Content/General/Reference/graphicsfordiagrams.htm) - [OCI Architecture Center](https://docs.oracle.com/en/solutions/) - [Draw.io OCI Library](https://github.com/oracle-quickstart/oci-arch-template) **Tools:** - [Draw.io / diagrams.net](https://app.diagrams.net/) - [Python Diagrams Library](https://diagrams.mingrammer.com/) - [Mermaid.js](https://mermaid.js.org/) --- *Generate professional OCI architecture diagrams with verified Oracle styling and icons.* --- ## Quality Checklist Before finalizing diagrams: **Visual:** - [ ] Uses Oracle Red (#C74634) for OCI services - [ ] Correct icon shapes (mxgraph.oci.*) - [ ] Consistent spacing and alignment - [ ] Clear connection lines with labels **Content:** - [ ] All services labeled clearly - [ ] Cost estimates included (where relevant) - [ ] Data flow direction indicated - [ ] Security boundaries shown (VCN, subnets) **Accuracy:** - [ ] Services match actual architecture - [ ] Connections are logically correct - [ ] Region/AD placement accurate - [ ] Pricing from current OCI pricing page **Presentation:** - [ ] Title clearly states architecture purpose - [ ] Legend included for complex diagrams - [ ] Exportable format (PNG, SVG, PDF)