# Service Commissioning Files

Service commissioning files are the foundation for defining and implementing services in Connectware. These files use YAML format to describe all the resources, configurations, and relationships that make up a [service](https://docs.cybus.io/2-0-6/documentation/services).

A service commissioning file serves as a blueprint for a service, detailing:

1. The resources required by the service (e.g., users, connections, containers)
2. Configuration parameters for each resource
3. Relationships and dependencies between resources

When you enable a service in Connectware, the system reads the service commissioning file and automatically sets up all specified resources according to the defined parameters.

## Structure of Service Commissioning Files

Service commissioning files define how services are configured and deployed within your infrastructure. These files follow a structured format that enables you to specify all necessary components and their relationships for your service implementation.

A service commissioning file consists of several main sections that serve distinct purposes in service configuration. These include version information, service descriptions, metadata for service identification, parameters for configuration, resource definitions, and the actual resources that make up your service.

The resources section is particularly important as it contains various Cybus-specific resource types that handle different aspects of your service:

* [Connections](https://docs.cybus.io/2-0-6/documentation/services/service-commissioning-files/resources/cybus-connection) establish data source and target interfaces
* [Endpoints](https://docs.cybus.io/2-0-6/documentation/services/service-commissioning-files/resources/cybus-endpoint) define specific connection points
* [Mappings](https://docs.cybus.io/2-0-6/documentation/services/service-commissioning-files/resources/cybus-mapping) configure data transformations
* [Containers](https://docs.cybus.io/2-0-6/documentation/services/service-commissioning-files/resources/cybus-container) specify runtime environments
* [Links](https://docs.cybus.io/2-0-6/documentation/services/service-commissioning-files/resources/cybus-link) establish relationships between resources
* And several other specialized resources for managing [users](https://docs.cybus.io/2-0-6/documentation/services/service-commissioning-files/resources/cybus-user), [roles](https://docs.cybus.io/2-0-6/documentation/services/service-commissioning-files/resources/cybus-role), [volumes](https://docs.cybus.io/2-0-6/documentation/services/service-commissioning-files/resources/cybus-volume), and more

Understanding the structure and proper usage of these components is essential for creating effective and maintainable service configurations in Connectware. The following sections provide detailed information about each component and how they work together to create a complete service definition.

**Example**

Service commissioning files follow a standardized YAML structure with several distinct sections. At the core of each service commissioning file are the following components:

{% code lineNumbers="true" %}

```yaml
---
version: 'version number'

description: >
  "string"

metadata: 'service commissioning file metadata'

parameters: 'set of parameters'

definitions: 'set of definitions for internal use'

resources: 'set of resources'
```

{% endcode %}

Each section serves a specific purpose in defining your service configuration:

* The `version` field specifies the service commissioning file format version
* The `description` section provides details about the service's purpose and functionality
* `metadata` contains identification and classification information
* `parameters` defines configurable values used throughout the service
* `definitions` holds reusable elements for internal reference
* The `resources` section defines the actual service elements and their configurations

The following chapters will explain each section in detail.

## Service Commissioning Files Requirements

### Payload Size

Connectware uses NATS with `max_payload` set to 32 MB. This is the maximum payload size allowed by NATS.
