What is a Design?
A Design is Meshery’s deployable unit - a YAML-based description of all resources, configurations, and relationships needed for a deployment. Designs use Meshery’s declarative syntax (defined in the Meshery Schemas repository) to describe infrastructure state. Key characteristics:- Declarative YAML format based on Meshery schemas
- Composed of Components and Relationships
- Version-controlled with complete change history
- Stored in user accounts with optional sync to OCI registries or Git repos
- Shareable and collaboratively editable in real-time
Designs are built from Components packaged in Models. While Models define what components exist and how they can relate, Designs declare specific instances and configurations for deployment.
Designs vs Models
Understanding the relationship between Designs and Models is crucial:Models
What they are:- Packaging units for component definitions
- Define capabilities and constraints
- Blueprint templates for infrastructure
- Registered in Meshery’s registry
- Component schemas and specifications
- Relationship definitions between components
- Policies governing behavior
- Metadata and versioning information
Designs
What they are:- Practical implementations using Model components
- Specific infrastructure declarations
- Deployable configurations
- Customized for specific use cases
- Instances of components from Models
- Configured relationships between instances
- Environment-specific parameters
- Deployment metadata
Models are NOT directly deployed. Designs reference components from Models and ARE deployed to Environments through Workspaces.
Design Structure
Designs are YAML documents following the Meshery pattern file format:Design Components
Each component in a design represents an infrastructure resource: Component properties:name- Display name for the componenttype/kind- Component type from Model (e.g., Deployment, Service)model- Source model name (e.g., kubernetes, istio)namespace- Kubernetes namespace for deploymentsettings- Component-specific configurationtraits- Additional behaviors and policiesdependsOn- Deployment order dependencies
Design Metadata
Designs include metadata for management:Design Lifecycle
Creating Designs
Designs can be created in multiple ways: 1. Visual Designer (MeshMap):- Drag-and-drop components onto canvas
- Configure relationships visually
- Real-time validation and preview
- Automatic YAML generation
- Kubernetes manifests (YAML)
- Helm charts
- Docker Compose files
- Other Meshery designs
- Write design files manually
- Use templates as starting points
- Import from local filesystem or URLs
- Copy and modify existing designs
- Maintain separate ownership
- Customize for different use cases
Editing Designs
Collaborative editing:- Multiple users can edit simultaneously
- Real-time synchronization of changes
- Conflict detection and resolution
- Change attribution and audit trail
- Every save creates a new version
- Complete version history maintained
- Compare versions for differences
- Snapshot creation for immutable references
Validating Designs
Before deployment, designs undergo validation: Syntax validation:- YAML structure correctness
- Schema compliance
- Required field presence
- Component relationships are valid
- Dependencies can be resolved
- Policies are satisfied
- Resources are available
Deploying Designs
Deployment process:- Design Selection: Choose design to deploy
- Environment Selection: Select target environment(s)
- Validation: Run syntax and semantic checks
- Hydration: Fill in missing component details from registry
- Provisioning: Deploy components to target clusters
- Verification: Confirm successful deployment
dryRun=true- Validate without deployingskipCRD=true- Skip Custom Resource Definition installationverify=true- Run validation checksupgrade=true- Upgrade existing releases
Deployment Pipeline
Designs flow through processing stages:Undeploying Designs
Remove deployed resources:- Deployed Kubernetes resources
- Associated configurations
- Related workloads
Design Features
Ownership and Sharing
Ownership:- Design creator is the owner
- Owner controls access permissions
- Owner can delete the design
- Grant read or write access to other users
- Share within teams
- Make public for community access
- Design belongs to one workspace at a time
- Can be transferred between workspaces
- Cloning creates independent copy
Import and Export
Import formats:- Kubernetes YAML manifests
- Helm charts (converted to Meshery design)
- Docker Compose files
- Meshery design files (JSON/YAML)
- OCI images
- Remote URLs
- Meshery design JSON/YAML
- OCI-compatible images
- Embeddable HTML bundles
- React components (via @meshery/meshery-design-embed)
Snapshots
Snapshots are immutable point-in-time captures: Use cases:- Audit and compliance
- Rollback reference points
- Version comparison
- Design archival
- Immutable - cannot be modified
- Timestamped automatically
- Compare with current or other snapshots
- Restore design to snapshot state
Publishing to Catalog
Share designs with the community: Published designs:- Available to all Meshery users
- Listed in Meshery Catalog
- Discoverable in Artifact Hub
- Can be imported and customized
- Private by default
- Optionally made public (viewable but not in Catalog)
- Shareable via direct links
Versioning
Automatic version management: Version creation:- New version on every save
- Semantic versioning support
- Complete history maintained
- View version history
- Compare versions
- Restore to previous version (creates new version)
- Tag important versions
Real-time Collaboration
Multi-user editing:- See other users’ cursors and selections
- Changes sync in real-time
- Conflict detection and resolution
- Activity feed shows who changed what
- In-design comments
- Change notifications
- @mentions for collaboration
Design Patterns and Templates
Reusable Templates
Create design templates for common scenarios: Application templates:- Microservices base template
- Monolithic application template
- Batch job template
- Static site template
- Service mesh configuration
- Observability stack
- Security baseline
- Networking foundation
Design Composition
Merging designs: Combine multiple designs into one:- All components from both designs
- Combined relationships
- Merged metadata
- Conflict resolution required
Best Practices
Design Organization
- Single responsibility: One design per logical application/service
- Modularity: Break complex systems into composable designs
- Naming: Use descriptive names that indicate purpose
- Documentation: Add descriptions and comments
- Tagging: Use consistent tags for categorization
Version Management
- Semantic versioning: Use major.minor.patch format
- Meaningful commits: Describe what changed and why
- Regular snapshots: Create snapshots before major changes
- Tag releases: Mark production-deployed versions
Collaboration
- Clear ownership: Designate design owners
- Communication: Use comments for discussions
- Review process: Validate changes before deployment
- Access control: Grant appropriate permissions
Deployment
- Test first: Use dry-run before actual deployment
- Progressive rollout: Deploy to dev/staging before production
- Monitor health: Watch deployment status and logs
- Rollback plan: Know how to revert if needed
Designs can be audited for security vulnerabilities, policy compliance, and adherence to organizational standards using Meshery’s policy engine.
Design Technologies and Format
Schema-based Validation
Designs are validated against JSON schemas: Component schemas:- Defined in component definitions
- Enforce required fields
- Type checking
- Constraint validation
- Overall design structure
- Service definitions
- Metadata requirements
Pattern Format Versions
v1alpha2 (Legacy):- Older format, still supported
- Automatically converted to v1beta1
- Deprecated for new designs
- Current standard format
- Enhanced capabilities
- Better component support
- Improved relationship handling
Design Processing
Internal processing chain:- Format: Normalize design format
- Hydrate: Fill component details from registry
- Validate: Check syntax and semantics
- Provision: Deploy to infrastructure
API Reference
Key design endpoints:| Method | Endpoint | Description |
|---|---|---|
| GET | /api/pattern | List all designs |
| POST | /api/pattern | Create new design |
| GET | /api/pattern/{id} | Get design details |
| PUT | /api/pattern/{id} | Update design |
| DELETE | /api/pattern/{id} | Delete design |
| POST | /api/pattern/deploy | Deploy design |
| DELETE | /api/pattern/deploy | Undeploy design |
| POST | /api/pattern/import | Import design |
| POST | /api/pattern/clone | Clone design |
Related Concepts
- Models - Component and relationship definitions
- Components - Building blocks for designs
- Relationships - Component interactions
- Workspaces - Collaboration and sharing
- Environments - Deployment targets