Difference between revisions of "Scheduler"

From CSLabsWiki
Jump to: navigation, search
(Created page with "{{services |ip_addr = 128.153.145.200 |contact_person = Anthony Rinaldo, Jared Dunbar |last_update = 2016/09/29 |host_vm = DubsDot |vm_host = bennu |ser...")
 
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{services
 
{{services
|ip_addr = 128.153.145.200
+
|ip_addr = 128.153.145.213
|contact_person = Anthony Rinaldo, [[user:Jared|Jared Dunbar]]
+
|contact_person = Anthony Rinaldo rinaldaj@clarkson.edu
|last_update = 2016/09/29
+
|last_update = September 2016
|host_vm = [[DubsDot]]
+
|host_vm = [[scheduler]]
|vm_host = [[bennu]]
+
|vm_host = [[hydra]]
 
|services = Scheduler (for scheduling classess)
 
|services = Scheduler (for scheduling classess)
 
|category = Service
 
|category = Service
Line 10: Line 10:
 
}}
 
}}
  
Scheduler is a service on Dubsdot designed to help students make their schedule. It queries the class information from an exported CSV from Peoplesoft.
+
Scheduler is a service designed to help students make their schedule. It queries the class information from an exported CSV from Peoplesoft.
  
It uses the Shiny webapp and runs on port 3001 (which is redirected transparently to scheduler.cosi.clarkson.edu)
+
It uses the Shiny webapp and runs on port 3001 (which is redirected transparently to http://scheduler.cosi.clarkson.edu)
 +
 
 +
=Install=
 +
 
 +
Install Ubuntu 16.04
 +
 
 +
==Install packages==
 +
 
 +
<pre>
 +
sudo apt install r-base apache2
 +
</pre>
 +
 
 +
==Enter R==
 +
 
 +
Enter R and install packages
 +
 
 +
<pre>
 +
R
 +
install.packages("shiny")
 +
install.packages(c("dplyr","gdata"))
 +
</pre>
 +
 
 +
==Configure Apache==
 +
 
 +
<pre>
 +
sudo a2enmod proxy proxy_http proxy_wstunnel rewrite
 +
</pre>
 +
 
 +
edit /etc/apache2/sites-enabled/000-default.conf
 +
 
 +
add these lines between the tags (comment out the document root that exists)
 +
 
 +
<pre>
 +
#DocumentRoot /var/www/html
 +
RewriteEngine on
 +
RewriteCond %{HTTP:Upgrade} =websocket
 +
RewriteRule /(.*) ws://localhost:3001/$1 [P,L]
 +
RewriteCond %{HTTP:Upgrade} !=websocket
 +
RewriteRule /(.*) http://localhost:3001/$1 [P,L]
 +
 +
ProxyPreserveHost on
 +
ProxyPass / http://localhost:3001/
 +
ProxyPassReverse / http://localhost:3001/
 +
</pre>
 +
 
 +
==Start Apache==
 +
 
 +
<pre>
 +
sudo systemctl restart apache2
 +
sudo systemctl status apache2
 +
</pre>
 +
 
 +
==Install Script to run R server==
 +
 
 +
edit /etc/systemd/system/rthing.service
 +
 
 +
<pre>
 +
[Unit]
 +
Description=rthing
 +
 
 +
[Service]
 +
User=rinaldaj
 +
ExecStart=/bin/bash /home/rinaldaj/runMe.sh
 +
 
 +
[Install]
 +
WantedBy=multi-user.target
 +
</pre>
 +
 
 +
enable the script (after setting up the thing)
 +
 
 +
<pre>
 +
systemctl enable rthing
 +
systemctl start rthing
 +
</pre>
 +
 
 +
 
 +
==Updating the list==
 +
Download a new file from [http://internal.clarkson.edu/sas/classes_schedules/class_demand.html demand listing] then convert the file to a csv and save as ps.csv in the folder with the program.
 +
 
 +
Addition: this file may be more directly useful:
 +
 
 +
https://pscs.clarkson.edu/psc/guest/EMPLOYEE/CAMP/c/CU_SELF_SERVICE.CU_SR_CLSS_ENR.GBL?PortalActualURL=https%3a%2f%2fpscs.clarkson.edu%2fpsc%2fguest%2fEMPLOYEE%2fCAMP%2fc%2fCU_SELF_SERVICE.CU_SR_CLSS_ENR.GBL&PortalContentURL=https%3a%2f%2fpscs.clarkson.edu%2fpsc%2fguest%2fEMPLOYEE%2fCAMP%2fc%2fCU_SELF_SERVICE.CU_SR_CLSS_ENR.GBL&PortalContentProvider=CAMP&PortalCRefLabel=Master%20Sched%20Course%20Enrollment&PortalRegistryName=EMPLOYEE&PortalServletURI=https%3a%2f%2fpscs.clarkson.edu%2fpsp%2fguest%2f&PortalURI=https%3a%2f%2fpscs.clarkson.edu%2fpsc%2fguest%2f&PortalHostNode=CAMP&NoCrumbs=yes&PortalKeyStruct=yes

Latest revision as of 00:36, 30 January 2019

Scheduler
IP Address(es): 128.153.145.213
Contact Person: Anthony Rinaldo rinaldaj@clarkson.edu
Last Update: September 2016
VM Host (Physical): hydra
Host VM: scheduler
Services: Scheduler (for scheduling classess)


Scheduler is a service designed to help students make their schedule. It queries the class information from an exported CSV from Peoplesoft.

It uses the Shiny webapp and runs on port 3001 (which is redirected transparently to http://scheduler.cosi.clarkson.edu)

Install

Install Ubuntu 16.04

Install packages

sudo apt install r-base apache2

Enter R

Enter R and install packages

R
install.packages("shiny")
install.packages(c("dplyr","gdata"))

Configure Apache

sudo a2enmod proxy proxy_http proxy_wstunnel rewrite

edit /etc/apache2/sites-enabled/000-default.conf

add these lines between the tags (comment out the document root that exists)

	#DocumentRoot /var/www/html
	RewriteEngine on
	RewriteCond %{HTTP:Upgrade} =websocket
	RewriteRule /(.*)	ws://localhost:3001/$1	[P,L]
	RewriteCond %{HTTP:Upgrade} !=websocket
	RewriteRule /(.*)	http://localhost:3001/$1	[P,L]
	
	ProxyPreserveHost on
	ProxyPass / http://localhost:3001/
	ProxyPassReverse / http://localhost:3001/

Start Apache

sudo systemctl restart apache2
sudo systemctl status apache2

Install Script to run R server

edit /etc/systemd/system/rthing.service

[Unit]
Description=rthing

[Service]
User=rinaldaj
ExecStart=/bin/bash /home/rinaldaj/runMe.sh

[Install]
WantedBy=multi-user.target

enable the script (after setting up the thing)

systemctl enable rthing
systemctl start rthing


Updating the list

Download a new file from demand listing then convert the file to a csv and save as ps.csv in the folder with the program.

Addition: this file may be more directly useful:

https://pscs.clarkson.edu/psc/guest/EMPLOYEE/CAMP/c/CU_SELF_SERVICE.CU_SR_CLSS_ENR.GBL?PortalActualURL=https%3a%2f%2fpscs.clarkson.edu%2fpsc%2fguest%2fEMPLOYEE%2fCAMP%2fc%2fCU_SELF_SERVICE.CU_SR_CLSS_ENR.GBL&PortalContentURL=https%3a%2f%2fpscs.clarkson.edu%2fpsc%2fguest%2fEMPLOYEE%2fCAMP%2fc%2fCU_SELF_SERVICE.CU_SR_CLSS_ENR.GBL&PortalContentProvider=CAMP&PortalCRefLabel=Master%20Sched%20Course%20Enrollment&PortalRegistryName=EMPLOYEE&PortalServletURI=https%3a%2f%2fpscs.clarkson.edu%2fpsp%2fguest%2f&PortalURI=https%3a%2f%2fpscs.clarkson.edu%2fpsc%2fguest%2f&PortalHostNode=CAMP&NoCrumbs=yes&PortalKeyStruct=yes