Make your own virtual space: Difference between revisions

From genomewiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 6: Line 6:
This includes, among other things, adding a block to the file /usr/local/apache/conf/httpd.conf  
This includes, among other things, adding a block to the file /usr/local/apache/conf/httpd.conf  


  <VirtualHost 128.114.50.189>
  <VirtualHost 128.114.xx.yyy>
   ServerName hgwdev-kayla.cse.ucsc.edu
   ServerName hgwdev-myusername.cse.ucsc.edu
   ServerAlias hgwdev-kayla
   ServerAlias hgwdev-myusername
   ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin-kayla/"
   ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin-myusername/"
  </VirtualHost>
  </VirtualHost>


Line 15: Line 15:
====Populate my /usr/local/apache/cgi-bin-kayla/ directory for the first time by doing the following:====
====Populate my /usr/local/apache/cgi-bin-kayla/ directory for the first time by doing the following:====


From my home directory on hgwdev /cluster/home/kayla I type the following things:
From my home directory on hgwdev /cluster/home/myusername I type the following things:


  [kayla@hgwdev ~]$cd kent
  [myusername@hgwdev ~]$cd kent
  [kayla@hgwdev ~/kent]$ cvsup
  [myusername@hgwdev ~/kent]$ cvsup
  [kayla@hgwdev ~/kent]$ cd src
  [myusername@hgwdev ~/kent]$ cd src
  [kayla@hgwdev src]$ make libs
  [myusername@hgwdev src]$ make libs
  [kayla@hgwdev src]$ cd hg
  [myusername@hgwdev src]$ cd hg
  [kayla@hgwdev hg]$ make cgi
  [myusername@hgwdev hg]$ make cgi
  [kayla@hgwdev hg]$ cd makeDb/trackDb
  [myusername@hgwdev hg]$ cd makeDb/trackDb
  [kayla@hgwdev trackDb]$ make update
  [myusername@hgwdev trackDb]$ make update


I now have my own compiled version of the cgis.   
I now have my own compiled version of the cgis.   




====Edit my /usr/local/apache.cgi-bin-kayla/hg.conf:====  
====Edit my /usr/local/apache.cgi-bin-myusername/hg.conf:====  


*You can copy this file from another user, but make sure to replace their name with your name in the appropriate (4) places.   
*You can copy this file from another user, but make sure to replace their name with your name in the appropriate (4) places.   
*Pay attention to the following lines (they will need to be edited or added):
*Pay attention to the following lines (they will need to be edited or added):
  central.host=localhost
  central.host=localhost
  central.domain=hgwdev-kayla.cse.ucsc.edu
  central.domain=hgwdev-myusername.cse.ucsc.edu
  central.cookie=hguid.hgwdev-kayla
  central.cookie=hguid.hgwdev-myusername
  backupcentral.domain=hgwdev-kayla.ucsc.edu  
  backupcentral.domain=hgwdev-myusername.ucsc.edu  
*Also play with the line:
*Also play with the line:
  browser.background=/images/floret.jpg to change what background your browser displays.   
  browser.background=/images/floret.jpg to change what background your browser displays.   
Line 43: Line 43:
====Keep it current:====
====Keep it current:====


Here is a script (makeBinaries.csh) that you can copy and paste into your ~kayla/bin directory to make your binaries every night:
Here is a script (makeBinaries.csh) that you can copy and paste into your ~myusername/bin directory to make your binaries every night:


  #!/bin/tcsh
  #!/bin/tcsh
Line 54: Line 54:
  make clean > dev/null
  make clean > dev/null
  cd ~/kent
  cd ~/kent
  /cluster/bin/scripts/cvsup | mail -s 'CVS update report on kent tree' kayla
  /cluster/bin/scripts/cvsup | mail -s 'CVS update report on kent tree' myusername
  cd ~/kent/src
  cd ~/kent/src
  make libs
  make libs

Revision as of 20:39, 19 March 2008

So you want to have your own copies of the binaries and your own hgwdev-user.cse.ucsc.edu browser? Here is a walkthrough:

Request a "virtual space" from the cluster-admins:

This includes, among other things, adding a block to the file /usr/local/apache/conf/httpd.conf

<VirtualHost 128.114.xx.yyy>
 ServerName hgwdev-myusername.cse.ucsc.edu
 ServerAlias hgwdev-myusername
 ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin-myusername/"
</VirtualHost>


Populate my /usr/local/apache/cgi-bin-kayla/ directory for the first time by doing the following:

From my home directory on hgwdev /cluster/home/myusername I type the following things:

[myusername@hgwdev ~]$cd kent
[myusername@hgwdev ~/kent]$ cvsup
[myusername@hgwdev ~/kent]$ cd src
[myusername@hgwdev src]$ make libs
[myusername@hgwdev src]$ cd hg
[myusername@hgwdev hg]$ make cgi
[myusername@hgwdev hg]$ cd makeDb/trackDb
[myusername@hgwdev trackDb]$ make update

I now have my own compiled version of the cgis.


Edit my /usr/local/apache.cgi-bin-myusername/hg.conf:

  • You can copy this file from another user, but make sure to replace their name with your name in the appropriate (4) places.
  • Pay attention to the following lines (they will need to be edited or added):
central.host=localhost
central.domain=hgwdev-myusername.cse.ucsc.edu
central.cookie=hguid.hgwdev-myusername
backupcentral.domain=hgwdev-myusername.ucsc.edu 
  • Also play with the line:
browser.background=/images/floret.jpg to change what background your browser displays.  
  • here is a generic [image:floret.jpg] file you can download and edit.

Keep it current:

Here is a script (makeBinaries.csh) that you can copy and paste into your ~myusername/bin directory to make your binaries every night:

#!/bin/tcsh

if ($HOST != hgwdev) then
  echo "\n  this must be run from hgwdev!\n"
endif

cd ~/kent/src
make clean > dev/null
cd ~/kent
/cluster/bin/scripts/cvsup | mail -s 'CVS update report on kent tree' myusername
cd ~/kent/src
make libs
cd ~/kent/src/hg
make cgi
cd ~/kent/src/hg/makeDb/trackDb
make update

Automate it:

Create a crontab file. Note that you may have numerous crontab files. Each machine that you want cron jobs running on will need its own crontab file (assuming the jobs are different). Example, name your crontab file: hgwdev.cron for your hgwdev crontab. With your editor, add a line to your crontab file to run the command at the time you desire. For example, to run your daily build at 04:42 every weekday, the line would read:

42 04 * * 1-5 bin/dailyBuild.sh

See also: 'man 5 crontab' for a description of the fields used in these crontab lines.

When you crontab file is set correctly, hand it off to the cron system with the command:

$ crontab <yourCrontabFile>

Example: 'crontab hgwdev.cron'

To see what you have submitted to the cron system, ask it to display what it knows about your cron jobs with the -l argument:

$ crontab -l

Cron job tips: It is better to not run your jobs exactly at the top of the hour. They would be competing with system cron jobs that are running at times like the top of the hour. Better to run your job at odd minutes during the hour. Don't use the example time listed here, otherwise everyone's job will be running at 04:42 every day and competing with each other.

Any output to stdout or stderr by your cron job will be emailed to you via the cron system as it runs your job. If you would rather not see that output in email, construct your cron job shell script in such a way that it takes care of all of its stdout and stderr output. For example, it could create an organized by date hierarchy of log files for its output.