How to use the hokusai.lib.common.select_context function in hokusai

To help you get started, we’ve selected a few hokusai examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github artsy / hokusai / hokusai / cli / remote / __init__.py View on Github external
def delete(staging, production, verbose):
  """Delete the Kubernetes remote resources defined in ./hokusai/{staging/production}.yml"""
  set_verbosity(verbose)
  context = select_context(staging, production)
  hokusai.environment_delete(context)
github artsy / hokusai / hokusai / cli / remote / __init__.py View on Github external
def update(staging, production, verbose):
  """Update the Kubernetes remote resources defined in ./hokusai/{staging/production}.yml"""
  set_verbosity(verbose)
  context = select_context(staging, production)
  hokusai.environment_update(context)
github artsy / hokusai / hokusai / cli / remote / env.py View on Github external
def get(env_vars, staging, production, verbose):
  """Print environment variables stored on the Kubernetes server"""
  set_verbosity(verbose)
  context = select_context(staging, production)
  hokusai.get_env(context, env_vars)
github artsy / hokusai / hokusai / cli / remote / env.py View on Github external
def delete(staging, production, verbose):
  """Delete the Kubernetes configmap object `{project_name}-environment`"""
  set_verbosity(verbose)
  context = select_context(staging, production)
  hokusai.delete_env(context)
github artsy / hokusai / hokusai / cli / remote / env.py View on Github external
def unset(env_vars, staging, production, verbose):
  """Unset environment variables - each of {ENV_VARS} must be of the form 'KEY'"""
  set_verbosity(verbose)
  context = select_context(staging, production)
  hokusai.unset_env(context, env_vars)
github artsy / hokusai / hokusai / cli / remote / __init__.py View on Github external
def status(staging, production, verbose):
  """Print the Kubernetes remote resources status defined in ./hokusai/{staging/production}.yml"""
  set_verbosity(verbose)
  context = select_context(staging, production)
  hokusai.environment_status(context)
github artsy / hokusai / hokusai / cli / remote / env.py View on Github external
def set(env_vars, staging, production, verbose):
  """Set environment variables - each of {ENV_VARS} must be in of form 'KEY=VALUE'"""
  set_verbosity(verbose)
  context = select_context(staging, production)
  hokusai.set_env(context, env_vars)
github artsy / hokusai / hokusai / cli / remote / __init__.py View on Github external
def run(command, staging, production, tty, tag, env, constraint, verbose):
  """Launch a new container and run a command in a given environment"""
  set_verbosity(verbose)
  context = select_context(staging, production)
  hokusai.run(context, command, tty, tag, env, constraint)
github artsy / hokusai / hokusai / cli / remote / __init__.py View on Github external
def logs(staging, production, timestamps, follow, tail, verbose):
  """Get container logs for a given environment"""
  set_verbosity(verbose)
  context = select_context(staging, production)
  hokusai.logs(context, timestamps, follow, tail)
github artsy / hokusai / hokusai / cli / remote / __init__.py View on Github external
def create(staging, production, verbose):
  """Create the Kubernetes remote resources defined in ./hokusai/{staging/production}.yml"""
  set_verbosity(verbose)
  context = select_context(staging, production)
  hokusai.environment_create(context)