Skip to content

Conversation

@wjayesh
Copy link
Contributor

@wjayesh wjayesh commented Jul 28, 2022

Describe changes

Stack Recipes CLI commands

This PR introduces the zenml stack recipe CLI commands that allow the following functionalities.

  • zenml stack recipe list: List all available stack recipes.
  • zenml stack recipe pull <recipe-name>: Pull a recipe to your local filesystem.
  • zenml stack recipe deploy <recipe-name>: Deploy a specific stack recipe and auto-import the resources created, as a ZenML stack.
  • zenml stack recipe destroy <recipe-name>: Destroy all resources created by a recipe.
  • zenml stack recipe clean: Deletes the pulled recipes from the local filesystem.

Extensive error messages are put in place to guide users if the commands fail. This has been done keeping in mind that the feature would be in alpha, and things could break unexpectedly.

Terraform wrapper

A Terraform class is implemented as a wrapper around the terraform CLI. It adds the following features:

  • Check if the user has terraform installed. Raise an exception and point them to the installation page if they don't have it.
  • Implement an apply command that performs a terraform init and then terraform apply on the recipe. The init is only performed once to save time.
  • A destroy command that performs a simple terraform destroy but can potentially include a --force parameter in the future to force deletion of resources. Keeping it out for now, in the absence of tests, to avoid unintended consequences.
  • Option to set log level for the terraform command executions.

Features yet to be added:

  • Ability to run these commands in the background using the ZenML service concept.
  • Check user credentials to verify if they have permission to execute the recipe.

Minor changes

  • While importing a stack, there's now an option to force-import a YAML configuration with a different version than the current ZenML version.

Pre-requisites

Please ensure you have done the following:

  • I have read the CONTRIBUTING.md document.
  • If my change requires a change to docs, I have updated the documentation accordingly.
  • If I have added an integration, I have updated the integrations table and the corresponding website section.
  • I have added tests to cover my changes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (add details above)

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@wjayesh wjayesh changed the base branch from main to develop July 28, 2022 09:29
@github-actions github-actions bot added the internal To filter out internal PRs and issues label Jul 28, 2022
@wjayesh wjayesh requested a review from htahir1 July 28, 2022 13:53
@wjayesh wjayesh removed the request for review from htahir1 August 2, 2022 09:26
Copy link
Contributor

@AlexejPenner AlexejPenner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautifully done, love all the usability goodies and clear error/warning messages 🔥

@wjayesh wjayesh merged commit d94963c into develop Aug 17, 2022
@wjayesh wjayesh deleted the misc/add-mlops-stacks branch August 17, 2022 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal To filter out internal PRs and issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants