Create Deployment Scripts for Both Dynamic-Plugin and Backstage-Standalone#2830
Create Deployment Scripts for Both Dynamic-Plugin and Backstage-Standalone#2830asmasarw merged 10 commits intoredhat-developer:mainfrom
Conversation
Code Review by Qodo
1. Proxy skips authorization
|
Changed Packages
|
Review Summary by QodoImplement complete DCM API layer with CRUD management UI and deployment infrastructure
WalkthroughsDescription• **Comprehensive API client layer**: Implemented base client (DcmBaseClient) and four concrete API clients (CatalogClient, PolicyManagerClient, ProvidersClient, PlacementClient) for secure communication with DCM services through backend proxy • **Backend proxy route**: Added Express route handler for proxying requests to DCM API Gateway with token injection, configuration validation, and error handling • **Type system**: Defined complete TypeScript interfaces for all DCM domain types (Catalog, Policy Manager, Providers, Placement) with validation schemas • **Form validation framework**: Created reusable form types and Yup validation schemas for all resource types (Providers, Policies, Catalog Items, Instances, Resources) with conversion utilities • **CRUD state management hook**: Implemented useCrudTab custom hook centralizing state management for data loading, search, pagination, and create/edit/delete dialogs • **UI components**: Built reusable components (DcmCrudTabLayout, DcmFormDialog, DcmFormDialogActions, DcmDeleteDialog, DcmErrorSnackbar, TruncatedText) for consistent CRUD operations • **Tab pages**: Created six new management tabs (Providers, Policies, Service Types, Catalog Items, Instances, Resources) with full CRUD functionality and async API integration • **Comprehensive test coverage**: Added 15+ test files covering API clients, form validation, utilities, and components • **Configuration & deployment**: Added Docker support, production config, dynamic plugin configs, and build scripts for containerized deployment • **Documentation**: Updated API reports and added changeset documenting major refactoring Diagramflowchart LR
A["Frontend Plugin"] -->|API Refs| B["API Clients"]
B -->|HTTP Proxy| C["Backend Plugin"]
C -->|Token Injection| D["DCM API Gateway"]
A -->|Form Validation| E["Form Types & Schemas"]
A -->|State Management| F["useCrudTab Hook"]
A -->|UI Components| G["CRUD Tab Pages"]
G -->|Display| H["Providers/Policies/Catalog/Resources"]
C -->|Config| I["SSO & Token Util"]
J["Docker Build"] -->|Containerize| K["Production Deployment"]
File Changes1. workspaces/dcm/plugins/dcm/src/hooks/useCrudTab.ts
|
Ran `yarn --cwd workspaces/dcm dedupe` to collapse the duplicate @types/node entry (20.19.33 → 20.19.39). Made-with: Cursor
|
mareklibra
left a comment
There was a problem hiding this comment.
This is good for (dev-) testing but eventually you will need OCI builds by https://github.com/redhat-developer/rhdh-plugin-export-overlays .
For the NPM packages for vanilla Backstage deployment, the rhdh-plugins' repo CI with its changesets and Version package PRs is the best option.



Introduced new Image Creation Options
We have 2 Types of Images:
Dynamic Plugin
What it builds: A tiny OCI artifact (~few MB) containing only the compiled plugin JavaScript files.
How it works:
Exports the frontend (plugins/dcm) and backend (plugins/dcm-backend) as dynamic plugins
Packages them into a single OCI image tagged quay.io/dcm-project/dcm-ui:VERSION
tgz additionally extracts the .tgz tarballs from that image via skopeo
Who consumes it: An already-running Red Hat Developer Hub instance. RHDH loads the plugin at startup by pulling the OCI artifact and mounting the plugin files into its own runtime. You don't run this image directly — RHDH runs it.
Use case: Your production RHDH cluster wants to add the DCM plugin without rebuilding the whole Backstage app.
Standalone Backstage Application
What it builds: A full, self-contained Docker image (~1GB+) with the entire Backstage application baked in — Node.js runtime, all dependencies, compiled frontend, and compiled backend.
How it works:
Runs yarn tsc + yarn workspace app build + yarn workspace backend build inside a build container
Copies only the production artifacts into a lean runtime image
Tags it quay.io/dcm-project/dcm-ui:VERSION
Who consumes it: You run it directly with docker run or podman-compose up. It starts a complete Backstage server on port 7007 that serves both the API and the frontend — no RHDH required.
Use case: Your compose.yaml setup — a standalone Backstage instance specifically for the DCM plugin.
How to Generate Image
To Generate Dynamic Plugin
VERSION=<semver> ./scripts/generate-image.sh [oci|tgz|push]To Generate Standalone Backstage Application
VERSION=<semver> ./scripts/generate-image.sh backstage-image [--push]Script Description (Help)
./scripts/generate-image.sh --help