Installing the Entity Scaffolder Content Frontend Plugin#
This guide will help you install and set up the Entity Scaffolder Content frontend plugin in your Backstage instance.
Prerequisites#
Before installing the plugin, ensure you have:
- A working Backstage instance
- The Scaffolder plugin installed and configured
- Access to entity pages where you want to embed templates
Installation Steps#
1. Add the Package#
Install the plugin package using yarn:
2. Add to Entity Page#
Modify your entity page configuration in packages/app/src/components/catalog/EntityPage.tsx
:
import { EntityScaffolderContent } from '@terasky/backstage-plugin-entity-scaffolder-content';
// Example for system entity page
const systemPage = (
<EntityLayout>
{/* ... other routes ... */}
<EntityLayout.Route path="/scaffolder" title="Templates">
<EntityScaffolderContent
templateGroupFilters={[
{
title: 'System Templates',
filter: (entity, template) =>
template.metadata?.labels?.forEntity === 'system' &&
entity.spec?.type === 'kubernetes-namespace',
},
]}
buildInitialState={entity => ({
namespace: entity.metadata.name,
// Add other initial state mappings
})}
/>
</EntityLayout.Route>
</EntityLayout>
);
// Add similar configurations for other entity pages as needed
Verification#
After installation, verify that:
- The plugin appears in your package.json dependencies
- The templates tab appears on configured entity pages
- Templates are properly filtered based on entity context
- Template forms are pre-populated with entity data
Troubleshooting#
Common issues and solutions:
-
Templates Tab Not Showing
- Verify EntityLayout.Route configuration
- Check component import path
- Ensure entity page configuration is applied
-
Templates Not Filtered
- Review templateGroupFilters configuration
- Check template metadata and labels
- Verify entity type matching
-
Form Pre-population Issues
- Check buildInitialState function
- Verify entity data access
- Review data transformation logic
For configuration options and customization, proceed to the Configuration Guide.