Bundles
Bundles are the fundamental unit of deployment in PrioStack. A bundle is a complete, self-contained application that consists of one or more services packaged together. Think of a bundle as a microservices application - a collection of related services that work together to provide a complete solution.
💡 Key Concept: Bundles enable modular application development. Each bundle is independent and can be deployed, updated, and scaled separately.
Bundle Structure
Every bundle follows a consistent folder structure that organizes services, configuration files, and supporting assets:
├── bundle.yaml // Bundle configuration
├── 📁 service1/
│ └── service1.yaml
├── 📁 service2/
│ └── service2.yaml
└── 📁 wasm/
├── service1.wasm
└── service2.wasm
Bundle Configuration
The bundle.yaml file is the heart of every bundle. It defines the bundle's
metadata and lists all the services that belong to it.
Basic bundle.yaml
name: my-bundle
description: A description of what this bundle does
version: 1.0.0
services:
- path: service1/service1.yaml
- path: service2/service2.yaml
Configuration Fields
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Unique identifier for the bundle |
description |
string | No | Human-readable description |
version |
string | No | Semantic version (e.g., "1.0.0") |
services |
array | Yes | List of service configuration files |
Bundle Lifecycle
Bundles go through several phases during their lifecycle in PrioStack:
1. Development
Create the bundle structure, define services, and implement business logic. During development, bundles exist as folders on your local machine.
2. Packaging
Bundle the application into a deployable format. This typically involves zipping the entire bundle folder while preserving the directory structure.
3. Deployment
Upload the bundle to PrioStack through the web interface or API. PrioStack validates the bundle configuration and deploys all services.
4. Runtime
Once deployed, the bundle runs as a collection of services. Each service operates independently but can communicate with other services in the bundle.
5. Updates
Deploy new versions of the bundle. PrioStack supports rolling updates to minimize downtime during service upgrades.
Bundle Dependencies
Services within a bundle can depend on each other. PrioStack automatically manages service startup order based on these dependencies.
⚠️ Important: Circular dependencies between services are not allowed and will cause deployment failures.
Defining Dependencies
Dependencies are defined in individual service configuration files, not in the bundle.yaml. This allows for more granular control over service relationships.
Best Practices
Naming Conventions
- Use lowercase, hyphen-separated names (e.g.,
my-bundle) - Keep names descriptive but concise
- Avoid special characters except hyphens
Service Organization
- Group related functionality into logical services
- Keep services focused on single responsibilities
- Use clear, descriptive service names
Version Management
- Always specify version numbers for production bundles
- Use semantic versioning (MAJOR.MINOR.PATCH)
- Document breaking changes in version updates
File Structure
- Maintain consistent folder structure across bundles
- Keep configuration files at the root level
- Organize WASM modules in a dedicated folder
✅ Pro Tip: Start with a simple bundle structure and expand as needed. You can always refactor services later without breaking existing functionality.