1-click Deployment
Deploy a cloud stack from scratch with a single click
Last updated
Was this helpful?
Deploy a cloud stack from scratch with a single click
Last updated
Was this helpful?
In ZenML, the is a fundamental concept that represents the configuration of your infrastructure. In a normal workflow, creating a stack requires you to first deploy the necessary pieces of infrastructure and then define them as stack components in ZenML with proper authentication.
Especially in a remote setting, this process can be challenging and time-consuming, and it may create multi-faceted problems. This is why we implemented a feature that allows you to deploy the necessary pieces of infrastructure on your selected cloud provider and get you started on a remote stack with a single click.
The first thing that you need in order to use this feature is a deployed instance of ZenML (not a local server via zenml login --local
). If you do not already have it set up for you, feel free to learn how to do so .
Once you are connected to your deployed ZenML instance, you can use the 1-click deployment tool either through the dashboard or the CLI:
In order to create a remote stack over the dashboard, go to the stacks page on the dashboard and click "+ New Stack".
Since we will be deploying it from scratch, select "New Infrastructure" on the next page:
Here is an overview of the infrastructure that the 1-click deployment will prepare for you based on your cloud provider:
Resources
An S3 bucket that will be used as a ZenML Artifact Store.
An ECR container registry that will be used as a ZenML Container Registry.
A CloudBuild project that will be used as a ZenML Image Builder.
Permissions to use SageMaker as a ZenML Orchestrator and Step Operator.
An IAM user and IAM role with the minimum necessary permissions to access the resources listed above.
An AWS access key used to give access to ZenML to connect to the above resources through a ZenML service connector.
Permissions
The configured IAM service account and AWS access key will grant ZenML the following AWS permissions in your AWS account:
S3 Bucket:
s3:ListBucket
s3:GetObject
s3:PutObject
s3:DeleteObject
s3:GetBucketVersioning
s3:ListBucketVersions
s3:DeleteObjectVersion
ECR Repository:
ecr:DescribeRepositories
ecr:ListRepositories
ecr:DescribeRegistry
ecr:BatchGetImage
ecr:DescribeImages
ecr:BatchCheckLayerAvailability
ecr:GetDownloadUrlForLayer
ecr:InitiateLayerUpload
ecr:UploadLayerPart
ecr:CompleteLayerUpload
ecr:PutImage
ecr:GetAuthorizationToken
CloudBuild (Client):
codebuild:CreateProject
codebuild:BatchGetBuilds
CloudBuild (Service):
s3:GetObject
s3:GetObjectVersion
logs:CreateLogGroup
logs:CreateLogStream
logs:PutLogEvents
ecr:BatchGetImage
ecr:DescribeImages
ecr:BatchCheckLayerAvailability
ecr:GetDownloadUrlForLayer
ecr:InitiateLayerUpload
ecr:UploadLayerPart
ecr:CompleteLayerUpload
ecr:PutImage
ecr:GetAuthorizationToken
SageMaker (Client):
sagemaker:CreatePipeline
sagemaker:StartPipelineExecution
sagemaker:DescribePipeline
sagemaker:DescribePipelineExecution
SageMaker (Jobs):
AmazonSageMakerFullAccess
There you have it! With a single click, you just deployed a cloud stack, and you can start running your pipelines in a remote setting.
The Cloud Shell session will warn you that the ZenML GitHub repository is untrusted. We recommend that you review and then check the Trust repo
checkbox to proceed with the deployment, otherwise, the Cloud Shell session will not be authenticated to access your GCP projects. You will also get a chance to review the scripts that will be executed in the Cloud Shell session before proceeding.
The main.tf
file uses the zenml-io/zenml-stack/azure
module hosted on the Terraform registry to deploy the necessary resources for your Azure stack and then automatically registers the stack with your ZenML server. You can check out the module documentation .
The Cloud Shell session will warn you that the ZenML GitHub repository is untrusted. We recommend that you review and then check the Trust repo
checkbox to proceed with the deployment, otherwise the Cloud Shell session will not be authenticated to access your GCP projects. You will also get a chance to review the scripts that will be executed in the Cloud Shell session before proceeding.
If you choose azure
as your provider, the command will walk you through deploying . It will start by showing some information about the stack that will be created:
The Terraform file is a simple configuration that uses to deploy the necessary resources for your Azure stack and then automatically register the stack with your ZenML server. You can read more about the module and its configuration options in the module's documentation.