Contribute flavors or components
Creating your custom stack component solutions.
Before you can start contributing, it is important to know that the stack component deploy CLI also makes use of the stack recipes (specifically, the modular stack recipes) in the background. Thus, contributing a new deployment option for both the deployment methods that we have seen, involves making a contribution to the base recipe.
- Every file inside the modular recipes represents a tool and all code pertaining to the deployment of it resides there. Create a new file with a name that reflects what would be deployed.
- Populate this file with all the terraform code that is relevant to the component. Make sure any dependencies are also included in the same file.
- Add any local values that you might need here to the
- If you want to enable users to set any configuration parameters through the CLI, add those variables to the
variables.tffile. You can take a look at existing variables like
mlflow_bucketto get an idea of how to do this.
- Now, add a variable that allows the user to enable this service, to the
variables.tffile. The format for the name is
- You also need to populate the
outputs.tffile with information that a stack component registration for your new component might need. This is used by the stack component deploy CLI.
- Add a block to the
output_file.tffile that corresponds to your component. This is the file that gets generated on a successful
stack deployevent and can be imported as a ZenML stack.
- Finally, contribute a PR back to
Once merged, this should allow other people to use your new component while deploying through the
zenml stack deployflow. To enable integration with the stack component deploy CLI, you need to also contribute to the
To enable the stack component deploy CLI to work with your new component, you need to add a new flag to the
mlstacksside, this will also require an update to the validation logic inside the
mlstacksrepository, starting with updating enums and constants in the base of the