Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lakeFS data lake recipe for GCP & k3d #1

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from

Conversation

AdrianoKF
Copy link

@AdrianoKF AdrianoKF commented Feb 6, 2024

Describe changes

This PR adds support for the lakeFS data lake to MLStacks. It adds a new high-level component type data_lake with lakefs as its only flavor.

Everything is up for debate and discussion at this point, I just wanted to put together an end-to-end example to have a starting point for the review.

Note

This design choice is up for discussion. Data lakes are conceptually not covered in the current component types and don't really fit anywhere else (like artifact stores).

Defining a new component type would also impact the ZenML side of things, which hasn't been considered yet.

Feedback in the review is highly appreciated! 🙏🏻

At this point, deployment on a local k3d cluster with MinIO as the storage backend and Google Cloud Platform (with GCS for data storage and Cloud SQL with private VPC connectivity as the database backend) are supported.

The lakeFS instance is exposed via a Kubernetes ingress, initial admin credentials are provisioned automatically on k3d clusters, and all user-relevant options are exposed through the stack output (under the data_lake_configuration key).

Open questions/issues

Example stack definitions

Below are the stacks used during development/testing:

GCP:

# my-stack.yaml
spec_version: 1
spec_type: stack
name: "quickstart_stack"
provider: gcp
default_region: "europe-west3"
default_tags:
  deployed-by: "mlstacks"
components:
  - my-stack-lakefs.yaml
---
# my-stack-lakefs.yaml
spec_version: 1
spec_type: component
component_type: "data_lake"
component_flavor: "lakefs"
name: "quickstart_lakefs"
provider: gcp
metadata:
  config:
    project_id: "mlstacks-sandbox-1"
  tags:
    deployed-by: "mlstacks"

k3d local:

# my-stack.yaml
spec_version: 1
spec_type: stack
name: "quickstart_stack"
provider: k3d
default_tags:
  deployed-by: "mlstacks"
components:
  - my-stack-minio.yaml
  - my-stack-lakefs.yaml
---
# my-stack-lakefs.yaml
spec_version: 1
spec_type: component
component_type: "data_lake"
component_flavor: "lakefs"
name: "quickstart_lakefs"
provider: k3d
metadata:
  tags:
    deployed-by: "mlstacks"
---
# my-stack-minio.yaml
spec_version: 1
spec_type: component
component_type: "artifact_store"
component_flavor: "minio"
name: "quickstart_minio_bucket"
provider: k3d
metadata:
  tags:
    deployed-by: "mlstacks"

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.
  • I have added tests to cover my changes.
  • I have based my new branch on develop and the open PR is targeting
    develop. If your branch wasn't based on develop read
    Contribution guide on rebasing branch to develop.

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)

AdrianoKF and others added 15 commits January 12, 2024 13:28
The kubectl provider seems to be abandoned and has problems with
more recent versions of cloud k8s clusters, see for example:
gavinbunney/terraform-provider-kubectl#270
This solves the problem of having to guard all subresources
required for lakeFS based on the configuration of the GCP module.
In some cases, it might be desirable to have subfolders
inside a Terraform recipe folder (e.g., for local modules).

The current implementation ignored these, breaking the
initialization of the copied Terraform modules due to
missing files.

This commit changes the logic in terraform_utils.py to
copy any subfolders (not starting with a leading dot,
like `.terraform`) of a Terraform module to the destination.
@AdrianoKF AdrianoKF changed the title Data lake lakefs Add lakeFS data lake recipe for GCP & k3d Mar 28, 2024
@AdrianoKF AdrianoKF marked this pull request as ready for review March 28, 2024 10:54
kubernetes_namespace.k8s-workloads,
]
}
# TODO: Find out why this is failing
Copy link
Author

Choose a reason for hiding this comment

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

Needs addressing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant