After you create an executable service, you can run it to execute your script or application. You can also pass runtime arguments to customize each execution.
Prerequisites
- An executable service must be created
- The executable object referenced by the service must exist
- The repository must be accessible
Run an executable service
Use the iagctl run service executable command to execute an executable service.
Syntax:
iagctl run service executable <service-name>
Example:
iagctl run service executable simple-executable
This command executes the service using the configuration you defined when you created it.
Run an executable service with arguments
You can pass runtime arguments to your script when you run the service. IAG formats these arguments according to the --arg-format you specified when you created the service.
Syntax:
iagctl run service executable <service-name> \
--set key1=value1 \
--set key2=value2
Example:
iagctl run service executable simple-executable \
--set environment=production \
--set region=us-east
If you configured the service with --arg-format "{{.Key}} {{.Value}}", IAG passes these arguments to your script as:
environment production region us-east
If you configured the service with --arg-format "{{.Key}}={{.Value}}", IAG passes these arguments to your script as:
environment=production region=us-east