Asset Compute Development Tool
The Asset Compute Development Tool is a local web harness allowing developers to configure and execute Asset Computer workers locally, outside the context of the AEM SDK against the Asset Compute resources in Adobe I/O Runtime.
Run the Asset Compute Development Tool
The Asset Compute Development Tool can be run from the root of the Asset Compute project via the terminal command:
$ aio app run
This will start the Development Tool at http://localhost:9000, and automatically open it in a browser window. For the Development Tool to run, a valid, auto-generated devToolToken must be provided via a query parameter.
Understand the Asset Compute Development Tools interface interface
-
Source file: The source file selection is used to:
- Selected the asset binary that acts as the
source
binary passed to the Asset Compute worker - Upload source files
- Selected the asset binary that acts as the
-
Asset Compute profile(s) definition: Defines the Asset Compute worker to run including parameters: including the worker’s URL end-point, the resultant rendition name, and any parameters
-
Run: The Run button executes the Asset Compute profile as defined in the Asset Compute configuration profile editor
-
Abort: The Abort button cancels an execution initiated from tapping the Run button
-
Request/Response: Provides the HTTP request and response to/from the Asset Compute worker running in Adobe I/O Runtime. This can be helpful for debugging
-
Activation Logs: The logs describing the Asset Compute worker’s execution, along with any errors. This information is also available in the
aio app run
standard out -
Renditions: Displays all renditions generated by the execution of th Asset Compute worker
-
devToolToken query parameter: The Asset Compute Development Tool token requires a valid
devToolToken
query parameter to be present. This token is automatically generated every time a new Development Tool is spawned
Run a custom worker
Click-through of running an Asset Compute work in Development Tool (No audio)
-
Ensure Asset Compute Development Tool is started from your project root using the
aio app run
command. -
In the Asset Compute Development Tool, upload or select a sample image file
- Ensure the file is selected in the Source file dropdown
-
Review the Asset Compute profile definition text area
-
The
worker
key defines the URL to the deployed Asset Compute worker -
The
name
key defines the name of the rendition to generate -
Other key/values can be provided in this JSON object, and are available in the worker under the
rendition.instructions
object-
Optionally add values for
size
,contrast
andbrightness
:code language-json { "renditions": [ { "worker": "...", "name": "rendition.png", "size":"800", "contrast": "0.30", "brightness": "-0.15" } ] }
-
-
-
Tap the Run button
-
The Renditions section will populate with a rendition place holder
-
Once the worker completes, the rendition placeholder will display the generated rendition
Making code changes to the worker code while Development Tool is running will “hot deploy” the changes. The “hot deploy” takes several seconds, so allow the deploy to complete before re-running the worker from Development Tool.