Contexts
Creating your own context
If you'd like to use contexts to manage connections to multiple local lattices, you can create your own context. You can do that in one of two ways:
# Create a context with specified name and default values
wash ctx new ctx_tutorial
# Create a context interactively with terminal prompts
wash ctx new --interactive
Once created, you can use the edit
subcommand to easily edit those contexts. wash
attempts to use the terminal editor defined in your environment as EDITOR
, but will also accept an argument for your favorite terminal editor.
wash ctx edit --editor vim ctx_tutorial
We specified a context above, but if you omit that argument then you'll be interactively prompted to select a context. You can go ahead and edit your context to change any connection parameters, or perhaps a cluster seed, and once you're finished editing you can save and quit your editor (hopefully we aren't locking you into vim here if this is your first time. :wq
writes and quits.) After you're finished editing, use wash ctx default
to change the default context to your new context, and wash
will automatically use that context's values for your next control interface command or remote procedure call.