-
Notifications
You must be signed in to change notification settings - Fork 34
Development and Test System
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.
- 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.
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)
- Create the VM
- 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
NOTE: This assumes you will be using the graphical installer.
- Boot the RHEL or CentOS install image.
- Configure the language, keyboard, storage devices and hostname appropriately.
- Configure the network interface(s) to connect automatically.
- Configure the time, root password, and disk usage appropriately.
- Select the
Minimal
software set for installation. (Make sure to useMinimal
and notMinimal Desktop
or the default, which is described as being minimal.) - Finish the installation and reboot.
- Log in as
root
. yum -y upgrade
poweroff
- 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
-
Linux:
- On the host, enable creation of symbolic links in the shared folder:
VBoxManage setextradata VM-NAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/USER-NAME 1
- Boot the system.
- SSH into the machine as
root
. curl -s -O https://raw.githubusercontent.com/perfsonar/pscheduler/master/scripts/system-prep
- 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. 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.
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
.
- Log in as
root
- 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
cd pscheduler
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
.
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