How to use the hokusai.lib.common.CONTEXT_SETTINGS 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 / base.py View on Github external
@base.command(context_settings=CONTEXT_SETTINGS)
@click.option('--project-name', type=click.STRING, default=os.path.basename(hokusai.CWD), help='The project name (default: name of current directory)')
@click.option('--template-remote', type=click.STRING, help='Git remote of templates to use - you can specify a branch via #')
@click.option('--template-dir', type=click.STRING, help='Directory of templates to use - can be used with --template-remote')
@click.option('--var', type=click.STRING, multiple=True, help='Extra variables to render Jinja templates in the form of key=value')
@click.option('--allow-missing-vars', is_flag=True, help='Do not fail on undefined template vars')
@click.option('-v', '--verbose', type=click.BOOL, is_flag=True, help='Verbose output')
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)
github artsy / hokusai / hokusai / cli / registry.py View on Github external
@registry.command(context_settings=CONTEXT_SETTINGS)
@click.option('--tag', type=click.STRING, default='latest', help='The remote tag to pull  (default: latest)')
@click.option('--local-tag', type=click.STRING, default='latest', help='The local tag to pull to (default: latest)')
@click.option('-v', '--verbose', type=click.BOOL, is_flag=True, help='Verbose output')
def pull(tag, local_tag, verbose):
  """Pull the image tag --tag from the project's registry and tag as --local-tag"""
  set_verbosity(verbose)
  hokusai.pull(tag, local_tag)
github artsy / hokusai / hokusai / cli / production.py View on Github external
def production(context_settings=CONTEXT_SETTINGS):
  """Interact with the production Kubernetes environment
  defined by the `production` context in `~/.kube/config` and the 
  Kubernetes resources in `./hokusai/production.yml`"""
  pass
github artsy / hokusai / hokusai / cli / review_app.py View on Github external
def review_app(context_settings=CONTEXT_SETTINGS):
  """Create/Manage review apps"""
  pass
github artsy / hokusai / hokusai / cli / staging.py View on Github external
@staging.command(context_settings=CONTEXT_SETTINGS)
@click.option('--resources/--no-resources', default=True, help='Print Kubernetes API objects defined in ./hokusai/staging.yml (default: true)')
@click.option('--pods/--no-pods', default=True, help='Print pods (default: true)')
@click.option('--describe', type=click.BOOL, is_flag=True, help="Print 'kubectl describe' output for resources and pods")
@click.option('--top', type=click.BOOL, is_flag=True, help='Print top pods')
@click.option('-f', '--filename', type=click.STRING, help='Use the given Kubernetes Yaml file (default ./hokusai/staging.yml)')
@click.option('-v', '--verbose', type=click.BOOL, is_flag=True, help='Verbose output')
def status(resources, pods, describe, top, filename, verbose):
  """Print Kubernetes resources in the staging context"""
  set_verbosity(verbose)
  hokusai.k8s_status(KUBE_CONTEXT, resources, pods, describe, top, filename=filename)
github artsy / hokusai / hokusai / cli / dev.py View on Github external
@dev.command(context_settings=CONTEXT_SETTINGS)
@click.option('-v', '--verbose', type=click.BOOL, is_flag=True, help='Verbose output')
@click.option('-f', '--follow', type=click.BOOL, is_flag=True, help="Follow output")
@click.option('-t', '--tail', type=click.INT, help="Number of lines of recent logs to display")
def logs(follow, tail, verbose):
  """Print logs from the development environment defined in ./hokusai/development.yml"""
  set_verbosity(verbose)
  hokusai.dev_logs(follow, tail)
github artsy / hokusai / hokusai / cli / production.py View on Github external
@env.command(context_settings=CONTEXT_SETTINGS)
@click.argument('env_vars', type=click.STRING, nargs=-1)
@click.option('-v', '--verbose', type=click.BOOL, is_flag=True, help='Verbose output')
def get(env_vars, verbose):
  """Print environment variables stored on the Kubernetes server"""
  set_verbosity(verbose)
  hokusai.get_env(KUBE_CONTEXT, env_vars)
github artsy / hokusai / hokusai / cli / dev.py View on Github external
def dev(context_settings=CONTEXT_SETTINGS):
  """Interact with docker-compose development environment
  defined by ./hokusai/development.yml"""
  pass
github artsy / hokusai / hokusai / cli / registry.py View on Github external
def registry(context_settings=CONTEXT_SETTINGS):
  """Interact with the project registry defined by `./hokusai/config.yml`"""
  pass
github artsy / hokusai / hokusai / cli / base.py View on Github external
def base(context_settings=CONTEXT_SETTINGS):
  """Hokusai is a CLI for managing application deployments on Kubernetes"""
  pass