title: Setting environment variables on Dataproc cluster nodes
body: <p>I would like an environment variable to be set on each node of my dataproc cluster so that it is available to a pyspark job that will be running on that cluster. What is the best way to do this?</p>
  
  <p>I'm wondering if there is a way to do it using Compute Engine metadata (although my research so far indicates that Compute Engine metadata is available via the metadata server on Compute Engine instances, not via environment variables). </p>
  
  <p>Other than that I can't think of a way of doing it other than issuing an <code>export</code> command in a  dataproc initialisation script.</p>
  
  <p>Can anyone suggest any other alternatives?</p>