Skip to content

Commit

Permalink
Updating docs with graylog logging info
Browse files Browse the repository at this point in the history
  • Loading branch information
ulrikpedersen committed Jul 20, 2023
1 parent f7261af commit 96ae7ef
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 1 deletion.
1 change: 0 additions & 1 deletion docs/user/how-to/run-scan.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Running a scan
==================

* Start the simulators and IOCs by running :code:`docker compose up -d`
* Start the interactive bluesky environment. This is best done within the same network as the docker-compose environment which can be achieved by running: :code:`docker run --net tomoscan_default -it tomoscan`
* Start the phoebus screen to monitor the scan's progress. Navigate to the display folder and run :code:`./startOvervirew.sh`

Expand Down
60 changes: 60 additions & 0 deletions docs/user/tutorials/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,63 @@ Copy the example-dotenv file to create a local .env file as follows:
::

$ cp example-dotenv .env

Bring up the runtime environment
================================

The runtime environment consists of a number of services which can be brought up/down on a local development machine using docker compose.

.. _logging-service:

Start and access logging service
--------------------------------

The many services can log into a single location for easy searching and monitoring. A separate docker compose file named `graylog-compose.yml` can be used to bring up a Graylog stack.

First configure a graylog admin account password:

::

$ cat example-graylog-dotenv >> .env

Now edit the `.env` file and fill in the `GRAYLOG_ROOT_PASSWORD_SHA2` and `GRAYLOG_PASSWORD_SECRET` as per the comments in the file. For example if choosing a strong password like 'mysupersecretpassword1234':

::

$ pwgen -N 1 -s 96
MXOuTyOQVxSmLL9lxGanDHyw8az3S7PkDmzlKFLfPH081xFgxmcMxwY3DsQxDN5cjfFGS01v7RtDVJRj9dxbGZht4IN992l6

Then set `GRAYLOG_PASSWORD_SECRET=MXOuTyOQVxSmLL9lxGanDHyw8az3S7PkDmzlKFLfPH081xFgxmcMxwY3DsQxDN5cjfFGS01v7RtDVJRj9dxbGZht4IN992l6`

::

$ echo -n mysupersecretpassword1234 | shasum -a 256
3645ac65291ec7ec95d7d3697c9309b0edfbdbad7e904a39406a88a6b80bca28 -

Then set `GRAYLOG_ROOT_PASSWORD_SHA2=3645ac65291ec7ec95d7d3697c9309b0edfbdbad7e904a39406a88a6b80bca28`

Now you can start the graylog services with docker compose:

::

$ docker compose -f graylog-compose.yml up -d

Connect to the graylog web-interface on http://localhost:9000 and login with the `admin` user and the password selected above. On the graylog web interface, navigate to "Search" (top left menu). Then select a time-window or "all messages" (top left clock) and click the green search button. Start the automatic updating and set the poll to "1 Second" (top right corner). Now you are ready to see logs when starting up the control system services in the next steps...

Start the Control System
------------------------

The simulation control system with motor, and areaDetector IOCs as well as laser pulse simulation can be started with docker compose:

::

$ docker compose up -d

Logs from the services should be available on the :ref:`Graylog web interface<logging-service>`.

The services can be stopped/downed with docker compose:

::

$ docker compose [stop|down]

0 comments on commit 96ae7ef

Please sign in to comment.