-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
#Installing Queue-Map Queue Map is a collection of several different scripts, which means placement and configuration is key. There are also a few options available for you to choose from depending on your preferences. Of course the first step is to download this repository, whether its through git or not.
- First, you should view queue_mapd.py in a text editor and configure the file paths for your system.
The files default to be written in the directory that the daemon is running from. If this is not the intended machinations, then you can specify the desired paths. The files start on line 237 in queue_mapd.py.
>Could change to afs/crc.nd.edu/user/j/jdoe/www/index-long.html
>LONG_SAVE_FILE = 'index-long.html'
>DEBUG_SAVE_FILE = 'index-debug.html'
>PENDING_SAVE_FILE = 'pending.html'
>SUB_NODE_FILE = 'sub-index.html'
>LONG_SETUP_FILE = 'long_node_list.html'
>DEBUG_SETUP_FILE = 'debug_node_list.html'
-
Place queue_mapd.py on the front end of your choice. For the beta site at 10.32.11.105, the daemon is on crcfe01.crc.nd.edu.
-
This next step is where there are 2 options to follow. The first method requires sshpass to be installed on the web-server, and uses sshpass to acquire the necessary files that the daemon creates.
Method 1: sshpass
First install sshpass onto the web-server. There is both a Debian package and an RPM package available.
Next, view setup.sh in your favorite text editor and fill in the fields specified.
Once that is done, perform the same actions on grab_queue_files.sh
**NOTE**: This method requires that your password is entered in, both for the CRC and the server root password. The server root password could be circumvented by editing the sudoers file. See [this forum post.](http://askubuntu.com/questions/159007/how-do-i-run-specific-sudo-commands-without-a-password) I recommend changing the permissions of this file to be readable only by you.
Method 2: curl
This method uses an already available web-hosting on the front end to have the files available to just grab from the web. On crcfe01.crc.nd.edu, this uses the /www/ directory in the /home directory of afs.
View the curl_setup.sh script with your favorite text editor and fill in the fields specified.
To get around entering the sudo password for the web-server, see this post.
Next, you should do the same with curl_queue_files.sh, this will be the script that will indefinitely grab files from the front end. -
Now that the scripts are properly configured, the file that is not a setup script (depending on which method is being followed) needs to be added as a cronjob.
Add this line to crontab -e:
*/2 * * * * PATH-TO-DIR/Queue_map/(preferred)_queue_files.sh)
This will run every two minutes to grab files from the front end. -
With everything configured, run the daemon on the front end in the following way:
./queue_mapd.py --setup
This will create files for the nodes which belong to the general access and the debug queues respectively.
Move these files from the front end to your web-server in the directory with the rest of the queue-map files. (scp, sftp, whichever). -
With those files available now, run the xyz_setup.sh script which follows the same method you customized earlier. This setup script will create all of the necessary directories for the web-site.
-
Now I recommend using tmux on the web-server to ssh into the front end, and run the daemon.
./queue_mapd.py &
The '&' allows it to run in the background of your terminal. Where tmux comes in handy, is now you can press
Ctrl + b
thend
This will 'detach' the terminal allowing it to run indefinitely (so the daemon is always running).
This installation is assuming you have a working web-server with Apache (or equivalent) and PHP properly installed.
Page created for v1.0(Testing)