Onboard Stepfunction as a component
This article details out the process of using stepfunction as a component within your service.
Stepfunction is a managed service provided by AWS and is limited to the boundary of AWS itself. Odin supports stepfucntion as a component. However, to use the same within your service, Odin expects a certain standard.
Jfrog Artifact Structure
In case of stepfucntion, odin expects that the artifact pushed in the Jfrog artifactory is provided in a specific structure. The structure is as follow:
Stepfunction is a resource in AWS and to create the same, Odin uses Serverless that expects a particular configuration file to be in place for creating stepfunction as a resource (in the above example, main.yaml). That configuration file should be written in such a way that Serverless can provision the resource. Along with the config file, if the user is using any additional file or folder to customise the resource, the same can be put in the folder within the zip file (in this case StepFn).
Define Stepfunction as a component in Service Definition
While adding the stepfucntion as a component in the service definition, along with general details like component type, name, and version, Odin expect the following configuration details to be added. Please note that it is mandatory to include artifact name and version as part of config details for Stepfunction for the resource to be created.
Please note that in the above format, file name is not a mandatory field. By default, Odin would look for a file name called main.yml. However, user can use a different file name than this. In that case the file name needs to be mentioned in the config section for stepfucntion component.
Define Provisioning file to use Stepfunction as a component
The provisioning details for the stepfunction should be provided along with the component name and deployment type. Please note that Stepfunction being a managed service by AWS, the deployment type will always be 'aws_stepfunction'.
For stepfunction, the configuration file complying with serverless is same across the environment. However, the user can customise the requirements based on the environment within the configuration file and the environment details can be passed to Odin using the provisioning file with the help of the parameter 'extra_env'. E.g: there might be difference in the provisioning requirement for stepfunction in prod environment and stage environment. The specific requirements can be mentioned within the configuration file [in this case, main.yml] while pushing the artifact.
The user has to specify the environment specific details in the config file created for serverless using placeholders for the extra environments. A sample structure for an artifact for a service which is using stepfunction and has custom configs for stage and load environment would be as follow:
Last updated