aztk icon indicating copy to clipboard operation
aztk copied to clipboard

How to assign environment variable in aztk cluster

Open deepika087 opened this issue 6 years ago • 3 comments

Hi I have a specific use case to assign environment variable within the aztk cluster is there any way to assign env variable ?

deepika087 avatar Mar 22 '18 21:03 deepika087

You can create a custom script that sets an environment variable and add it to cluster.yaml configuration file. An aztk custom script is a bash script that is executed in the docker container that the spark environment is run in.

In your cluster.yaml:

custom_scripts: 
   - script: /path/to/your/script
     runOn: <master/worker/all-nodes>

jafreck avatar Mar 22 '18 21:03 jafreck

thats something though we could simplify potentially too

timotheeguerin avatar Mar 22 '18 22:03 timotheeguerin

@timotheeguerin yeah, we could add a environment_variables block to cluster.yaml and job.yaml and then handle setting ourselves

jafreck avatar Mar 22 '18 23:03 jafreck