Skip to content

Commit

Permalink
Add support for public-ip-address in dataproc (#346)
Browse files Browse the repository at this point in the history
* Add support for public-ip-address in dataproc

* Use the same code style as previous code

---------

Co-authored-by: Michael Franklin <[email protected]>
  • Loading branch information
illusional and illusional authored Aug 5, 2024
1 parent b3e6ad8 commit 7f79844
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hail/python/hailtop/hailctl/dataproc/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ def start(
debug_mode: Ann[
bool, Opt(help='Enable debug features on created cluster (heap dump on out-of-memory error)')
] = False,
public_ip_address: Ann[
bool, Opt(help='Allow nodes to have a public IP address, and hence make requests on the public internet (default is internal-only from dataproc 2.2).')
] = False,
):
"""
Start a Dataproc cluster configured for Hail.
Expand Down Expand Up @@ -243,6 +246,7 @@ def start(
requester_pays_allow_annotation_db,
debug_mode,
use_gcloud_beta,
public_ip_address,
)


Expand Down
3 changes: 3 additions & 0 deletions hail/python/hailtop/hailctl/dataproc/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def start(
requester_pays_allow_annotation_db: bool,
debug_mode: bool,
beta: bool,
public_ip_address: bool,
):
conf = ClusterConfig()
conf.extend_flag('image-version', IMAGE_VERSION)
Expand Down Expand Up @@ -395,6 +396,8 @@ def jvm_heap_size_gib(machine_type: str, memory_fraction: float) -> int:
cmd.append('--expiration_time={}'.format(expiration_time))
if service_account:
cmd.append('--service-account={}'.format(service_account))
if public_ip_address:
cmd.append('--public-ip-address')

cmd.extend(pass_through_args)

Expand Down

0 comments on commit 7f79844

Please sign in to comment.