<commit_before>.. _administer_peek_platform:

========================
Administer Peek Platform
========================

Configuring Platform :file:`config.json`
----------------------------------------

Update config.json files. This tells the peek platform services how to connect to each
other, connect to the database, which plugins to load, etc.

.. note:: Running the services of Peek will automatically create and fill out
    the missing parts of config.json files with defaults.  So we can start with just what
    we want to fill out.


Peek Server
```````````

Create directory :file:`C:\\Users\\peek\\peek-server.home`

----

Create file :file:`C:\\Users\\peek\\peek-server.home\\config.json`

----

Populate the file :file:`C:\\Users\\peek\\peek-server.home\\config.json` with the
    *   SQLAlchemy connect URL
    *   Enabled plugins

::

        {
        "plugin": {
            "enabled": [
                "peek_plugin_noop",
                "peek_plugin_etc"
            ]
        },
        "sqlalchemy": {
            "connectUrl": "postgresql://postgres:jjc@localhost/peek"
        }


.. note:: In the SQLAlchemy connect URL the :code:`jjc` needs to be replaced with the
    password you used when installing postgres.

For MSSQL the SQAlchemy connection string will be like:

::

        "sqlalchemy": {
           "connectUrl": "mssql+pymssql://.\\peek:PASSWORD@localhost/peek",
           "engineArgs": {
               "max_overflow": 50,
               "pool_recycle": 600,
               "pool_size": 20,
               "pool_timeout": 60
           }


Peek Client, Agent and Worker
`````````````````````````````
For each of "client", "agent" and "worker" names, do the following

Create directory :file:`C:\\Users\\peek\\peek-<name>.home`
Create file :file:`C:\\Users\\peek\\peek-<name>.home\config.json`

Populate the file :file:`C:\\Users\\peek\\peek-server.home\\config.json` with the
    *   Enabled plugins (the plugins you have installed)

::

        {
        "plugin": {
            "enabled": [
                "peek_plugin_noop",
                "peek_plugin_etc"
            ]
        }


If there are no plugins installed, this file will be populated as:

::

        {
        "plugin": {
            "enabled": [
            ]
        }


Running synerty-peek
--------------------

Run the following in bash:

::

        run_peek_server


chrome: http://127.0.0.1:8010/

Update plugin settings

::

        run_peek_client


chrome: http://127.0.0.1:8000/

::

        run_peek_agent

<commit_msg>Update MSSQL connectUrl<commit_after>.. _administer_peek_platform:

========================
Administer Peek Platform
========================

Configuring Platform :file:`config.json`
----------------------------------------

Update config.json files. This tells the peek platform services how to connect to each
other, connect to the database, which plugins to load, etc.

.. note:: Running the services of Peek will automatically create and fill out
    the missing parts of config.json files with defaults.  So we can start with just what
    we want to fill out.


Peek Server
```````````

Create directory :file:`C:\\Users\\peek\\peek-server.home`

----

Create file :file:`C:\\Users\\peek\\peek-server.home\\config.json`

----

Populate the file :file:`C:\\Users\\peek\\peek-server.home\\config.json` with the
    *   SQLAlchemy connect URL
    *   Enabled plugins

::

        {
        "plugin": {
            "enabled": [
                "peek_plugin_noop",
                "peek_plugin_etc"
            ]
        },
        "sqlalchemy": {
            "connectUrl": "postgresql://postgres:jjc@localhost/peek"
        }


.. note:: In the SQLAlchemy connect URL the :code:`jjc` needs to be replaced with the
    password you used when installing postgres.

For MSSQL the SQAlchemy connection string will be like:

::

        "sqlalchemy": {
           "connectUrl": "mssql+pymssql://.\\peek:PASSWORD@localhost/peek"
        }


Peek Client, Agent and Worker
`````````````````````````````
For each of "client", "agent" and "worker" names, do the following

Create directory :file:`C:\\Users\\peek\\peek-<name>.home`
Create file :file:`C:\\Users\\peek\\peek-<name>.home\config.json`

Populate the file :file:`C:\\Users\\peek\\peek-server.home\\config.json` with the
    *   Enabled plugins (the plugins you have installed)

::

        {
        "plugin": {
            "enabled": [
                "peek_plugin_noop",
                "peek_plugin_etc"
            ]
        }


If there are no plugins installed, this file will be populated as:

::

        {
        "plugin": {
            "enabled": [
            ]
        }


Running synerty-peek
--------------------

Run the following in bash:

::

        run_peek_server


chrome: http://127.0.0.1:8010/

Update plugin settings

::

        run_peek_client


chrome: http://127.0.0.1:8000/

::

        run_peek_agent


{'fraction_non_alphanumeric': 0.17146331576813945, 'fraction_numerical': 0.009931090393190109, 'mean_word_length': 2.0901690670006263, 'pattern_counts': {'":': 25, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2389787', 'n_tokens_mistral': 1580, 'n_tokens_neox': 1462, 'n_words': 395}