0

When I create my hadoop and spark cluster via bdutil, I would like to set the flags for Allow HTTP and HTTPS flags. I see that when you create VM using GC utill you set the tags. I tried playing around with bdutil to do the same with out any success :( Does anyone have any suggestions??

Thanks, Ami

2 Answers2

0

One workaround I can think of is that you can create a new network and than create a GCE firewall rule to allows port 80 and port 443 for all the instances without using any tags. Create your new GCE instances with bdutil on this new network. You can use a bdutil flag --network which will specify a network name with which to associate new virtual machines. You can find more information on the bdutil flags on this link.

Faizan
  • 1,937
  • 13
  • 18
0

The bdutil script does not handle parameters in order to tag the VM during their creation. Nevertheless you could try to modify the following section of the script:

run_gcutil_cmd \

  addinstance \

  --machine_type=${GCE_MACHINE_TYPE} \

  --service_account=default \

  --image=${GCE_IMAGE} \

  --network=${GCE_NETWORK} \

  --service_account_scopes=${GCE_SERVICE_ACCOUNT_SCOPES} \

  --persistent_boot_disk \

  --external_ip_address=ephemeral \

  ${optional_disk_arg} ${MASTER_HOSTNAME} &

await_async_jobs 'addinstance'

You would have to use the gcloud command which replaces gcutil and is able to tag the instances as well as using the other parameters (i.e zone, machine type, image, etc). You can refer to https://cloud.google.com/compute/docs/instances#tags.

Carlos
  • 16
  • 2