diff --git a/gromet.html b/gromet.html new file mode 100644 index 0000000..b0f19c9 --- /dev/null +++ b/gromet.html @@ -0,0 +1,1276 @@ + + + + + + + + +DRAFT gromet installation for FS computers + + + + + +
+
+

1. Revision history

+
+
+
    +
  • +

    1.1 — August 2023 — Correct MET4 bar command to 3

    +
  • +
  • +

    1.0 — August 2021 — Initial version

    +
  • +
+
+
+
+
+

2. Introduction

+
+
+

This document provides instructions for installing gromet (a met. +data server) for Field System computers. It is assumed that there are +both operational and spare computers in use. They are referred to +as fs1 and fs2, respectively. You should of course replace those +with the names of the computers you are using, if different. If there +is only one computer, you can omit the actions involving fs2. If you +do install on fs2, gromet should be disabled there until it is +needed.

+
+
+

The repository for gromet can be found at +https://github.com/nvi-inc/gromet.

+
+
+

The installation process uses the recoverable testing procedure of +FSL10 with a RAID to enable easy recovery in case of a problem. This +has the advantage that if (i) actions are missing from the gromet +installation procedure or (ii) errors occur, and either or both can’t +be recovered from directly, it is relatively easy to return to the +original state and start over. If you are using some other FSLx or +don’t have a RAID, you should skip using the recoverable testing +procedure and recovery or substitute a different one.

+
+
+
+
+

3. Reverting the installation

+
+
+

If it is not possible finish the installation before the next +operational use of the system or disk rotation, the systems can be +reverted to their previous configuration. For each system that had the +primary disk dropped follow the failed branch of the recoverable +testing procedure at +https://nvi-inc.github.io/fsl10/raid.html#_recoverable_testing.

+
+
+

It will require several hours for the refresh operation to complete. +The system can be used for operations, but not a disk rotation, while +the refresh is in progress. Later, the installation can be tried again +from scratch when it is convenient.

+
+
+

Depending on where in the process the decision to revert the +installation is made, it may also be necessary to move the MET4A and +wind sensor serial connectors back to fs1.

+
+
+
+
+

4. Setup the hardware

+
+
+

4.1. Perle IOLAN SDS2 G Device Server

+
+
    +
  1. +

    Set DIP switch to serial. It may need to be console for the first setup.

    +
  2. +
  3. +

    Configure to have the correct IP address and netmask.

    +
    +

    The Perle Device Manager software can be used for this.

    +
    +
  4. +
  5. +

    Connect to the correct Ethernet switch.

    +
  6. +
  7. +

    Configure to have the correct setup for each serial device:

    +
    +

    Connect to the device with a Web Browser.

    +
    +
    + + + + + +
    +
    Note
    +
    +You could use the Perle Device Manager instead. +
    +
    +
    +
      +
    1. +

      For Serial #1:

      +
      +
      +
      General: TCP sockets, Port: 10001, multiple connections
      +Advanced: TCP keep alive
      +Hardware: EIA-232/485, 9600, 8, N, 1
      +  for 232: full duplex
      +  for 485: half/full duplex as needed; for half, enable echo suppression
      +Packet forwarding: Minimize Latency
      +
      +
      +
    2. +
    3. +

      For serial #2, use same setuo except use port 10002.

      +
    4. +
    5. +

      Optionally set serial #1 device to met4a and #2 to wind

      +
    6. +
    +
    +
  8. +
+
+
+

More information about this device can be found at +https://www.perle.com/products/iolan-sdg-device-server.shtml.

+
+
+
+

4.2. Paroscientific MET4A met. sensor

