Integrations
Add a service to your task with one command.
One npm package writes the settings for a service into your task.yaml and gives you the code to use it. You write only your task.
- A plan before any change
- No install scripts
- task.yaml stays yours
- Open source
1 · Understand
How it works
Four steps. Nothing changes in your task until step 3.
Pick one
Choose the integration for the service that your task uses.
integration:add <name>Read the plan
The CLI shows every setting that it will write, and what you must add yourself.
--dry-runAnswer y
It installs the package and writes task.yaml. Any other answer changes nothing.
Apply? [y/N]Finish and deploy
Add your secret values and hosts, check the task, and deploy.
task:deploy
2 · Read the plan
The plan tells you everything first
This is the plan for stream on a new Node task. It has four parts. Point at a part to see its lines.
$ ignitify integration:add stream --task live --dry-run@ignitify-integrations/stream@<version> · settings + code · runs ffmpeg execution.network.type: none -> bidirectional run.preset: (default) -> std.medium + execution: duration long, interaction continuous + execution.network: inbound_port 8080 + execution.network.inbound_routes: /live/ + build.system_packages: ffmpegyou add: egress host: the host of an https source (for example raw.githubusercontent.com); none for a local filedry run: task.yaml was not changed
What you get
The package, and what it brings: settings, code, and the system program that it runs (here
ffmpeg).What it writes
a -> braises a setting.+adds a setting. A setting is never lowered.What you add
The part that is different for each user, so the CLI cannot write it. You add it after the apply.
The result
With
--dry-run, the command stops here. With no--dry-run, it asksApply? [y/N].
<version> is the latest version of the integration. The yellow lines are always yours: the same colour marks your steps below.
3 · Know your part
What it does, and what you do
An integration writes what is the same for every user. You add what is different for you.
The integration
- Installs one npm packageAs a normal dependency. Your lockfile pins the exact version.
- Writes the settingsNetwork type, preset, ports, routes, system packages, and the names of the secrets.
- Gives you the codeYou import it in your task, the same as any other package.
You
- Set the secret valuesIt writes only the names. The values go to the platform with secret:set, and never into task.yaml.
- Add your hostsYour bucket or source host is different for each user, and an integration cannot ask for a wildcard host.
- Call the code, check, deployYou decide where your task uses it. Then task:validate and task:deploy, as usual.
4 · Try it
Add your first integration
Give a task a place to keep big results: add s3-storage to a Node task, then check it and deploy it. Each output comes from a real run.
APrepare
Get the CLI
You need the ignitify CLI 1.2.2 or later, installed and signed in. See Install.
$ npm install --global ignitify@latestCreate a Node task
An integration needs a
package.jsonin the task folder.task:createwrites one. You can also use a Node task that you have. See Your first task.$ ignitify task:create report
BAdd the integration
Read the plan
With
--dry-run, the command shows the plan and stops. Nothing in the task changes.$ ignitify integration:add s3-storage --task report --dry-run@ignitify-integrations/s3-storage@<version> · settings + code execution.network.type: none -> egress + secrets: S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEYyou add: secret S3_ACCESS_KEY_ID (new): ignitify secret:set S3_ACCESS_KEY_ID --stdin secret S3_SECRET_ACCESS_KEY (new): ignitify secret:set S3_SECRET_ACCESS_KEY --stdin egress host: your bucket host: <bucket>.s3.<region>.amazonaws.com on AWS, or the host of your custom endpointdry run: task.yaml was not changed
Apply it
Run the command again with no
--dry-run, and answery. It installs the package and writestask.yaml. Your comments and the order of your keys stay.$ ignitify integration:add s3-storage --task report@ignitify-integrations/s3-storage@<version> · settings + code execution.network.type: none -> egress + secrets: S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEYyou add: secret S3_ACCESS_KEY_ID (new): ignitify secret:set S3_ACCESS_KEY_ID --stdin secret S3_SECRET_ACCESS_KEY (new): ignitify secret:set S3_SECRET_ACCESS_KEY --stdin egress host: your bucket host: <bucket>.s3.<region>.amazonaws.com on AWS, or the host of your custom endpointApply? [y/N] y✓ @ignitify-integrations/s3-storage@<version> installed✓ task.yaml updated
CAdd your part You add
Store the secret values
The plan wrote the secret names. You set the values. Each command reads the value from stdin, so it stays out of your shell history. See Use secrets.
$ ignitify secret:set S3_ACCESS_KEY_ID --stdin$ ignitify secret:set S3_SECRET_ACCESS_KEY --stdinAdd your bucket host
The task had no network, so the plan wrote
egress_allow: []: the task cannot connect to a host yet. Put your bucket host in the list. See Network access.secrets: - S3_ACCESS_KEY_ID - S3_SECRET_ACCESS_KEY execution: network: type: egress egress_allow: - acme-reports.s3.eu-west-1.amazonaws.com # you add: your bucket host
DUse it and ship
Use it in your code
Upload a file from the scratch disk and return a download link. The result stays small, also for a big file.
import { storage } from '@ignitify-integrations/s3-storage'; export async function run(payload, ctx) { const file = await buildReport(payload); // a path on the scratch disk const store = storage(ctx, { bucket: 'acme-reports', region: 'eu-west-1' }); const url = await store.putAndLink(file, { expiresSec: 86400, contentType: 'application/pdf' }); return { url }; }Check the task
task:validatealso checks thattask.yamlcovers every integration of the task.$ ignitify task:validate report✓ task config valid
Deploy as usual
The build installs the package from your lockfile, the same as any other dependency.
$ ignitify task:deploy report
5 · Keep it working
After you add it
What happens when you say no, edit by hand, add a second integration, upgrade or remove.
Any answer other than y changes nothing
The command stops. No file changes: not package.json, the lockfile, node_modules or task.yaml.
$ ignitify integration:add stream --task live@ignitify-integrations/stream@<version> · settings + code · runs ffmpeg execution.network.type: none -> bidirectional run.preset: (default) -> std.medium + execution: duration long, interaction continuous + execution.network: inbound_port 8080 + execution.network.inbound_routes: /live/ + build.system_packages: ffmpegyou add: egress host: the host of an https source (for example raw.githubusercontent.com); none for a local fileApply? [y/N] nAborted.
Your edits are fine. task:validate catches a break.
The settings are normal lines in your task.yaml. If someone deletes the secret names, the check fails before a deploy, not during a run:
$ ignitify task:validate report✗ @ignitify-integrations/s3-storage: secret S3_ACCESS_KEY_ID is missing from secrets✗ @ignitify-integrations/s3-storage: secret S3_SECRET_ACCESS_KEY is missing from secrets
Settings join. They never go down.
You can add more than one integration to a task. Each plan shows only what it adds to the task that you have.
- Lists are joinedSecrets, hosts, routes and system packages from each integration are all kept.
- Levels only go upThe network type and the preset go to the higher value that an integration needs.
- A conflict stops the commandIt names the field and changes nothing.
The Launch event tutorial uses stream and s3-storage in one task.
Run the same command again
Only the latest version is supported. task:validate warns when your version is old, and names the latest one. integration:add installs the latest version and shows only the new settings. If there are none, it changes nothing:
$ ignitify integration:add s3-storage --task report@ignitify-integrations/s3-storage@<version> · settings + codeyou add: secret S3_ACCESS_KEY_ID: ignitify secret:set S3_ACCESS_KEY_ID --stdin secret S3_SECRET_ACCESS_KEY: ignitify secret:set S3_SECRET_ACCESS_KEY --stdin egress host: your bucket host: <bucket>.s3.<region>.amazonaws.com on AWS, or the host of your custom endpointtask.yaml already has every setting this integration needs; nothing to write
Uninstall the package
The settings that it wrote stay in task.yaml, because they are yours. Delete the ones that you no longer need, by hand. Then run task:validate.
$ npm uninstall @ignitify-integrations/s3-storage6 · Trust it
Safe by design
An integration changes only what you can see and read, and only after a yes.
A plan before any change
You see each setting before it is written. "N" or --dry-run changes nothing: not package.json, the lockfile, node_modules or task.yaml.
No install scripts
The package installs with --ignore-scripts, the same as your build. Your lockfile pins the exact version.
Conflicts are refused
A value that the integration cannot use is never overwritten. The command stops and names the field.
Your file, your settings
task.yaml stays the one truth, and the platform enforces only task.yaml. Edit or delete any setting by hand.
task:validate checks it
It finds a task that no longer covers its integrations, for example a deleted secret name or a preset that is too small.
Your VM only
The code runs only in your own task VM, with the secrets and hosts of that task. The build installs it from your lockfile.
Questions
Do I need an integration?
No. An integration is an option that saves you work. It writes normal settings into your task.yaml and adds one npm package with the code. The platform enforces only task.yaml, so a task with settings that you wrote by hand runs in the same way.
To do it by hand, open the integration in the catalog. Its page lists each setting that it writes, what you add yourself, and the code, with a link to its README.
What you lose without it: the plan before each change, and the task:validate check that your task still covers the integration.
Does my task need to be a Node task?
Yes. An integration is an npm package, so the task folder needs a package.json. task:create writes one for a Node task, and a Node task that you have already works too.
The command installs the package as a normal dependency, and your lockfile pins its version. You then import its code in your task, the same as any other package.
What if it conflicts with my task?
The command stops before it changes anything, and it names the field. No file changes: not package.json, the lockfile or task.yaml.
For example, stream needs interaction: continuous. If your task sets another value, the command refuses. Change the field by hand and run the command again, or add the integration to another task.
A value that is already higher than what the integration needs is not a conflict. Settings are only raised, never lowered, so a larger preset or a wider network type that you set stays.
What does it cost?
The integrations are free and open source (Apache-2.0). You pay for your runs as usual, and an integration adds no charge of its own.
An integration can change what your runs need. stream raises the preset to std.medium, opens inbound traffic, and makes the run long and continuous. A larger preset has a larger weight while it runs. See Presets and limits and How capacity works.
Your plan must also allow what the integration needs. Today, s3-storage needs the Starter plan or higher; stream needs the Pro plan or higher. Each integration page shows its plan, and the pricing page shows what each plan allows.
Can I suggest an integration?
Yes. Contact us, and tell us three things: the service, what your task does with it, and the work that you want to stop building.
The catalog shows every integration that you can add today. Until the one that you need exists, you can write its settings and code yourself.
Next steps
Integrations guide
How to add, check, upgrade and remove an integration.
Read the guide →Launch event tutorial
Stream a video live and keep the recording in your bucket, with two integrations in one task. Preview.
Start the tutorial →CLI reference
Every flag of integration:add, with examples.