Deploy a stack component

Individually deploying different stack components.

If you have used ZenML before, you must be familiar with the flow of registering new stack components. It goes something like this:

zenml artifact-store register my_store --flavor=s3 --path=s3://my_bucket

Commands like these assume that you already have the stack component deployed. In this case, it would mean that you must already have a bucket called my_bucket on AWS S3 to be able to use this component.

We took inspiration from this design to build something that feels natural to use and is also sufficiently powerful to take care of the deployment of the respective stack components for you. This is where the <STACK_COMPONENT> deploy CLI comes in!

The deploy command allows you to deploy individual components of your MLOps stack with a single command 🚀. You can also customize your components easily by passing in flags (more on that later).

To install mlstacks, either run pip install mlstacks or pip install "zenml[mlstacks]" to install it along with ZenML.

MLStacks uses Terraform on the backend to manage infrastructure. You will need to have Terraform installed. Please visit the Terraform docs for installation instructions.

MLStacks also uses Helm to deploy Kubernetes resources. You will need to have Helm installed. Please visit the Helm docs for installation instructions.

For example, to deploy an artifact store on a GCP account, you can run:

# after installing mlstacks

zenml artifact-store deploy -f gcp -p gcp -r us-east1 -x project_id=zenml my_store

The command above takes in the following parameters:

Name: The name of the stack component. In this case, it is my_store.

Flavor: The flavor of the stack component to deploy. Here, we are deploying an artifact store with the gcp flavor.

Provider: The provider to deploy this stack component on. Currently, only GCP, AWS, and K3D are supported as providers.

Region: The region to deploy the stack component in.