Changes between Version 79 and Version 80 of telehouse_serial_access


Ignore:
Timestamp:
Feb 15, 2018, 5:05:50 PM (2 years ago)
Author:
Jamie McClelland
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • telehouse_serial_access

    v79 v80  
    77== Serial Console physical setup ==
    88
    9 In the MF/PL Telehouse rack, we have two startech 16-port USB to serial adapters using the FTDI chipset connected to the server `robideau`. These need to be connected to the front USB ports  [ticket:6304 for some reason we do not yet understand]
     9In the MF/PL Telehouse rack, we have two startech 16-port USB to serial adapters using the FTDI chipset connected to the server `robideau`.
    1010
    1111Run:
     
    1717To see the layout.
    1818
    19 The serial consoles of the attached machines are all remotely accessible (to properly-authenticated people), and they are also logged and timestamped.  We are using [http://cmrg.fithhorseman.net/wiki/cereal cereal] to do this cleanly and easily.
     19The serial consoles of the attached machines are all remotely accessible (to properly-authenticated people), and they are also logged and time-stamped.  We are using [http://cmrg.fithhorseman.net/wiki/cereal cereal] to do this cleanly and easily.
    2020
    2121== How to connect ==
     
    4646== Setting up a new console user ==
    4747
    48 To setup a new console user (this is something only admins can do), do the following as `root@robideau`:
     48=== Overview ===
     49
     50To ensure the proper device is connected to the proper path on reboots, we maintain a udev configuration here:
     51
     52/etc/udev/rules.d/z25_persistent_usb_serial.rules
     53
     54A sample entry is:
     55
     56{{{
     57SUBSYSTEMS=="usb", ENV{ID_SERIAL}=="FTDI_FT232R_USB_UART_ST161539",SYMLINK+="ttyUSBmalaka"
     58}}}
     59
     60This means, create a symlink called /dev/ttyUSBmalaka for the device with the serial number "FTDI_FT232R_USB_UART_ST161539"
     61
     62The first step is to figure out which serial number is used by the cable you are using.
     63
     64The second step is to create the right rule the creates a consistent symlink based on that serial number.
     65
     66The third step is to create a cereal-admin entry pointing to the symlink.
     67
     68=== Actual steps ===
     69
     70First, plug your server or device into an un-used port on one of our USB serial adapters.
     71
     72Second, as root run `cereal-admin list` and note all the cereal instance named "test." These are the un-allocated ones.
     73
     74Next, login with the username `pdu-console@console.mayfirst.org`. This user has access to all the un-allocated cereal instances.
     75
     76As `pdu-console`, run `cereal attach <instance>` (replace instance with test0, test4, etc.). Run through all the available instances until you find yours.
     77
     78When you find yours, figure out the mapping. test0 is connected to /dev/ttyUSB0, test4 is /dev/ttyUSB4, etc. Run: `ls -l /dev/serial/by-id/` and figure out which id is pointing to the device that is yours.
     79
     80Then, edit `/etc/udev/rules.d/z25_persistent_usb_serial.rules` - adding a line with your id and a human name.
     81
     82Restart udev and re-trigger creation of symlinks with `systemctl restart udev && udevadm trigger -s tty`.
     83
     84Lasly, to setup a new console user (this is something only admins can do), do the following as `root@robideau`:
    4985
    5086{{{
    5187adduser --disabled-password --gecos='fred console user,,,' fred-console
    52 cereal-admin create fred /dev/ttyUSB8 115200 fred-console fred-console
     88cereal-admin create fred /dev/ttyUSBfred 115200 fred-console fred-console
    5389cereal-admin start fred
    5490}}}