Difference between revisions of "Test Lab DAQ test stands"

From Hall A Wiki
Jump to: navigation, search
(Server)
(CODA Installation)
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Server ==
+
== Set up the Server ==
 
* Name: hatestlab1.jlab.org (procured on 2024 April)
 
* Name: hatestlab1.jlab.org (procured on 2024 April)
 +
* Shared account: hatdaq
 
* Roles:
 
* Roles:
# The DHCP server for all the single board computers (SBCs)
 
 
# The TFTP server for SBCs
 
# The TFTP server for SBCs
 
# The NFS server for computers under same LAN
 
# The NFS server for computers under same LAN
* Set up pxeboot (summarized from [https://coda.jlab.org/drupal/system/files/coda/iso/walkthrough/centos7_os_install.html#org887d804 reference])
+
* Set up pxeboot
# Install DHCP and Configure DHCP with two parameters:
+
# Request CC to change the tftp server for the SBUs from "atedf3" to "hatestlab1"
#* next-server IP --- IP address of the TFTP server to boot from
+
# The rest steps are similar to [https://hallcweb.jlab.org/wiki/index.php/Set_up_PXE_boot_VM Set_up_PXE_boot_VM]
#* filename --- path to boot file relative to TFTP root directory<br> Suggested parameters:<br><code>filename "pxelinux.0";</code><br><code>next-server 129.57.xxx.xxx;</code> (hatestlab1)
+
* Home directory for the SBUs
#* DHCP seems to be all managed by CST; only one example at <code>atedf3: /etc/dhcpd.conf~</code>
+
** The home directories for the SBUs are at:
# Install nfs-utils, tftp-server, syslinux-tftpboot, syslinux
+
<pre>
# Download <code>centos7_dist</code> and <code>root, tftp</code> tgz files to the data disk for both VME and VTP
+
hatdaq@hatestlab1:/home/diskless/
# VME boot set up
+
</pre>
## Modify the configuration file <code>centos7_dist/walkthrough_example.cfg</code>
+
** An example account "hatdaq" is created at hatdaq@hatestlab1:/home/diskless/hatdaq
##* NFS path should be under /data. ---- this is where the centos7 x86_64 filesystem will be unpacked
+
*** Need to add "hatdaq" to the SBUs's /etc/passwd file
## Run the installation under <code>centos7_dist/</code>:
+
*** Need to create .ssh directory for ssh-key login
##*<code>./diskless_ROOTOS.sh walkthrough_example.cfg</code><br>This one generates a number of config files for the client OS and provides the installation commands to be run in sequence using sudo or as the root user.
+
*** Need to create .bashrc, .bash_profile
##*<code>./diskless_NFSexports.sh walkthrough_example.cfg</code><br>This script generates the exports files needed for NFS.
+
* Structure of the "hatestlab1" pxeboot:
##*<code>./diskless_PXE-TFTP.sh walkthrough_example.cfg</code><br>This script generates the configuration and installation commands for PXE and TFTP.
+
# Boot images are located at : /tftpboot/linux-install
# VTP boot set up
+
# Boot file systems are located at: /diskless/CentOS7
#*The configuration file is similar to VME boot set up, mostly swapping x86_64 with armv7.
+
# SBU home directory are located at: /home/diskless
#*<code>./diskless_UBOOT.sh walkthrough_vtp_example.cfg</code><br>This script generates the uboot <code>env.bin</code> that needs to be loaded onto the microSD used by the VTP
+
** This is mounted as "home.hatestlab1" at the SBUs, and the SBU home directory is a soft link which is defined under /diskless/CentOS7/x86_64/snapshot/apol1/home
#*Copy the resulting file <code>output/env.bin</code> to the VTPs microSD FAT partition.
+
 
#* VTP modules we received usually have SD card that is already set up
+
== CODA Installation ==
# Enable and start the NFS server and TFTP server
+
* Copy coda/3.10_devel from /site/coda/3.10_devel.
# Boot the VME/VTP
+
* Download coda 3.10_arm from coda website
#* First login: set up <code>daq</code> account
+
* Download coda_scripts from GitHub
 +
 
 +
== Set up the VXS crate ==
 +
=== Set up the CPU ===
 +
# The CPU should be plugged into the slot 01
 +
# Connect the ethernet cable, and a display cable (such as: VGA) to the CPU and power on the crate
 +
# Use a monitor to obtain the MAC address
 +
# Open a ticket at CC: give them the MAC address, a desired hostname, and ask them to set up the pxeboot using "atedf3" as the DHCP server and the TFTP server
 +
# Create the pxelinux configuration under /tftpboot/linux-install/pxelinux.cfg/:
 +
## Get the host ip: <code> gethostip <hostname> </code>
 +
## Make a copy of an existing configuration to the new host ip, for example:
 +
#* <code>gethostip apol1</code> gives: 81392580
 +
#* <code>cp hcvme06 81392580</code>
 +
#* <code>ln -s apol1 81392580</code>
 +
# Create a folder under snapshot/, such as root@atedf3:/data/disk2/diskless/CentOS7/x86_64/snapshot/<hostname>
 +
# Set up the NFS mount: modify root@atedf3:/etc/exports/ to export "*/root/" and "*/snapshot/" to <hostname>
 +
# Restart the nfs service: /etc/init.d/nfs restart ("atedf3" is RHEL6, latest RHEL* would have a different command to restart NFS service)
 +
# Power cycle the crate
 +
# Set up home directory (using amoll11 home directory temporarily)
 +
## cd /data/disk2/home/sbs-onl
 +
## cp -r amoll1 apol1
 +
## cd /data/disk2/diskless/CentOS7/x86_64/snapshot/apol1/home
 +
## ln -s data/disk2/home/sbs-on/apol1 sbs-onl
 +
## modify /etc/exports
 +
## reboot the module
 +
 
 +
=== Set up the VTP ===
 +
# The VTP should be plugged into the slot 11
 +
# The VTP from Ben usually has boot env.bin loaded. We need to change the environment variables accordingly. Use "apolvtp1" as an example:
 +
## Connect the serial cable to a computer, and run "screen /dev/ttyUSB0 115200" (if it's Linux)
 +
## Power on the crate, then you will see the VTP output at the screen session
 +
## At the screen session, run "printenv" to display all the environment variables
 +
## Use "setenv" and "saveenv" to adjust the environment variables accordingly
 +
## Open a ticket at CC to request an IP and hostname for the given VTP MAC address. It should be under the same LAN as "atedf3", and set the VTP to be booted from "atedf3"
 +
## Create a folder under snapshot/, such as root@atedf3:/data/disk2/diskless/arm7/snapshot/apolvtp1
 +
## Set up the NFS mount: modify root@atedf3:/etc/exports/ to export "*/root/" and "*/snapshot/" to "apolvtp1"
 +
## Restart the nfs service: /etc/init.d/nfs restart ("atedf3" is RHEL6, latest RHEL* would have a different command to restart NFS service)
 +
## Power cycle the crate.
 +
# Set up home directory (using havtp1 home directory temporarily)
 +
## cd /data/disk2/home/sbs-onl
 +
## cp -r havtp1 apolvtp1
 +
## cd /data/disk2/diskless/CentOS7/armv7/snapshot/apolvtp1/home
 +
## ln -s data/disk2/home/sbs-on/apolvtp1 sbs-onl
 +
## modify /etc/exports
 +
## reboot the module

Latest revision as of 15:50, 20 August 2024

Set up the Server

  • Name: hatestlab1.jlab.org (procured on 2024 April)
  • Shared account: hatdaq
  • Roles:
  1. The TFTP server for SBCs
  2. The NFS server for computers under same LAN
  • Set up pxeboot
  1. Request CC to change the tftp server for the SBUs from "atedf3" to "hatestlab1"
  2. The rest steps are similar to Set_up_PXE_boot_VM
  • Home directory for the SBUs
    • The home directories for the SBUs are at:
hatdaq@hatestlab1:/home/diskless/
    • An example account "hatdaq" is created at hatdaq@hatestlab1:/home/diskless/hatdaq
      • Need to add "hatdaq" to the SBUs's /etc/passwd file
      • Need to create .ssh directory for ssh-key login
      • Need to create .bashrc, .bash_profile
  • Structure of the "hatestlab1" pxeboot:
  1. Boot images are located at : /tftpboot/linux-install
  2. Boot file systems are located at: /diskless/CentOS7
  3. SBU home directory are located at: /home/diskless
    • This is mounted as "home.hatestlab1" at the SBUs, and the SBU home directory is a soft link which is defined under /diskless/CentOS7/x86_64/snapshot/apol1/home

CODA Installation

  • Copy coda/3.10_devel from /site/coda/3.10_devel.
  • Download coda 3.10_arm from coda website
  • Download coda_scripts from GitHub

Set up the VXS crate

Set up the CPU

  1. The CPU should be plugged into the slot 01
  2. Connect the ethernet cable, and a display cable (such as: VGA) to the CPU and power on the crate
  3. Use a monitor to obtain the MAC address
  4. Open a ticket at CC: give them the MAC address, a desired hostname, and ask them to set up the pxeboot using "atedf3" as the DHCP server and the TFTP server
  5. Create the pxelinux configuration under /tftpboot/linux-install/pxelinux.cfg/:
    1. Get the host ip: gethostip <hostname>
    2. Make a copy of an existing configuration to the new host ip, for example:
    • gethostip apol1 gives: 81392580
    • cp hcvme06 81392580
    • ln -s apol1 81392580
  6. Create a folder under snapshot/, such as root@atedf3:/data/disk2/diskless/CentOS7/x86_64/snapshot/<hostname>
  7. Set up the NFS mount: modify root@atedf3:/etc/exports/ to export "*/root/" and "*/snapshot/" to <hostname>
  8. Restart the nfs service: /etc/init.d/nfs restart ("atedf3" is RHEL6, latest RHEL* would have a different command to restart NFS service)
  9. Power cycle the crate
  10. Set up home directory (using amoll11 home directory temporarily)
    1. cd /data/disk2/home/sbs-onl
    2. cp -r amoll1 apol1
    3. cd /data/disk2/diskless/CentOS7/x86_64/snapshot/apol1/home
    4. ln -s data/disk2/home/sbs-on/apol1 sbs-onl
    5. modify /etc/exports
    6. reboot the module

Set up the VTP

  1. The VTP should be plugged into the slot 11
  2. The VTP from Ben usually has boot env.bin loaded. We need to change the environment variables accordingly. Use "apolvtp1" as an example:
    1. Connect the serial cable to a computer, and run "screen /dev/ttyUSB0 115200" (if it's Linux)
    2. Power on the crate, then you will see the VTP output at the screen session
    3. At the screen session, run "printenv" to display all the environment variables
    4. Use "setenv" and "saveenv" to adjust the environment variables accordingly
    5. Open a ticket at CC to request an IP and hostname for the given VTP MAC address. It should be under the same LAN as "atedf3", and set the VTP to be booted from "atedf3"
    6. Create a folder under snapshot/, such as root@atedf3:/data/disk2/diskless/arm7/snapshot/apolvtp1
    7. Set up the NFS mount: modify root@atedf3:/etc/exports/ to export "*/root/" and "*/snapshot/" to "apolvtp1"
    8. Restart the nfs service: /etc/init.d/nfs restart ("atedf3" is RHEL6, latest RHEL* would have a different command to restart NFS service)
    9. Power cycle the crate.
  3. Set up home directory (using havtp1 home directory temporarily)
    1. cd /data/disk2/home/sbs-onl
    2. cp -r havtp1 apolvtp1
    3. cd /data/disk2/diskless/CentOS7/armv7/snapshot/apolvtp1/home
    4. ln -s data/disk2/home/sbs-on/apolvtp1 sbs-onl
    5. modify /etc/exports
    6. reboot the module