+
+
    +
  1. +

    If necessary, use a serial connection and a terminal emulator such +as putty, screen, or the Paroscientific utility DQI3, to +configure the line protocol.

    +
    +

    The serial line configuration is 9600 BAUD, no parity, 8 data bits, +and 1 stop bit, Use RS232 or RS485 as needed.

    +
    +
  2. +
  3. +

    Connect MET4A to Perle serial port #1

    +
  4. +
  5. +

    Configure device, e.g. on Linux use nc ip 10001 to connect to +the device at IP address ip.

    +
    + + + + + +
    +
    Note
    +
    +You could use a serial connection and a terminal emulator instead. +
    +
    +
    +
      +
    1. +

      Set device to respond in bars for pressure with:

      +
      +
      +
      *0100EW*0100UN=3
      +
      +
      +
    2. +
    3. +

      Test for response with:

      +
      +
      +
      *0100P9
      +
      +
      +
    4. +
    +
    +
    +

    Example output:

    +
    +
    +
    +
    $WIXDR,P,.885475,B,DQ146664,C,15.61,C,DQ20356187,H,100.00,P,DQ20356187
    +
    +
    +
  6. +
+
+ +
+
+

4.3. Vaisala WMT70x wind sensor

+
+
    +
  1. +

    If necessary, use a serial connection and a terminal emulator such as putty, screen, or the Paroscientific utility DQI3, to configure the line protocol.

    +
    +

    The serial line configuration is 9600 BAUD, no parity, 8 data bits, and 1 stop bit, Use RS232 or RS485 as needed.

    +
    +
  2. +
  3. +

    Connect WMT70x to Perle serial port #2

    +
  4. +
  5. +

    Configure device, e.g. on Linux use nc ip 10002 to connect to the device at IP address ip.

    +
    + + + + + +
    +
    Note
    +
    +You could use a serial connection and a terminal emulator instead. +
    +
    +
    +
      +
    1. +

      Open command mode (can be entered as output is coming out):

      +
      +
      +
      $0OPEN
      +
      +
      +
    2. +
    3. +

      Stop output with:

      +
      +
      +
      STOP
      +
      +
      +
    4. +
    5. +

      Configure for WS425 A/B Standard Data Message auto-send:

      +
      +
      +
      S autoSend,19
      +
      +
      +
    6. +
    7. +

      Speed in meters/second:

      +
      +
      +
      S wndUnit,0
      +
      +
      +
    8. +
    9. +

      Output once per second:

      +
      +
      +
      S autoInt,1
      +
      +
      +
    10. +
    11. +

      Start output:

      +
      +
      +
      START
      +
      +
      +
      +

      Output should start coming out once per second, e.g.:

      +
      +
      +
      +
      $WIMWV,284,R,004.3,M,A*37
      +
      +
      +
    12. +
    +
    +
  6. +
+
+
+

More information about this device can be found at +https://docs.vaisala.com/r/M211095EN-K/en-US.

+
+
+
+
+
+

5. fs1 installation

+
+
+

All work in this section is to be performed on the fs1 computer.

+
+
+

5.1. Preparing fs1

+
+
    +
  1. +

    Follow the directions for the recoverable test procedure at +https://nvi-inc.github.io/fsl10/raid.html#_recoverable_testing.

    +
  2. +
  3. +

    Once the primary disk has been dropped from the RAID, move onto the +next step, Installing gromet on fs1, below.

    +
  4. +
+
+
+
+

5.2. Installing gromet on fs1

