Release Metadata
Define release artifacts, service dependencies, and migration schemas for automated deployment
Release metadata allows you to define additional information about your service releases that Ryvn uses for automated deployment, dependency management, and migration path computation. This includes container artifacts, service dependencies, and database migration schemas.
Overview
Release metadata is stored as JSON in the release_metadata
field of each service release. This metadata helps Ryvn:
- Track exact artifacts used in each release (container images, Helm charts, etc.)
- Manage service dependencies and ensure proper deployment order
- Compute valid migration paths between versions
- Enable automated rollbacks with confidence
Using Release Metadata in ryvn.yaml
Release metadata is defined in your ryvn.yaml
file under the services
block. This allows you to version-control your release metadata alongside your application code and define service-specific release information.
Service Configuration with Metadata
Release Artifacts
Release artifacts define the exact artifacts (like container images) that are part of a release. This ensures reproducible deployments and enables Ryvn to track what’s actually running in each environment.
Container Image Artifacts
For web server and Docker image services, you can specify the exact container images used in a release:
Creating Releases with Metadata
You can create releases with metadata using the Ryvn CLI. The metadata can be provided via a file or inline:
release-metadata.yaml:
release-metadata.yaml:
The metadata file can be in YAML or JSON format. When using the -f
flag, Ryvn will automatically detect the format based on the file extension. The --metadata
flag expects JSON format for inline metadata.
Service Dependencies
Service dependencies define the relationships between services and ensure proper deployment order. This is crucial for complex applications with multiple interconnected services.
Dependency Types
Ryvn supports several types of service dependencies:
- Database dependencies: Services that require a database to be available
- API dependencies: Services that depend on other services’ APIs
- Infrastructure dependencies: Services that require specific infrastructure components
Version Range Format
Dependencies use version ranges with minVersion
and maxVersion
fields:
- Exact version:
minVersion: "2.1.0"
,maxVersion: "2.1.0"
- Version range:
minVersion: "2.0.0"
,maxVersion: "3.0.0"
- Wildcard support:
minVersion: "2.0.0"
,maxVersion: "3.x.x"
(any 3.x.x version) - Unbounded range:
minVersion: "2.0.0"
,maxVersion: "*"
(any version >= 2.0.0)
Version Range Examples
Version Range Examples
Defining Dependencies
Add dependencies to your release metadata using version ranges:
Dependency Resolution
Ryvn automatically resolves dependencies during deployment:
- Order calculation: Determines the optimal deployment order
- Health checks: Ensures dependent services are healthy before proceeding
- Rollback coordination: Handles rollbacks across dependent services
Dependencies must be satisfied before a service can be deployed. Ryvn will block deployments if dependencies are unavailable or unhealthy.
Migration Schemas
Migration schemas define which database schema versions are supported by the current release. This enables Ryvn to compute valid migration paths and prevent rollbacks to unsupported schema versions.
Schema Version Support
Each release specifies a list of supported schema versions:
- Current schema versions: The schema versions that this release supports
- Migration path validation: Ryvn ensures rollbacks only target supported schema versions
- Version compatibility: Prevents deployment to releases with incompatible schemas
Migration Schema Format
Migration Path Computation
Ryvn uses the supported schema versions to:
- Validate rollback targets: Ensure rollbacks only target supported schema versions
- Prevent incompatible deployments: Block deployments to releases with unsupported schemas
- Calculate migration paths: Determine valid upgrade and rollback paths
- Enforce schema compatibility: Ensure data integrity across releases
Schema Version Evolution
As your application evolves, you can add or remove supported schema versions:
When a schema version is removed from the supported list, Ryvn will prevent rollbacks to releases that only support that schema version. This ensures data integrity and prevents deployment to incompatible releases.
Schema Analysis
Ryvn analyzes the supported schema versions of both current and target releases
Compatibility Check
Validates that the target release supports the current schema version
Path Validation
Ensures rollback targets only supported schema versions
Deployment Decision
Allows or blocks deployment based on schema compatibility
Advanced Metadata Features
Custom Metadata
You can include custom metadata for your specific use cases:
Metadata Validation
Ryvn validates release metadata to ensure:
- Artifact consistency: Artifacts match the service type
- Dependency validity: Referenced services exist and are accessible
- Migration compatibility: Migration scripts are valid SQL
- Version compatibility: Dependencies are compatible with the release version
Metadata Inheritance
Release metadata can inherit from previous releases:
Best Practices
Artifact Management
Dependency Management
Migration Management
Metadata Maintenance
Troubleshooting
Common Issues
Artifact Not Found
Artifact Not Found
Ensure the artifact repository and tag are accessible from Ryvn’s infrastructure. Check registry credentials and network connectivity.
Dependency Resolution Failed
Dependency Resolution Failed
Verify that all dependent services exist and are accessible. Check version compatibility and service health.
Migration Path Invalid
Migration Path Invalid
Review migration schemas for compatibility issues. Ensure all intermediate versions are available and migrations are reversible.
Metadata Validation Errors
Metadata Validation Errors
Check the metadata format against the schema. Ensure all required fields are present and valid.
Debugging Metadata
Use Ryvn’s CLI to inspect release metadata:
API Reference
Release Metadata Schema
Example ryvn.yaml with Release Metadata
For complete API documentation, see the Service API Reference.