How to use the hokusai.lib.common.set_verbosity 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 / test / utils.py View on Github external
def mock_verbosity(verbosity):
  old_verbosity = get_verbosity()

  set_verbosity(verbosity)
  yield
  set_verbosity(old_verbosity)
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 / production.py View on Github external
def run(command, tty, tag, env, constraint, verbose):
  """Launch a new container and run a command"""
  set_verbosity(verbose)
  hokusai.run(KUBE_CONTEXT, command, tty, tag, env, constraint)
github artsy / hokusai / hokusai / cli / review_app.py View on Github external
def copy(app_name, verbose):
  """Copies the app's environment config map to the namespace {APP_NAME}"""
  set_verbosity(verbose)
  hokusai.k8s_copy_config(KUBE_CONTEXT, clean_string(app_name))
github artsy / hokusai / hokusai / cli / production.py View on Github external
def unset(env_vars, verbose):
  """Unset environment variables - each of {ENV_VARS} must be of the form 'KEY'"""
  set_verbosity(verbose)
  hokusai.unset_env(KUBE_CONTEXT, env_vars)
github artsy / hokusai / hokusai / cli / production.py View on Github external
def deploy(tag, migration, constraint, git_remote, timeout, update_config, filename, verbose):
  """Update the project's deployment(s) to reference
  the given image tag and update the tag production
  to reference the same image"""
  set_verbosity(verbose)
  hokusai.update(KUBE_CONTEXT, tag, migration, constraint, git_remote, timeout, update_config=update_config, filename=filename)
github artsy / hokusai / hokusai / cli / review_app.py View on Github external
def status(app_name, resources, pods, describe, top, verbose):
  """Print the Kubernetes resources status defined in the staging context / {APP_NAME} namespace"""
  set_verbosity(verbose)
  hokusai.k8s_status(KUBE_CONTEXT, resources, pods, describe, top, namespace=clean_string(app_name), filename=os.path.join(CWD, HOKUSAI_CONFIG_DIR, "%s.yml" % app_name))
github artsy / hokusai / hokusai / cli / production.py View on Github external
def restart(deployment, verbose):
  """Alias for 'refresh'"""
  set_verbosity(verbose)
  hokusai.refresh(KUBE_CONTEXT, deployment)
github artsy / hokusai / hokusai / cli / review_app.py View on Github external
def set(app_name, env_vars, verbose):
  """Set environment variables - each of {ENV_VARS} must be in of form 'KEY=VALUE'"""
  set_verbosity(verbose)
  hokusai.set_env(KUBE_CONTEXT, env_vars, namespace=clean_string(app_name))
github artsy / hokusai / hokusai / cli / base.py View on Github external
def setup(project_name, template_remote, template_dir, var, allow_missing_vars, verbose):
  """Set up Hokusai for the current project"""
  set_verbosity(verbose)
  hokusai.setup(project_name, template_remote, template_dir, var, allow_missing_vars)