watcher/doc/source/deploy/user-guide.rst
Taylor Peoples 86c1a9d77f Remove references to SERVERS_CONSOLIDATION
Change I6c43eba941022a88851a199b56a6c20f017b9e71 seemed to have remove
most references to the SERVERS_CONSOLIDATION goal.  Since this goal does
not currently exist in the actual code and all usages of it are for
samples or for tests, it is replaced with the DUMMY goal to avoid
confusion.

Change-Id: I4d2240d3b22c42ebf4e6120e2cd7677ec49d8e98
Closes-Bug: #1538388
2016-02-03 07:22:44 +01:00

4.0 KiB

Watcher User Guide

See the architecture page for an architectural overview of the different components of Watcher and how they fit together.

In this guide we're going to take you through the fundamentals of using Watcher.

The following diagram shows the main interactions between the Administrator <administrator_definition> and the Watcher system:

image

Getting started with Watcher

This guide assumes you have a working installation of Watcher. If you get "watcher: command not found" you may have to verify your installation. Please refer to the installation guide. In order to use Watcher, you have to configure your credentials suitable for watcher command-line tools. If you need help on a specific command, you can use:

$ watcher help COMMAND

Seeing what the Watcher CLI can do ?

We can see all of the commands available with Watcher CLI by running the watcher binary without options.

$ watcher

How do I run an audit of my cluster ?

First, you need to create an audit template <audit_template_definition>. An audit template <audit_template_definition> defines an optimization goal <goal_definition> to achieve (i.e. the settings of your audit). This goal should be declared in the Watcher service configuration file /etc/watcher/watcher.conf.

$ watcher audit-template-create my_first_audit DUMMY

If you get "You must provide a username via either --os-username or via env[OS_USERNAME]" you may have to verify your credentials.

Then, you can create an audit. An audit is a request for optimizing your cluster depending on the specified goal <goal_definition>.

You can launch an audit on your cluster by referencing the audit template <audit_template_definition> (i.e. the settings of your audit) that you want to use.

  • Get the audit template <audit_template_definition> UUID:
$ watcher audit-template-list
  • Start an audit based on this audit template <audit_template_definition> settings:
$ watcher audit-create -a <your_audit_template_uuid>

Watcher service will compute an Action Plan <action_plan_definition> composed of a list of potential optimization actions <action_definition> (instance migration, disabling of an hypervisor, ...) according to the goal <goal_definition> to achieve. You can see all of the goals available in section [watcher_strategies] of the Watcher service configuration file.

  • Wait until the Watcher audit has produced a new action plan <action_plan_definition>, and get it:
$ watcher action-plan-list --audit <the_audit_uuid>
  • Have a look on the list of optimization actions <action_definition> contained in this new action plan <action_plan_definition>:
$ watcher action-list --action-plan <the_action_plan_uuid>

Once you have learned how to create an Action Plan <action_plan_definition>, it's time to go further by applying it to your cluster:

  • Execute the action plan <action_plan_definition>:
$ watcher action-plan-start <the_action_plan_uuid>

You can follow the states of the actions <action_definition> by periodically calling:

$ watcher action-list

You can also obtain more detailed information about a specific action:

$ watcher action-show <the_action_uuid>