question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add standard mapping option for environment variables.

See original GitHub issue

In our Pangeo deployments, we have a need for setting an environment variable on the workers based on user input. This seems like the kind of thing that would be useful for all backends so I’m raising this here while we’ll implement it on our own in Pangeo for now.

  1. A widget / traitlet for accepting input from the user in the form of a mapping from {name: value}.
  2. A standard dask-gateway config for this option for all backends supported by dask-gateway, which is then forwarded to the appropriate location.

The main downside I see with 2 is that this would make two ways to specify environment variables for each backend. The “dask-gateway” way, and the backend-native way. For kubernetes that would be

gateway:
  backend:
    worker:
      extraContainerConfig:
        env:
          - name: name
            value: value

Is that problematic?

cc @rsignell-usgs and @scottyhq.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jcristcommented, Jul 16, 2020

I’ve added a mapping option in #290, will be part of the next release.

1reaction
jcristcommented, Jul 15, 2020

Is it the case that dask-gateway necessarily restricts user-defined dask config to whatever subset of the full dask configuration options are exposed from here: https://gateway.dask.org/api-server.html#cluster-backends ?

We don’t do anything with preload scripts currently.

Also, note that configuration set locally (using dask.config.set) isn’t generally picked up by a dask cluster started via any of dask’s clusters tools. If you’re running a cluster that starts the scheduler locally, then the scheduler and client will see your configuration, but the workers will not. Dask-gateway doesn’t run the scheduler locally, so only the Client will see your local dask configuration. All options on dask-gateway clusters must be either set by administrators, or exposed via cluster options.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Environment variables and app settings in Azure App Service
In Azure App Service, certain settings are available to the deployment or runtime environment as environment variables.
Read more >
Environment variables to configure the AWS CLI
Environment variables provide another way to specify configuration options and credentials, and can be useful for scripting or temporarily setting a named ...
Read more >
Introduction to environment variables - CircleCI
Use environment variables to set up various configuration options, and keep your set-up secure with secrets, private keys, and contexts.
Read more >
Agent Environment Variables - Datadog Docs
Overview. For Agent v6, most of the configuration options in the Agent's main configuration file ( datadog.yaml ) can be set through environment...
Read more >
Using Environment Variables in Python for App Configuration ...
Option 1: Required with no default value ... For example, an application should fail to start if a required environment variable is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found