Tech support

From NetSysLab

Jump to: navigation, search

Contents

Testing a FUSE install

Please see this link

SVN Repository

We are trying to keep just one repository for our projects in NetSysLab. You can create a new repository following the step below. If you already have a SVN repository somewhere else, move your project to this new repository. You can just copy previous project's repositories to or some place under /home/svnroot/repositories (if you are copying, skip steps 1 and 3).

Instructions:

1. Create a repository under /home/svnroot/repositories. For example, if I want to create a repository called "myproj-rep" (run the following commands on the sensia machine):

$ cd /home/svnroot/repositories

$ mkdir myproj-rep

$ svnadmin create /home/svnroot/repositories/myproj-rep


2. (Optional) I suggest you copy /home/svnroot/repositories/hookTemplates/post-commit to /home/svnroot/repositories/myproj-rep/hooks . It changes group and permissions for svn server. So, svn server can perform repository operations if you are using svn:// access mode


3. Import the directory you need in the repository using:

$ svn import <your-directory-project> svn://sensia.ece.ubc.ca/myproj-rep -m "<your comment>"

or

$ svn import <your-directory-project> svn+ssh://sensia.ece.ubc.ca/home/svnroot/repositories/myproj-rep -m "<your comment>"

depending if you want to use svn or ssh+svn


4. Checkout the project

$ svn co svn://sensia.ece.ubc.ca/myproj-rep

or

$ svn co svn+ssh://sensia.ece.ubc.ca/home/svnroot/repositories/myproj-rep

depending if you want to use svn or ssh+svn

5. Finally commit your changes

$ svn commit


6. And keep it updated

$ svn update


You can find further details on access configuration at http://svnbook.red-bean.com/en/1.5/svn.serverconfig.svnserve.html#svn.serverconfig.svnserve.auth.general http://svnbook.red-bean.com/en/1.5/svn.serverconfig.svnserve.html#svn.serverconfig.svnserve.sshtricks http://svnbook.red-bean.com/en/1.5/svn.serverconfig.svnserve.html#svn.serverconfig.svnserve.sshauth http://svnbook.red-bean.com/en/1.5/svn.serverconfig.multimethod.html

If you are trying to access repositories outside ECE network, you should create SSH tunnels (see below). You can also consider using www.sourceforge.net .

--Lauro 12:41, 24 November 2008 (PST)


Cron and NTP

Cron is a program that executes commands automatically at a specified moment (time/date). These commands are executed by crond daemon based on cron tables -- crontab. The commands' output are sent to your email. If you do not care about the command output and you do not want to receive any email, redirects the output to /dev/null.

To edit your crontab:

$ crontab -e


The crontab format is:


# *     *   *   *    *  command to be executed
# -     -    -    -    -
# |     |     |     |     |
# |     |     |     |     +----- day of week (0 - 6) (Sunday=0)
# |     |     |     +------- month (1 - 12)
# |     |     +--------- day of month (1 - 31)
# |     +----------- hour (0 - 23)
# +------------- min (0 - 59)

I suggest you copy the lines in the box above to you crontab.

As an example of cron usage, suppose you want to synchronize a machine's clock hourly with some NTP (Network Time Protocol) server. You should have a crontab containing the line below.

0       *       *       *       *       /usr/sbin/ntpdate 3.ca.pool.ntp.org > /dev/null

In this case, crond daemon executes hourly (at every minute 00) the command ntpdate to synchronize the machine's clock with server 3.ca.pool.ntp.org. Note that the following example redirects just the standard output. If some error occurs, the error output will be sent via email.

--Lauro 00:03, 25 November 2008 (PST)


SSH Tunnels

Firewalls block access to NetSysLab machines from out of the UBC. In order to access NetSysLab machines, we access department server via ssh and, then, access NetSysLab nodes.

However, you may want to use some network service (e.g. SVN). In this case, you should create a ssh tunnel from an external machine to a machine at NetSysLab via the department server.

There are a number of tutorials explaining how to create ssh tunnels. A quick description to create ssh tunnels from windows machines can be found at http://www.ece.ubc.ca/~davidb/html/howto-ssh-tunneling.htm . Another description (with some details) can be found at http://www.ibm.com/developerworks/aix/library/au-tunnelingssh/index.html .

If you use a linux box try this:

ssh -L localport:sensia.ece.ubc.ca:22 username@ssh-linux.ece.ubc.ca -N

After that, point your svn client configuration to: svn+ssh://localhost/home/svnroot/repositories/your_project (Remember to use the localport instead of 22)


--Lauro 18:51, 4 December 2008 (PST)


Rietveld Code reviews

1. Create a google account if you do not have one already.

2. Download the upload.py script to the source folder from the link mentioned below.

   http://code.google.com/p/rietveld/wiki/UploadPyUsage

3. Then use following command to send the reviews.

       python upload.py -s [Server name] 
       where Server name = http://codereview-netsyslab.appspot.com

4. The script will ask for your googole login information.

5. At the end, script will provide a URL. Send this URL to all the reviewers.

Actually, It is recommended to follow the URL and include the reviewers' names in the issue. Otherwise, they won't have permission to see the issue. Also it is better to provide enough description with each issue to help the reviewers.

Note: Always create a public/private key pair, so you can avoid typing your password multiple times. Please use "python upload.py -h" for more options.

MediaWiki

1. Creating User Accounts: Change line 140 to true in the wiki settings file: /ubc/ece/home/mr/others/netsys/etc/www/wiki/LocalSettings.php . That will enable the link to create a new account in the login page (which you can access from the main page): http://netsyslab.ece.ubc.ca/wiki/index.php?title=Special:UserLogin&returnto=Networked_Systems_Laboratory


--Emalayan 18:51, 1 January 2011 (PST)