Stack Deployments
zenml.stack_deployments
ZenML Stack Deployments.
Modules
aws_stack_deployment
Functionality to deploy a ZenML stack to AWS.
Classes
AWSZenMLCloudStackDeployment
Bases: ZenMLCloudStackDeployment
AWS ZenML Cloud Stack Deployment.
description() -> str
classmethod
Return a description of the ZenML Cloud Stack Deployment.
This will be displayed when the user is prompted to deploy the ZenML stack.
Returns:
Type | Description |
---|---|
str
|
A MarkDown description of the ZenML Cloud Stack Deployment. |
Source code in src/zenml/stack_deployments/aws_stack_deployment.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
|
get_deployment_config() -> StackDeploymentConfig
Return the configuration to deploy the ZenML stack to the specified cloud provider.
The configuration should include:
- a cloud provider console URL where the user will be redirected to deploy the ZenML stack. The URL should include as many pre-filled URL query parameters as possible.
- a textual description of the URL
- a Terraform script used to deploy the ZenML stack
- some deployment providers may require additional configuration parameters or scripts to be passed to the cloud provider in addition to the deployment URL query parameters. Where that is the case, this method should also return a string that the user can copy and paste into the cloud provider console to deploy the ZenML stack (e.g. a set of environment variables, YAML configuration snippet, bash or Terraform script etc.).
Returns:
Type | Description |
---|---|
StackDeploymentConfig
|
The configuration or script to deploy the ZenML stack to the |
StackDeploymentConfig
|
specified cloud provider. |
Source code in src/zenml/stack_deployments/aws_stack_deployment.py
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
|
instructions() -> str
classmethod
Return instructions on how to deploy the ZenML stack to the specified cloud provider.
This will be displayed before the user is prompted to deploy the ZenML stack.
Returns:
Type | Description |
---|---|
str
|
MarkDown instructions on how to deploy the ZenML stack to the |
str
|
specified cloud provider. |
Source code in src/zenml/stack_deployments/aws_stack_deployment.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
|
integrations() -> List[str]
classmethod
Return the ZenML integrations required for the stack.
Returns:
Type | Description |
---|---|
List[str]
|
The list of ZenML integrations that need to be installed for the |
List[str]
|
stack to be usable. |
Source code in src/zenml/stack_deployments/aws_stack_deployment.py
121 122 123 124 125 126 127 128 129 130 131 132 |
|
locations() -> Dict[str, str]
classmethod
Return the locations where the ZenML stack can be deployed.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
The regions where the ZenML stack can be deployed as a map of region |
Dict[str, str]
|
names to region descriptions. |
Source code in src/zenml/stack_deployments/aws_stack_deployment.py
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
|
permissions() -> Dict[str, List[str]]
classmethod
Return the permissions granted to ZenML to access the cloud resources.
Returns:
Type | Description |
---|---|
Dict[str, List[str]]
|
The permissions granted to ZenML to access the cloud resources, as |
Dict[str, List[str]]
|
a dictionary grouping permissions by resource. |
Source code in src/zenml/stack_deployments/aws_stack_deployment.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
|
post_deploy_instructions() -> str
classmethod
Return instructions on what to do after the deployment is complete.
This will be displayed after the deployment is complete.
Returns:
Type | Description |
---|---|
str
|
MarkDown instructions on what to do after the deployment is |
str
|
complete. |
Source code in src/zenml/stack_deployments/aws_stack_deployment.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
|
Functions
azure_stack_deployment
Functionality to deploy a ZenML stack to Azure.
Classes
AZUREZenMLCloudStackDeployment
Bases: ZenMLCloudStackDeployment
Azure ZenML Cloud Stack Deployment.
description() -> str
classmethod
Return a description of the ZenML Cloud Stack Deployment.
This will be displayed when the user is prompted to deploy the ZenML stack.
Returns:
Type | Description |
---|---|
str
|
A MarkDown description of the ZenML Cloud Stack Deployment. |
Source code in src/zenml/stack_deployments/azure_stack_deployment.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|
get_deployment_config() -> StackDeploymentConfig
Return the configuration to deploy the ZenML stack to the specified cloud provider.
The configuration should include:
- a cloud provider console URL where the user will be redirected to deploy the ZenML stack. The URL should include as many pre-filled URL query parameters as possible.
- a textual description of the URL
- some deployment providers may require additional configuration parameters or scripts to be passed to the cloud provider in addition to the deployment URL query parameters. Where that is the case, this method should also return a string that the user can copy and paste into the cloud provider console to deploy the ZenML stack (e.g. a set of environment variables, YAML configuration snippet, bash or Terraform script etc.).
Returns:
Type | Description |
---|---|
StackDeploymentConfig
|
The configuration or script to deploy the ZenML stack to the |
StackDeploymentConfig
|
specified cloud provider. |
Source code in src/zenml/stack_deployments/azure_stack_deployment.py
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
|
instructions() -> str
classmethod
Return instructions on how to deploy the ZenML stack to the specified cloud provider.
This will be displayed before the user is prompted to deploy the ZenML stack.
Returns:
Type | Description |
---|---|
str
|
MarkDown instructions on how to deploy the ZenML stack to the |
str
|
specified cloud provider. |
Source code in src/zenml/stack_deployments/azure_stack_deployment.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
|
integrations() -> List[str]
classmethod
Return the ZenML integrations required for the stack.
Returns:
Type | Description |
---|---|
List[str]
|
The list of ZenML integrations that need to be installed for the |
List[str]
|
stack to be usable. |
Source code in src/zenml/stack_deployments/azure_stack_deployment.py
120 121 122 123 124 125 126 127 128 |
|
locations() -> Dict[str, str]
classmethod
Return the locations where the ZenML stack can be deployed.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
The regions where the ZenML stack can be deployed as a map of region |
Dict[str, str]
|
names to region descriptions. |
Source code in src/zenml/stack_deployments/azure_stack_deployment.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
|
permissions() -> Dict[str, List[str]]
classmethod
Return the permissions granted to ZenML to access the cloud resources.
Returns:
Type | Description |
---|---|
Dict[str, List[str]]
|
The permissions granted to ZenML to access the cloud resources, as |
Dict[str, List[str]]
|
a dictionary grouping permissions by resource. |
Source code in src/zenml/stack_deployments/azure_stack_deployment.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
|
post_deploy_instructions() -> str
classmethod
Return instructions on what to do after the deployment is complete.
This will be displayed after the deployment is complete.
Returns:
Type | Description |
---|---|
str
|
MarkDown instructions on what to do after the deployment is |
str
|
complete. |
Source code in src/zenml/stack_deployments/azure_stack_deployment.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
|
skypilot_default_regions() -> Dict[str, str]
classmethod
Returns the regions supported by default for the Skypilot.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
The regions supported by default for the Skypilot. |
Source code in src/zenml/stack_deployments/azure_stack_deployment.py
229 230 231 232 233 234 235 236 237 238 239 240 241 |
|
constants
Constants for the stack deployments.
gcp_stack_deployment
Functionality to deploy a ZenML stack to GCP.
Classes
GCPZenMLCloudStackDeployment
Bases: ZenMLCloudStackDeployment
GCP ZenML Cloud Stack Deployment.
description() -> str
classmethod
Return a description of the ZenML Cloud Stack Deployment.
This will be displayed when the user is prompted to deploy the ZenML stack.
Returns:
Type | Description |
---|---|
str
|
A MarkDown description of the ZenML Cloud Stack Deployment. |
Source code in src/zenml/stack_deployments/gcp_stack_deployment.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
|
get_deployment_config() -> StackDeploymentConfig
Return the configuration to deploy the ZenML stack to the specified cloud provider.
The configuration should include:
- a cloud provider console URL where the user will be redirected to deploy the ZenML stack. The URL should include as many pre-filled URL query parameters as possible.
- a textual description of the URL
- some deployment providers may require additional configuration parameters or scripts to be passed to the cloud provider in addition to the deployment URL query parameters. Where that is the case, this method should also return a string that the user can copy and paste into the cloud provider console to deploy the ZenML stack (e.g. a set of environment variables, YAML configuration snippet, bash or Terraform script etc.).
Returns:
Type | Description |
---|---|
StackDeploymentConfig
|
The configuration or script to deploy the ZenML stack to the |
StackDeploymentConfig
|
specified cloud provider. |
Source code in src/zenml/stack_deployments/gcp_stack_deployment.py
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
|
instructions() -> str
classmethod
Return instructions on how to deploy the ZenML stack to the specified cloud provider.
This will be displayed before the user is prompted to deploy the ZenML stack.
Returns:
Type | Description |
---|---|
str
|
MarkDown instructions on how to deploy the ZenML stack to the |
str
|
specified cloud provider. |
Source code in src/zenml/stack_deployments/gcp_stack_deployment.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
|
integrations() -> List[str]
classmethod
Return the ZenML integrations required for the stack.
Returns:
Type | Description |
---|---|
List[str]
|
The list of ZenML integrations that need to be installed for the |
List[str]
|
stack to be usable. |
Source code in src/zenml/stack_deployments/gcp_stack_deployment.py
127 128 129 130 131 132 133 134 135 136 137 |
|
locations() -> Dict[str, str]
classmethod
Return the locations where the ZenML stack can be deployed.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
The regions where the ZenML stack can be deployed as a map of region |
Dict[str, str]
|
names to region descriptions. |
Source code in src/zenml/stack_deployments/gcp_stack_deployment.py
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
|
permissions() -> Dict[str, List[str]]
classmethod
Return the permissions granted to ZenML to access the cloud resources.
Returns:
Type | Description |
---|---|
Dict[str, List[str]]
|
The permissions granted to ZenML to access the cloud resources, as |
Dict[str, List[str]]
|
a dictionary grouping permissions by resource. |
Source code in src/zenml/stack_deployments/gcp_stack_deployment.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
|
post_deploy_instructions() -> str
classmethod
Return instructions on what to do after the deployment is complete.
This will be displayed after the deployment is complete.
Returns:
Type | Description |
---|---|
str
|
MarkDown instructions on what to do after the deployment is |
str
|
complete. |
Source code in src/zenml/stack_deployments/gcp_stack_deployment.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
|
skypilot_default_regions() -> Dict[str, str]
classmethod
Returns the regions supported by default for the Skypilot.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
The regions supported by default for the Skypilot. |
Source code in src/zenml/stack_deployments/gcp_stack_deployment.py
220 221 222 223 224 225 226 227 228 |
|
stack_deployment
Functionality to deploy a ZenML stack to a cloud provider.
Classes
ZenMLCloudStackDeployment
Bases: BaseModel
ZenML Cloud Stack CLI Deployment base class.
deployment_type: str
property
Return the type of deployment.
Returns:
Type | Description |
---|---|
str
|
The type of deployment. |
description() -> str
abstractmethod
classmethod
Return a description of the ZenML Cloud Stack Deployment.
This will be displayed when the user is prompted to deploy the ZenML stack.
Returns:
Type | Description |
---|---|
str
|
A MarkDown description of the ZenML Cloud Stack Deployment. |
Source code in src/zenml/stack_deployments/stack_deployment.py
45 46 47 48 49 50 51 52 53 54 55 |
|
get_deployment_config() -> StackDeploymentConfig
abstractmethod
Return the configuration to deploy the ZenML stack to the specified cloud provider.
The configuration should include:
- a cloud provider console URL where the user will be redirected to deploy the ZenML stack. The URL should include as many pre-filled URL query parameters as possible.
- a textual description of the URL
- some deployment providers may require additional configuration parameters or scripts to be passed to the cloud provider in addition to the deployment URL query parameters. Where that is the case, this method should also return a string that the user can copy and paste into the cloud provider console to deploy the ZenML stack (e.g. a set of environment variables, YAML configuration snippet, bash or Terraform script etc.).
Returns:
Type | Description |
---|---|
StackDeploymentConfig
|
The configuration or script to deploy the ZenML stack to the |
StackDeploymentConfig
|
specified cloud provider. |
Source code in src/zenml/stack_deployments/stack_deployment.py
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|
get_deployment_info() -> StackDeploymentInfo
classmethod
Return information about the ZenML Cloud Stack Deployment.
Returns:
Type | Description |
---|---|
StackDeploymentInfo
|
Information about the ZenML Cloud Stack Deployment. |
Source code in src/zenml/stack_deployments/stack_deployment.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
|
get_stack(date_start: Optional[datetime.datetime] = None) -> Optional[DeployedStack]
Return the ZenML stack that was deployed and registered.
This method is called to retrieve a ZenML stack matching the deployment provider.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
date_start
|
Optional[datetime]
|
The date when the deployment started. |
None
|
Returns:
Type | Description |
---|---|
Optional[DeployedStack]
|
The ZenML stack that was deployed and registered or None if a |
Optional[DeployedStack]
|
matching stack was not found. |
Source code in src/zenml/stack_deployments/stack_deployment.py
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
|
instructions() -> str
abstractmethod
classmethod
Return instructions on how to deploy the ZenML stack to the specified cloud provider.
This will be displayed before the user is prompted to deploy the ZenML stack.
Returns:
Type | Description |
---|---|
str
|
MarkDown instructions on how to deploy the ZenML stack to the |
str
|
specified cloud provider. |
Source code in src/zenml/stack_deployments/stack_deployment.py
57 58 59 60 61 62 63 64 65 66 67 68 |
|
integrations() -> List[str]
abstractmethod
classmethod
Return the ZenML integrations required for the stack.
Returns:
Type | Description |
---|---|
List[str]
|
The list of ZenML integrations that need to be installed for the |
List[str]
|
stack to be usable. |
Source code in src/zenml/stack_deployments/stack_deployment.py
82 83 84 85 86 87 88 89 90 |
|
locations() -> Dict[str, str]
abstractmethod
classmethod
Return the locations where the ZenML stack can be deployed.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
The regions where the ZenML stack can be deployed as a map of region |
Dict[str, str]
|
names to region descriptions. |
Source code in src/zenml/stack_deployments/stack_deployment.py
102 103 104 105 106 107 108 109 110 |
|
permissions() -> Dict[str, List[str]]
abstractmethod
classmethod
Return the permissions granted to ZenML to access the cloud resources.
Returns:
Type | Description |
---|---|
Dict[str, List[str]]
|
The permissions granted to ZenML to access the cloud resources, as |
Dict[str, List[str]]
|
a dictionary grouping permissions by resource. |
Source code in src/zenml/stack_deployments/stack_deployment.py
92 93 94 95 96 97 98 99 100 |
|
post_deploy_instructions() -> str
abstractmethod
classmethod
Return instructions on what to do after the deployment is complete.
This will be displayed after the deployment is complete.
Returns:
Type | Description |
---|---|
str
|
MarkDown instructions on what to do after the deployment is |
str
|
complete. |
Source code in src/zenml/stack_deployments/stack_deployment.py
70 71 72 73 74 75 76 77 78 79 80 |
|
skypilot_default_regions() -> Dict[str, str]
classmethod
Returns the regions supported by default for the Skypilot.
Returns:
Type | Description |
---|---|
Dict[str, str]
|
The regions supported by default for the Skypilot. |
Source code in src/zenml/stack_deployments/stack_deployment.py
123 124 125 126 127 128 129 130 |
|
Functions
utils
Functionality to deploy a ZenML stack to a cloud provider.
Classes
Functions
get_stack_deployment_class(provider: StackDeploymentProvider) -> Type[ZenMLCloudStackDeployment]
Get the ZenML Cloud Stack Deployment class for the specified provider.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
provider
|
StackDeploymentProvider
|
The stack deployment provider. |
required |
Returns:
Type | Description |
---|---|
Type[ZenMLCloudStackDeployment]
|
The ZenML Cloud Stack Deployment class for the specified provider. |
Source code in src/zenml/stack_deployments/utils.py
37 38 39 40 41 42 43 44 45 46 47 48 |
|