@@ -55,7 +55,6 @@ parser.add_argument('--data-disk', action='store_true',
5555 help = 'optional, attaches a data disk to each VM' )
5656parser .add_argument ('--nohttps' , action = 'store_true' ,
5757 help = 'optional, disables the creation of the https load balanced endpoint' )
58-
5958cloud_init_template = """#cloud-config
6059
6160coreos:
@@ -134,8 +133,8 @@ def linux_config(hostname, args):
134133 system .disable_ssh_password_authentication = True
135134 return system
136135
137- def endpoint_config (name , port , probe = False ):
138- endpoint = ConfigurationSetInputEndpoint (name , 'tcp' , port , port , name )
136+ def lb_endpoint_config (name , port , probe = False , idle_timeout_minutes = 4 ):
137+ endpoint = ConfigurationSetInputEndpoint (name , 'tcp' , port , port , name , False , idle_timeout_minutes )
139138 if probe :
140139 endpoint .load_balancer_probe = probe
141140 return endpoint
@@ -160,11 +159,12 @@ def network_config(subnet_name=None, port='59913', public_ip_name=None):
160159 network .public_ips .public_ips .append (ip )
161160 if args .deis :
162161 # create web endpoint with probe checking /health-check
163- network .input_endpoints .input_endpoints .append (endpoint_config ('web' , '80' , load_balancer_probe ('/health-check' , '80' , 'http' )))
162+ network .input_endpoints .input_endpoints .append (lb_endpoint_config ('web' , '80' , load_balancer_probe ('/health-check' , '80' , 'http' )))
164163 if not args .nohttps :
165- network .input_endpoints .input_endpoints .append (endpoint_config ('https' , '443' , load_balancer_probe (None , '443' , 'tcp' )))
166- # create builder endpoint TCP probe check
167- network .input_endpoints .input_endpoints .append (endpoint_config ('builder' , '2222' , load_balancer_probe (None , '2222' , 'tcp' )))
164+ network .input_endpoints .input_endpoints .append (lb_endpoint_config ('https' , '443' , load_balancer_probe (None , '443' , 'tcp' )))
165+ # create builder endpoint TCP probe check and extended timeout
166+ network .input_endpoints .input_endpoints .append (lb_endpoint_config ('builder' , '2222' ,
167+ load_balancer_probe (None , '2222' , 'tcp' ,), 20 ))
168168 return network
169169
170170def data_hd (target_container_url , target_blob_name , target_lun , target_disk_size_in_gb ):
0 commit comments