Job Templates

A Job Template (or simply Template) combines Building Blocks into one configuration file for your jobs. It:

  • Provides instructions to the services that execute your job.

  • Ensures your app and data engines are connected correctly.

By default, ByteNite generates a job template when you start building a new app. This allows you to focus on developing your app without needing to configure the other components upfront.

However, since your app may expect specific data types or formats, you can create and customize a job template to link your app to the appropriate partitioning and assembling engines.

Job Template file

Example:

template.json
{
  "id": "img-gen-diffusers-template",
  "description": "A template for my img-gen-diffusers app",
  "app": "img-gen-diffusers@1",
  "partitioner": "replicate-fanout",
  "assembler": "zipper",
}

How to create a job template

You can either:

  1. Define the fields manually as shown in the example, or

  2. Generate a blank template using the ByteNite CLI:

bytenite template new [template_name]

Key notes

  • When you create a new app, a template is generated automatically and is uploaded with the app.

  • If you prefer to manage templates separately, you can move your template out of the app folder and use the CLI to manage it independently.

Your template includes a user-defined id and an optional description. Use the app, partitioner, and assembler fields to specify which components should be used in jobs built from this template:

app string

Description:

An app tag to be used with this template.

Supported Format:

Please refer to the Tag definition.

Examples:

partitioner string

Description:

An engine tag to be used with this template.

Supported Format:

Please refer to the Tag definition.

Examples:

assembler string

Description:

An engine tag to be used with this template.

Supported Format:

Please refer to the Tag definition.

Examples:

Last updated

Was this helpful?