Skip to content

Development and Test System

Mark Feit edited this page May 13, 2019 · 10 revisions

Introduction

Development and test are supported on Red Hat Enterprise Linux and CentOS version 7.x.

NOTE: This procedure is intended to produce a standalone development environment for pScheduler and should not be done on an existing perfSONAR system.

NOTE: This procedure includes instructions for making use of special features available in VirtualBox. If you are not using VirtualBox, these steps can be skipped.

System Reqirements

  • 64-bit Intel CPU
    • Any architecture that can run RHEL or CentOS should work, but development and testing has been done on Intel.
  • 2 GiB DRAM
  • 8 GB disk
  • Network connection which can reach the Internet, specifically GitHub, the PostgreSQL YUM repository at http://download.postgresql.org and a RHEL or CentOS mirror.

Building a Development/Test System

Preparing a VirtualBox VM

Before creating a VM, collect the following information, which will be substituted in commands shown during the installation process:

  • VM-NAME - The name of your VirtualBox guest (e.g., pscdev)
  • USER-NAME - The name of your user account on the host (e.g., bob)
  • HOME-DIRECTORY - The path to your home directory on the host (e.g., /home/bob or $HOME in most cases)
  1. Create the VM
  2. If you plan to make your home directory on the host available on the guest:
  • VBoxManage sharedfolder add VM-NAME -name USER-NAME -hostpath HOME-DIRECTORY

Install the Operating System

NOTE: This assumes you will be using the graphical installer.

  1. Boot the RHEL or CentOS install image.
  2. Configure the language, keyboard, storage devices and hostname appropriately.
  3. Configure the network interface(s) to connect automatically.
  4. Configure the time, root password, and disk usage appropriately.
  5. Select the Minimal software set for installation. (Make sure to use Minimal and not Minimal Desktop or the default, which is described as being minimal.)
  6. Finish the installation and reboot.
  7. Log in as root.
  8. yum -y upgrade
  9. poweroff
  10. For VirtualBox guests on Linux or OS X where you wish to have your account and home directory available:
  • On the host, attach the VirtualBox Guest Additions CD image using one of the following commands:
    • Linux: VBoxManage storageattach VM-NAME --storagectl "IDE" --port 1 --device 0 --type dvddrive --medium /usr/share/virtualbox/VBoxGuestAdditions.iso
    • OS X: VBoxManage storageattach VM-NAME --storagectl "IDE" --port 1 --device 0 --type dvddrive --medium /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
  • On the host, enable creation of symbolic links in the shared folder:
    • VBoxManage setextradata VM-NAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/USER-NAME 1

Get the pScheduler Sources and Prepare the System

  1. Boot the system.
  2. SSH into the machine as root.
  3. curl -s -O https://raw.githubusercontent.com/perfsonar/pscheduler/master/scripts/system-prep
  4. For VirtualBox guests on Linux or OS X where you wish to have your account and home directory available, edit system-prep and uncomment and configure the four environment variables at the top.
  5. sh ./system-prep

If the system is a virtual machine, this is a good point to create a snapshot or export it as an appliance.

Build and Install pScheduler

pScheduler is divided into multiple packages, some of which have dependencies on others and each must be installed after being built. You should, therefore, consider the build/development system expendable and not do development on a production system.

Other than the installation of finished packages, the build process does not produce by-products outside of the source directories.

Once you have a system configured as described above, build and install pScheduler by doing the following:

NOTE: There are some (temporary) dependency problems with the TWAMP tools that will cause builds to fail. You can avoid these problems by editing scripts/RPM-BUILD-ORDER.m4 and commenting out the pscheduler-tool-twping line before running make.

  1. Log in as root
  2. Clone the sources from GitHub using whichever is appropriate:
  • git clone https://github.com/perfsonar/pscheduler.git
  • git clone git@github.com:perfsonar/pscheduler.git
  1. cd pscheduler
  2. make

Everything needed for pScheduler will be built and started on installation and subsequent system boots.

The effects of the installation or a failed build can be un-done with make uninstall. That plus a clean build can be done with make fresh.

Test the Installed System

A few brief tests can be run from the command line to make sure pScheduler is functioning properly:

# pscheduler task idle --duration PT5S
Task URL:
https://hostname/pscheduler/tasks/19b7b6e6-359e-4fde-9369-1f74aae4d503
Fetching first run...

Next run:
https://hostname/pscheduler/tasks/19b7b6e6-359e-4fde-9369-1f74aae4d503/runs/654f2910-c41a-4dd1-8f88-49e717ed4a75
Starts 2016-08-24T09:03:03-04:00 (~8 seconds)
Ends   2016-08-24T09:03:08-04:00 (~4 seconds)

Duration ... PT5S
# pscheduler task rtt --dest www.perfsonar.net
Task URL:
https://hostname/pscheduler/tasks/715e7b0e-2d4b-4fe8-a28b-7aba7d67680c
Fetching first run...

Next run:
https://hostname/pscheduler/tasks/715e7b0e-2d4b-4fe8-a28b-7aba7d67680c/runs/3dd4c392-ead2-405e-92a7-f56b26dcf769
Starts 2016-08-24T09:05:26-04:00 (~8 seconds)
Ends   2016-08-24T09:05:37-04:00 (~10 seconds)

1	internet2.edu. (207.75.164.248)  64 Bytes  TTL 63  RTT  32.5000 ms
2	internet2.edu. (207.75.164.248)  64 Bytes  TTL 63  RTT  33.0000 ms
3	internet2.edu. (207.75.164.248)  64 Bytes  TTL 63  RTT  31.8000 ms
4	internet2.edu. (207.75.164.248)  64 Bytes  TTL 63  RTT  32.6000 ms
5	internet2.edu. (207.75.164.248)  64 Bytes  TTL 63  RTT  33.9000 ms

0% Packet Loss  RTT Min/Mean/Max/StdDev = 31.862000/32.790000/33.969000/0.730000 ms
# pscheduler task trace --dest www.perfsonar.net
Task URL:
https://dev5/pscheduler/tasks/56597878-f6fa-4a5f-9744-db1ee3bb153c
Fetching first run...

Next run:
https://dev5/pscheduler/tasks/56597878-f6fa-4a5f-9744-db1ee3bb153c/runs/31b71315-bf74-42d9-a355-7127236cbb5c
Starts 2016-08-24T09:06:48-04:00 (~8 seconds)
Ends   2016-08-24T09:06:56-04:00 (~7 seconds)

1	10.0.2.2 0.2 ms
2	gateway.foo.org. (192.168.1.1) 2.3 ms
  ----8<---- TRIMMED FOR BREVITY ----8<----
15	mam-45.merit.edu. (192.122.200.45) AS237 40.5 ms
	  MERIT-AS-14 - Merit Network Inc., US
16	internet2.edu. (207.75.164.248) AS237 39.9 ms communication-administratively-prohibited
	  MERIT-AS-14 - Merit Network Inc., US