+
+
    +
  1. +

    Remove any previous installation of gromet.

    +
  2. +
  3. +

    As root, install or update the go language installation

    +
    +
      +
    1. +

      Run fsadapt:

      +
      +
      +
      cd ~/fsl10
      +./fsadapt
      +
      +
      +
      +

      In fsadapt:

      +
      +
      + + + + + +
      +
      Note
      +
      +Use Space to toggle actions, * is selected, empty +(space) is not selected. Use and to +navigate between actions. Use Tab to change whether <OK> or +<Cancel> is selected (inverse video) at the bottom. +
      +
      +
    2. +
    3. +

      On the first screen, make sure only the goinst option is +selected, then with OK highlighted, press Enter.

      +
    4. +
    5. +

      On the second screen, use Tab to select Cancel then press +Enter.

      +
    6. +
    +
    +
  4. +
  5. +

    As prog:

    +
    +
      +
    1. +

      Set the PATH for go in ~/.profile

      +
      +

      Make sure the lines:

      +
      +
      +
      +
      export GOPATH=~/go
      +PATH="$GOPATH/bin:/usr/local/go/bin:$PATH"
      +
      +
      +
      +

      are uncommented.

      +
      +
    2. +
    3. +

      Reload the PATH:

      +
      +
      +
      . ~/.profile
      +
      +
      +
    4. +
    5. +

      Download and make gromet

      +
      +
      +
      cd /usr2/st
      +git clone https://github.com/nvi-inc/gromet.git
      +cd gromet
      +make
      +
      +
      +
    6. +
    7. +

      Create the local configuration directory:

      +
      +
      +
      cd /usr2/st
      +mkdir gromet.conf
      +
      +
      +
    8. +
    9. +

      Place the README file in the directory. A pointer to an example +file and a listing of it are provided in the appendix +README file.

      +
    10. +
    11. +

      Copy the default gromet.service, and gromet.yml files into the +directory.

      +
      +
      +
      cd /usr2/st/gromet
      +cp gromet.service gromet.yml ../gromet.conf
      +
      +
      +
    12. +
    +
    +
  6. +
  7. +

    As oper setup /usr2/control/gromet.yml:

    +
    +
      +
    1. +

      Copy file to /usr2/control:

      +
      +
      +
      cd /usr2/control
      +cp /usr2/st/gromet.conf/gromet.yml .
      +
      +
      +
    2. +
    3. +

      Change the listen_address as needed. Typically, 127.0.0.1:50001 +would be used to serve met. data to the local host. All clients on the +local host should use the same address to connect to gromet. To +server data to the network, use the host alias for this machine from +/etc/hosts in place of 127.0.0.1. In this case, all clients, on +the local host or other hosts, should use an alias that resolves to +this host’s IP address.

      +
      + + + + + +
      +
      Note
      +
      +You may need to adjust any local host and internal site +firewalls to allow devices to access gromet if it is serving to the +network. +
      +
      +
    4. +
    5. +

      Change the hostname/IP (in the address lines before the :10001 +and :10002) for the devices to whatever is required. Usually an +alias (perhaps met) in /etc/hosts would be used.

      +
      + + + + + +
      +
      Note
      +
      +You may need to adjust the internal site firewalls to allow +gromet to access to the Perle server (met). +
      +
      +
    6. +
    7. +

      Change the port numbers to be correct for the Perle converter if +they are not 10001 for the MET4A and 10002 for the wind sensor.

      +
    8. +
    9. +

      If you have a MET3 or MET4 sensor, instead of a MET4A, adjust the +type line accordingly.

      +
    10. +
    +
    +
  8. +
  9. +

    As prog:

    +
    +

    Copy the updated gromet.yml back to the /usr2/st/gromet.conf +directory:

    +
    +
    +
    +
    cp /usr2/control/gromet.yml /usr2/st/gromet.conf
    +
    +
    +
    +

    If it is safe, answer y if prompted to confirm.

    +
    +
  10. +
  11. +

    As root:

    +
    +
      +
    1. +

      Add the alias (perhaps met) for the Perle Etherent converter to /etc/hosts if not already present.

      +
    2. +
    3. +

      If metserver and metclient were previously install, stop their services:

      +
      +
      +
      systemctl stop metclient
      +systemctl stop metserver
      +
      +
      +
    4. +
    5. +

      Move the MET4A and wind sensor serial connections to the serial +connectors on the Perle Ethernet converter.

      +
    6. +
    7. +

      Install gromet as a service on this machine.

      +
      +
      +
      cd /usr2/st/gromet
      +make install
      +
      +
      +
      +

      Answer n to not overwrite gromet.yml if you have already configured it as above.

      +
      +
    8. +
    9. +

      Start the gromet service:

      +
      +
      +
      systemctl start gromet
      +
      +
      +
    10. +
    +
    +
  12. +
+
+
+
+
+
+

6. Testing gromet on fs1

