From 9d7db5473073d771da307b06c904c3a82ae42ad3 Mon Sep 17 00:00:00 2001 From: Vincent Fournier Date: Fri, 29 May 2015 15:44:32 -0400 Subject: [PATCH] Improve getting started Change-Id: I0182a10f86a5143d8dbbaadecf98ec7f18c55444 --- doc/source/getting_started.rst | 38 +++++++++++++++++++++-------- doc/source/tutorial_hello_world.rst | 0 2 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 doc/source/tutorial_hello_world.rst diff --git a/doc/source/getting_started.rst b/doc/source/getting_started.rst index 48c9f93..abba881 100644 --- a/doc/source/getting_started.rst +++ b/doc/source/getting_started.rst @@ -4,18 +4,24 @@ Getting Started ############### -Developpement environnement +Development environment --------------------------- -1. Starting the containers -~~~~~~~~~~~~~~~~~~~~~~~~~~ +0. Prerequisite +~~~~~~~~~~~~~~~ -Surveil's developpement environnement is based on Docker and docker-compose. +Surveil's development environment is based on Docker and docker-compose. + +First you need to install Docker. Refer to the project `installation documentation `_. You can install docker-compose with the following command: :bash:`sudo pip install -U docker-compose` + +1. Starting the containers +~~~~~~~~~~~~~~~~~~~~~~~~~~ + You will then be able to use the environment with the following commands: * :bash:`sudo docker-compose up`: Launch Surveil and its dependencies in containers. @@ -84,11 +90,23 @@ You can also use the CLI to view the configured hosts in the API with Adding a new host ````````````````` -Surveil ships with configuration templates (or packs). While it is possible possible to define services by yourself, it is suggested -to use configuration templates. For example, the following command defines a host using the OpenStack Keystone template: :: +The Surveil CLI provides function to add hosts: - surveil config-host-create --host_name os-controller-1.cloud.mtl.sfl --address 172.20.1.21 --use linux-keystone --custom_fields '{"_OS_AUTH_URL":"http://145.50.1.61:5000/v2.0", "_OS_TENANT_NAME":"admin", "_OS_USERNAME":"admin", "_OS_PASSWORD":"password","_KS_SERVICES":"identity"}' + :bash:`surveil config-host-create --host_name openstackwebsite --address openstack.org` + +This will configure a new host in Surveil. However, it won't be monitored until Surveil's config +is reloaded. You can do this with the CLI: + + :bash:`surveil config-reload` + +It will take from 5 to 10 seconds for Surveil to start monitoring the host. After this delay, you +will be able to consult the host status with the CLI: + + :bash:`surveil status-host-list` + +Using Bansho the web interface +`````````````````````````````` +The Surveil client uses the Surveil API to query information concerning hosts +and services. Bansho (Surveil's web interface) also uses this API. To use Bansho simply +open a browser at `http://localhost:8888 `_ and press login. -This will create a ``os-controller-1.cloud.mtl.sfl`` host using the ``linux-keystone`` template. A service will be automatically -defined to monitor the Keystone API with the authentication credentials provided. More documentation about configuration packs -is available `here `_. diff --git a/doc/source/tutorial_hello_world.rst b/doc/source/tutorial_hello_world.rst new file mode 100644 index 0000000..e69de29