|
| 1 | +bundle: |
| 2 | + name: agent-genie-app |
| 3 | + |
| 4 | +variables: |
| 5 | + project_name: |
| 6 | + description: "Display name for the app" |
| 7 | + default: "agent-genie" |
| 8 | + |
| 9 | + # Env-only fallback; will also be persisted to a secret by the installer job if possible |
| 10 | + tavily_api_key: |
| 11 | + description: "Tavily API key (installer job will try to store in a secret scope)" |
| 12 | + default: "" |
| 13 | + |
| 14 | + # Where to persist the secret (customize if you already have a scope) |
| 15 | + secret_scope: |
| 16 | + description: "Workspace secret scope to store Tavily key" |
| 17 | + default: "agent_genie_secrets" |
| 18 | + |
| 19 | + secret_key: |
| 20 | + description: "Secret key name for Tavily key inside the scope" |
| 21 | + default: "TAVILY_API_KEY" |
| 22 | + |
| 23 | + environment: |
| 24 | + description: "Deployment environment (dev, staging, prod)" |
| 25 | + default: "dev" |
| 26 | + |
| 27 | +targets: |
| 28 | + dev: |
| 29 | + default: true |
| 30 | + mode: development |
| 31 | + |
| 32 | +resources: |
| 33 | + apps: |
| 34 | + agent_genie: |
| 35 | + name: "${var.project_name}" |
| 36 | + description: "FastAPI app with Genie + Serving Endpoint integration" |
| 37 | + source_code_path: "." |
| 38 | + |
| 39 | + command: [ |
| 40 | + "uvicorn", |
| 41 | + "app:app", |
| 42 | + "--host", |
| 43 | + "127.0.0.1", |
| 44 | + "--port", |
| 45 | + "8000" |
| 46 | + ] |
| 47 | + |
| 48 | + # Inject env for your app at runtime |
| 49 | + env: |
| 50 | + - name: "SPACE_ID" |
| 51 | + value_from: "genie-space" |
| 52 | + - name: "SERVING_ENDPOINT_NAME" |
| 53 | + value_from: "serving-endpoint" |
| 54 | + - name: "TAVILY_API_KEY" |
| 55 | + value: "${var.tavily_api_key}" # app can use this directly; secret is optional hardening |
| 56 | + |
| 57 | + # --- App Resources (end-user picks these at install) --- |
| 58 | + app_resources: |
| 59 | + - key: "serving-endpoint" |
| 60 | + serving_endpoint_spec: |
| 61 | + permission: "CAN_QUERY" |
| 62 | + - key: "genie-space" |
| 63 | + genie_space_spec: |
| 64 | + permission: "CAN_RUN" |
| 65 | + |
| 66 | + # --- User Authorized Scopes (Preview) --- |
| 67 | + user_authorized_scopes: |
| 68 | + - "sql" |
| 69 | + - "dashboards.genie" |
| 70 | + - "files.files" |
| 71 | + - "serving.serving-endpoints" |
| 72 | + - "vectorsearch.vector-search-indexes" |
| 73 | + - "catalog.connections" |
| 74 | + |
| 75 | + # --- Installer job to persist Tavily key into a secret and write optional config --- |
| 76 | + jobs: |
| 77 | + install_app: |
| 78 | + name: "${var.project_name} - Install/Configure" |
| 79 | + tasks: |
| 80 | + - task_key: configure_app |
| 81 | + notebook_task: |
| 82 | + notebook_path: "./notebooks/setup_app" # create this notebook |
| 83 | + base_parameters: |
| 84 | + TAVILY_API_KEY: "${var.tavily_api_key}" |
| 85 | + SECRET_SCOPE: "${var.secret_scope}" |
| 86 | + SECRET_KEY: "${var.secret_key}" |
| 87 | + # Add compute for your workspace (example placeholders): |
| 88 | + # existing_cluster_id: "<your-cluster-id>" |
| 89 | + # OR: |
| 90 | + # job_clusters: |
| 91 | + # - job_cluster_key: "install_cluster" |
| 92 | + # new_cluster: |
| 93 | + # spark_version: "14.3.x-scala2.12" |
| 94 | + # node_type_id: "i3.xlarge" |
| 95 | + # num_workers: 0 |
0 commit comments