+
+
+
    +
  1. +

    Use the wx command in the FS to verify met. data is still available.

    +
  2. +
  3. +

    Check in grafana on the MAS to verify that the met. data are updating.

    +
  4. +
+
+
+
+
+

7. fs2 installation

+
+
+

Once fs1 has been successfully set-up, the fs2 disks, running in +the spare computer, can be set-up. Do not proceed with this section +until gromet is working on fs1.

+
+
+

7.1. Preparing fs2

+
+

Follow the instructions in the Preparing fs1 step above, but this +time doing them on fs2. Then proceed with the next step below +Changes needed before installing gromet on fs2.

+
+
+
+

7.2. Changes needed before installing gromet on fs2

+
+

For this part of the installation it will be necessary to take some +additional actions:

+
+
+
    +
  1. +

    Terminate the FS on fs1.

    +
  2. +
  3. +

    Stop gromet on fs1, as root:

    +
    +
    +
    systemctl stop gromet
    +
    +
    +
  4. +
+
+
+
+

7.3. Installing gromet on fs2

+
+

Follow the directions in the Installing gromet on fs1 step +above, but this time performing the actions on fs2. Then proceed to +the next section below, Testing gromet on fs2.

+
+
+
+
+
+

8. Testing gromet on fs2

+
+
+

Use the wx command in the FS to verify met. data is still available.

+
+
+
+
+

9. Finishing up

+
+
+

This section covers the actions to follow once gromet has been +tested successfully on both fs1 and fs2.

+
+
+

9.1. Finalizing fs2

+
+
    +
  1. +

    Terminate the FS on fs2.

    +
  2. +
  3. +

    Disable and stop gromet on fs2, as root:

    +
    +
    +
    systemctl disable gromet
    +systemctl stop gromet
    +
    +
    +
  4. +
+
+
+
+

9.2. Finalizing fs1

+
+
    +
  1. +

    Start gromet (and if in use, metclient), and if it was in use, disable metserver +on fs1, as root:

    +
    +
    +
    systemctl start gromet
    +systemctl start metclient
    +systemctl disable metserver
    +
    +
    +
    + + + + + +
    +
    Note
    +
    +Skip the metserver command if it was not in use. Skip the +metclient command if it is not being used. +
    +
    +
  2. +
  3. +

    Reverify the results of the Testing gromet on fs1 section above.

    +
  4. +
+
+
+
+

9.3. Remove go

+
+

Unless you want to keep go installed, use the following command +as root to remove go on both fs1 and fs2:

+
+
+
+
rm -rf /usr/local/go
+
+
+
+
    +
  1. +

    Remove go on fs1.

    +
  2. +
  3. +

    Remove go on fs2.

    +
  4. +
+
+
+
+
+
+

10. Restoring RAIDs

+
+
+

If everything is still working, follow the successful branch in the +recoverable test procedure, to recover the RAIDs on both fs1 and +fs2 at +https://nvi-inc.github.io/fsl10/raid.html#_recoverable_testing to:

+
+
+
    +
  1. +

    Recover the RAID on fs1.

    +
  2. +
  3. +

    Recover the RAID on fs2.

    +
  4. +
+
+
+
+
+

Appendix A: README file

+
+
+

An example can be found in the file README at +https://github.com/nvi-inc/gromet_install. A listing is provided +below.

+
+
+
+
Install
+
+  root:
+  install go with fsadapt
+
+  prog:
+    cd /usr2/st
+    git clone https://github.com/nvi-inc/gromet.git
+    cd gromet
+    make
+
+  root:
+    cd /usr2/st/gromet
+    make install
+
+   oper:
+   update /usr2/control/gromet.yml as needed,
+     recent copy in /usr2/st/gromet.conf
+
+  root:
+    systemctl start gromet
+
+on the spare machine:
+     systemctl disable gromet
+     systemctl stop gromet
+until needed, then:
+     systemctl enable gromet
+     systemctl start gromet
+(and disable/stop on other machine)
+
+
+
+
+
+ + + \ No newline at end of file