Configure the manifest.yml

The manifest.yml, located in the root of the Asset Compute project, describes all the workers in this project to be deployed.

manifest.yml

Default worker definition

Workers are defined as Adobe I/O Runtime action entries under actions, and comprised of a set of configurations.

Workers accessing other Adobe I/O integrations must set the annotations -> require-adobe-auth property to true as this exposes the worker’s Adobe I/O credentials via the params.auth object. This is typically required when the worker calls out to Adobe I/O APIs such as the Adobe Photoshop, Lightroom or Sensei APIs, and can be toggled per worker.

  1. Open and review the auto-generated worker manifest.yml. Projects that contains multiple Asset Compute workers, must define an entry for each worker under the actions array.
packages:
  __APP_PACKAGE__:
    license: Apache-2.0
    actions: # the array of workers, since we have a single worker there is only one entry beneath actions
      worker: # the auto-generated worker definition
        function: actions/worker/index.js # the entry point to the worker
        web: 'yes'  # as our worker is invoked over HTTP from AEM Author service
        runtime: 'nodejs:12' # the target nodejs runtime (only 10 and 12 are supported)
        limits:
          concurrency: 10
        annotations:
          require-adobe-auth: true # set to true, to pass through Adobe I/O access token/client id via params.auth in the worker, typically required when the worker calls out to Adobe I/O APIs such as the Adobe Photoshop, Lightroom or Sensei APIs.

Define limits

Each worker can configure the limits for its execution context in Adobe I/O Runtime. These values should be tuned to provide optimal sizing for the worker, based on the volume, rate and type of assets it will compute, as well as the type of work it performs.

Review Adobe sizing guidance before setting limits. Asset Compute workers can run out of memory when processing assets, resulting in the Adobe I/O Runtime execution being killed, so ensure the worker is sized appropriately to handle all candidate assets.

  1. Add an inputs section to the new wknd-asset-compute actions entry. This allows tuning of the Asset Compute worker’s overall performance and resource allocation.
packages:
  __APP_PACKAGE__:
    license: Apache-2.0
    actions:
      worker:
        function: actions/worker/index.js
        web: 'yes'
        runtime: 'nodejs:12'
        limits: # Allows for the tuning of the worker's performance
          timeout: 60000 # timeout in milliseconds (1 minute)
          memorySize: 512 # memory allocated in MB; if the worker offloads heavy computational work to other Web services this number can be reduced
          concurrency: 10 # adjust based on expected concurrent processing and timeout
        annotations:
          require-adobe-auth: true

The finished manifest.yml

The final manifest.yml looks like:

packages:
  __APP_PACKAGE__:
    license: Apache-2.0
    actions:
      worker:
        function: actions/worker/index.js
        web: 'yes'
        runtime: 'nodejs:12'
        limits:
          timeout: 60000 # in ms
          memorySize: 512 # in MB
          concurrency: 10
        annotations:
          require-adobe-auth: true

manifest.yml on Github

The final .manifest.yml is available on Github at:

Validating the manifest.yml

Once the generated Asset Compute manifest.yml is updated, run the local Development Tool and ensure starts successfully with the updated manifest.yml settings.

To start Asset Compute Development Tool for the Asset Compute project:

  1. Open a command line in the Asset Compute project root (in VS Code this can be opened directly in the IDE via Terminal > New Terminal), and execute the command:

    code language-none
    $ aio app run
    
  2. The local Asset Compute Development Tool will open in your default Web browser at http://localhost:9000.

    aio app run

  3. Watch the command line output and Web browser for error messages as Development Tool initializes.

  4. To stop the Asset Compute Development Tool, tap Ctrl-C in the window that executed aio app run to terminate the process.

Troubleshooting

recommendation-more-help
4859a77c-7971-4ac9-8f5c-4260823c6f69