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

feat(data-pipelines): Allow for starting Dataproc clusters using custom OS images #1577

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nadeaujoshua
Copy link
Contributor

This PR adds some helper functions within the ./deployctl dataproc-cluster start ... command to facilitate the creation of Dataproc clusters using a custom OS image.

The primary advantage of using pre-built images is that they'll provide a standard, consistent environment to start data pipelines with, using the correct/validated configs, dependencies, and versioning so that the user does not have to manage these factors themselves. The Dataproc start cluster time has also been cut down a few minutes.

These helpers are needed because deployctl's start command uses hailctl, which would run redundant commands that have already been executed in the custom OS image.

To provide a transition period for our workflows, the dataproc-cluster start ... command has been updated to make this opt-in; the user must specify the --image flag with the custom image name they'd like to use. The inclusion of this flag is what triggers running the helper function to start the cluster. If it is not used, as was the case before this update, the original deployctl code will be run for now.

This PR also removes poetry from the data-pipeline directory, as we will revert to managing dependencies using the requirements.txt file located there.

Resolves https://github.com/broadinstitute/gnomad-browser-team/issues/64.

Copy link
Contributor

@rileyhgrant rileyhgrant left a comment

Choose a reason for hiding this comment

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

lgtm!

Apologies for letting this hang for such an atrociously long time, I was just looking at my requested reviews in GitHub and noticed this 😬

Looks good to me, nicely done! I just had two minor mostly for-my-curiousity comments on this.

cluster_args_dict = _parse_flags(cluster_args)
if "image" in cluster_args_dict:
return start_custom_image_cluster(name, cluster_args_dict)
# TODO: Add "else" block to confirm with user to use legacy hailctl initialization
Copy link
Contributor

Choose a reason for hiding this comment

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

Just noting a TODO: left here, wasn't sure if you meant to get back to this before merging this PR.

@@ -58,6 +58,11 @@ The ClinVar pipelines must be run on clusters with an appropriate version of VEP
./deployctl dataproc-cluster start <cluster-name>
```

NOTE: Starting with `gnomad version 4.1`, it is highly recommended to specify a
custom OS image that was built for that gnomAD version. To see these images, run
`gcloud compute images list --filter="family=dataproc-custom-image"`. You can then
Copy link
Contributor

Choose a reason for hiding this comment

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

Running this tells me 0 images were found:

❯ gcloud compute images list --filter="family=dataproc-custom-image"
Listed 0 items.

My gcloud config's project is set to exac-gnomad, maybe that's the reason?

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.

2 participants