Changes between Version 2 and Version 3 of Check


Ignore:
Timestamp:
Oct 12, 2010, 12:56:38 PM (14 years ago)
Author:
dan.dragomir
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Check

    v2 v3  
    1 = Reprogramming - Gateway Watchdog =
     1= Introduction =
    22
    3 == What is the gateway watchdog ==
     3= Monitoring and reprogramming=
     4
     5== Reprogramming - Gateway Watchdog ==
    46
    57The SENSEI Gateway Watchdog is a monitoring and control service for the SENSEI Gateway. It allows for remote starting, stoping and updating the gateway code and can report the version string and uptime of the currently running gateway binary.
    68
    7 == Requirements ==
     9=== Software Requirements ===
    810
    9  * Linux
     11Installing the Gateway Watchdog requires the following software packages:
     12
     13 * [http://www.ubuntu.com/ Linux PC (Ubuntu)]
    1014 * g++, make
    1115 * [http://www.alhem.net/Sockets/ Sockets C++ library] (Also included in lib/Sockets-2.3.7; make clean; make; make install)
    12  * libxml2
    13  * openssl, openssl-dev
     16 * libxml2, libxml2-dev
     17 * libssl, libssl-dev
    1418
    15 == Project Organization ==
     19=== Project Organization ===
    1620
    1721The watchdog shares its code with the gateway implementation and can be found in the [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/gateway /gateway] folder in the SVN.
     
    2226 * [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/gateway/lib /lib] Sockets++ library
    2327 * [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/gateway/config /config] Configuration files (unused)
    24  * [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/gateway/log /log] Log files (unused)                               
    25 == How to build it ==
     28 * [https://ncit-cluster.grid.pub.ro/trac/Sensei-WP5/browser/gateway/log /log] Log files (unused)
    2629
    27 The top-level Makefile will build everything with the following, which places the executables in ./bin. Note that the executables must be run from the root of the project as shown below.
     30=== Compiling the Gateway Watchdog ===
     31
     32Some packages are required to be installed prior to the compilation of the Gateway Watchdog. Please install the following packages from the Ubuntu repository if you did not do already so.
     33
     34{{{
     35$ sudo apt-get install gcc g++ libssl-dev libxml2-dev
     36}}}
     37
     38Sockets library also needs to be installed:
     39
     40{{{
     41$ cd ./lib/Sockets-2.3.7
     42$ make clean
     43$ make
     44$ sudo make install
     45}}}
     46
     47The top-level Makefile will build everything with the following, which places the executables in ./bin.
    2848
    2949{{{
    3050make
    31 ./bin/watchdog
    3251}}}
    3352
     
    3857}}}
    3958
    40 To build the Sockets++ library
    41 
    42 {{{
    43 cd ./lib/Sockets-2.3.7
    44 make clean
    45 make
    46 sudo make install
    47 }}}
    48 
    49 == How to use it ==
     59=== Running the Gateway Watchdog ===
    5060
    5161The watchdog must be run from the root of the project
     
    7383
    7484For the /start, /stop and /uptime urls GET requests are also accepted. They return an HTML page that allows easy access to the operations from a browser.
     85
     86=== Test demo ===
     87
     88The Gateway Watchdog provides monitoring and control of the SENSEI Gateway. To run a demo, please start the Watchdog service by giving the following commands in a console:
     89
     90{{{
     91$ make
     92$ ./bin/watchdog -f bin/ -c sensei-gateway -d pub.ro -w test
     93}}}
     94
     95This will start the Gateway Watchdog which runs an http server at '''localhost:9000'''. You will be able to see the registered gateway watchdog URIs by querying the Resource Directory at http://sensei-dev1.grid.pub.ro:8184/rd.
     96
     97The watchdog service will now accept requests at the following URIs:
     98
     99 * Start Gateway         http://localhost:9000/start
     100 * Stop Gateway          http://localhost:9000/stop
     101 * Update Gateway code   http://localhost:9000/update
     102 * Gateway uptime        http://localhost:9000/uptime
     103 * Gateway version       http://localhost:9000/version
     104
     105As an example, by pointing your browser to the [http://localhost:9000/start Start Gateway] URI you should see following response
     106
     107Clicking the Start button will start the gateway if it is not already started. You can check that the gateway is running by clicking the following link http://localhost:8000
     108
     109By pointing your browser to the [http://localhost:9000/stop Stop Gateway] URI you should see the following response
     110
     111Clicking the Stop button will stop the gateway.
     112
     113By pointing your browser to the [http://localhost:9000/update Update Gateway code] URI you will be able to upload a new binary to the gateway and, optionally, specify a version string for this binary, as shown bellow.
     114
     115Note that to run the new gateway code you have to stop and then start the gateway.
     116
     117= Scheduling =
     118= Self-healing =