-
Notifications
You must be signed in to change notification settings - Fork 241
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
MLCOMPUTE-967 | changes for Spark drivers on k8s #3679
Conversation
CaptainSame
commented
Aug 17, 2023
•
edited
Loading
edited
- Add newly created iam role to system paasta configs
- Add methods to fetch the iam role
- Use the iam role for creating the service account to start the Spark drivers with
- Mount kubeconfig file to Spark driver pods
- Point to the mounted kubeconfig using env variable
- consolidate tron_tools, spark_run and service_configuration_lib methods
paasta_tools/tron_tools.py
Outdated
namespace=EXECUTOR_TYPE_TO_NAMESPACE[executor], | ||
k8s_role=_spark_k8s_role(), | ||
# k8s_role=_spark_k8s_role(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Point env variable to KUBECONFIG = /etc/kubernetes/spark.conf (being used in adhoc mode)
- Puppet kubeconfig to k8s agents to be available in pods
- Mount KUBECONFIG to pods (extra volumes)
- command: env include unset env variables for unsetting the env variables set by /etc/boto_cfg
e.g. --unset=AWS_ACCESS_KEY_ID --unset=AWS_SECRET_ACCESS_KEY
Can you add description, testing, any impact on existing infra, rollout and rollback plan if needed? |
…E-967_spark_drivers_on_k8s
…E-967_spark_drivers_on_k8s
…E-967_spark_drivers_on_k8s
paasta_tools/tron_tools.py
Outdated
if "extra_volumes" in result: | ||
result["extra_volumes"] = result["extra_volumes"] + format_volumes(action_config.get_extra_volumes()) | ||
else: | ||
result["extra_volumes"] = format_volumes(action_config.get_extra_volumes()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are your thoughts on having TronActionConfig
provide an override for get_extra_volumes()
and doing the same if self.get_executor() == "spark":
trick we do elsewhere to transparently add this mount? that we we can avoid doing the merge here which (without additional comments) could potentially confuse future yelpers reading this code
…E-967_spark_drivers_on_k8s
…E-967_spark_drivers_on_k8s
…E-967_spark_drivers_on_k8s
…E-967_spark_drivers_on_k8s
…E-967_spark_drivers_on_k8s
…E-967_spark_drivers_on_k8s
…E-967_spark_drivers_on_k8s
…E-967_spark_drivers_on_k8s
…E-967_spark_drivers_on_k8s
e266651
to
88c5320
Compare
…om/Yelp/paasta into MLCOMPUTE-967_spark_drivers_on_k8s
…E-967_spark_drivers_on_k8s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes lgtm once mypy tests pass.
Once someone from compute-infra reviews, should be good to go.
"pool", load_system_paasta_config().get_tron_default_pool_override() | ||
) | ||
if not self.get_executor() == "spark" | ||
else spark_tools.SPARK_DRIVER_POOL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi: we'll probably need to make this configurable in soaconfigs in the near future to allow for gpu drivers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once eman has also shipped, we can pair to pin paasta and release this :)
(might also be good to draft some comms for spark users at yelp in case they notice anything weird)
realized_cluster = ( | ||
load_system_paasta_config().get_eks_cluster_aliases().get(cluster, cluster) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i look forward to the day this is no longer necessary :)