11// Importing required node.js modules
22var batch = require ( 'azure-batch' ) ;
3- var uuid = require ( 'node-uuid' ) ;
43
54// Replace values below with Batch Account details
65var accountName = '<batch-account-name>' ;
76var accountKey = '<batch-account-key>' ;
87var accountUrl = '<batch-account-url>' ;
98
109// Replace values with SAS URIs of the shell script file
11- var sh_url = "https://batchdevsgsa.blob.core.windows.net/downloads/startup_prereq.sh?st=2017-04-10T18%3A11%3A00Z&se=2018 -03-11T18%3A11%3A00Z&sp=rl&sv=2015-12-11 &sr=b&sig=TEGlekTbAlGAqInp3m4ZEAAyHdE5NwGQQaJVmxcg5AE%3D " ;
10+ var sh_url = "https://batchdevsgsa.blob.core.windows.net/downloads/startup_prereq.sh?st=2017-04-10T18%3A11%3A00Z&se=2020 -03-11T18%3A11%3A00Z&sp=rl&sv=2018-03-28 &sr=b&sig=xxxx " ;
1211
1312// Replace values with SAS URIs of the Python script file
14- var scriptURI = "https://batchdevsgsa.blob.core.windows.net/downloads/processcsv.py?st=2017-04-10T18%3A11%3A00Z&se=2018 -03-11T18%3A11%3A00Z&sp=rl&sv=2015-12-11 &sr=b&sig=ngeN60AzqSc%2Bugx2H7XUbiNXysb1%2BMvuW%2Fk8FhsU3KU%3D " ;
13+ var scriptURI = "https://batchdevsgsa.blob.core.windows.net/downloads/processcsv.py?st=2017-04-10T18%3A11%3A00Z&se=2020 -03-11T18%3A11%3A00Z&sp=rl&sv=2018-03-28 &sr=b&sig=xxxx " ;
1514
1615// Pool ID
1716var now = new Date ( ) ;
@@ -29,20 +28,20 @@ var batchClient = new batch.ServiceClient(credentials,accountUrl);
2928// Pool VM Image Reference
3029var imgRef = { publisher :"Canonical" ,
3130 offer :"UbuntuServer" ,
32- sku :"14 .04.2 -LTS" ,
31+ sku :"16 .04-LTS" ,
3332 version :"latest" }
3433// Pool VM configuraion object
3534var vmConfig = { imageReference :imgRef ,
36- nodeAgentSKUId :"batch.node.ubuntu 14 .04" } ;
35+ nodeAgentSKUId :"batch.node.ubuntu 16 .04" } ;
3736// Number of VMs to create in a pool
3837var numVms = 4 ;
39- var vmSize = "STANDARD_A1 " ;
38+ var vmSize = "STANDARD_D1_V2 " ;
4039// Pool configuration object
4140var poolConfig = { id :poolId ,
4241 displayName :"Processing csv files" ,
4342 vmSize :vmSize ,
4443 virtualMachineConfiguration :vmConfig ,
45- targetDedicated :numVms ,
44+ targetDedicatedNodes :numVms ,
4645 enableAutoScale :false } ;
4746
4847// Creating Batch Pool
@@ -67,7 +66,7 @@ function createJob()
6766 // Preparation Task configuraion object
6867 var jobPrepTaskConfig = { id :"installprereq" ,
6968 commandLine :"sudo sh startup_prereq.sh > startup.log" ,
70- resourceFiles :[ { 'blobSource ' :sh_url , 'filePath' :'startup_prereq.sh' } ] ,
69+ resourceFiles :[ { 'httpUrl ' :sh_url , 'filePath' :'startup_prereq.sh' } ] ,
7170 waitForSuccess :true , runElevated :true } ;
7271
7372 // Setting Batch Pool ID
@@ -106,7 +105,7 @@ function createTasks()
106105 var taskConfig = { id :taskID ,
107106 displayName :'process csv in ' + containerName ,
108107 commandLine :'python processcsv.py --container ' + containerName ,
109- resourceFiles :[ { 'blobSource ' :scriptURI , 'filePath' :'processcsv.py' } ] } ;
108+ resourceFiles :[ { 'httpUrl ' :scriptURI , 'filePath' :'processcsv.py' } ] } ;
110109
111110 var task = batchClient . task . add ( jobId , taskConfig , function ( error , result ) {
112111 if ( error !== null )
0 commit comments