internal.py: add global config key 'unlock_on_failure'

When testing new tasks, it's a drag to have to keep manually unlocking
the targets.  Default behavior is to keep them locked for any failure;
this allows overriding that choice for the case where the failure is
in debugging the task, where the state of the targets isn't important.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
interactive.py: add handy "pp" for prettyprinting at the prompt

Signed-off-by: Dan Mick <dan.mick@inktank.com>
First attempt at implementing teuthology tasks for calamari
Fix some arguments in rem.run statements.
Named everything with dashes.

Fixed several bugs in calamari-setup.py.
This now comes up without errors.

I still need to add code to the qa suites to implement that smoketests.
Add calamari-agent.py calamari-restapi.py calamari-server.py and
calamari-setup.py
Remove duplicate routine (now in calamari-setup.py)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
calamari-server.py: return if error; log only if complete.  Add TODO

Signed-off-by: Dan Mick <dan.mick@inktank.com>
typos

Signed-off-by: Dan Mick <dan.mick@inktank.com>
calamari.sample.yaml: add

Signed-off-by: Dan Mick <dan.mick@inktank.com>
calamari-setup: fix remote_name, use write_file(), remove extra tasks

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Move edit_diamond_config() from calamari-server to calamari-agent

Signed-off-by: Dan Mick <dan.mick@inktank.com>
calamari-agent.py: handle server config
wow, that was just wrongheaded
duh
Modified to parse ctx information correctly when using multiple sites.
calamari_setup is no longer used.
Make sure setup_local_cluster is performed.  Use local disable_default_nginx
as well.
Fixed Remotes() calls (should just set to None).
Move calamari-setup into ../calamari_misc; add remove_package()

Signed-off-by: Dan Mick <dan.mick@inktank.com>
calamari.sample.yaml: I think calamari-agent needs a remotes key

Signed-off-by: Dan Mick <dan.mick@inktank.com>
calamari-agent.py: first cut at fixing up to teuthology-standard

- make a contextmanager so we can have finally clause to undo
- remotes from task config
- server from task config
- edit diamond config on remote

Signed-off-by: Dan Mick <dan.mick@inktank.com>