noresm:svnnorstorehowto

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
noresm:svnnorstorehowto [2014-12-19 10:11:47]
ingo.bethke@gmail.com
noresm:svnnorstorehowto [2022-05-31 09:29:32] (current)
Line 1: Line 1:
-====== Subversion how-to on NorStore ======+====== Subversion how-to for NorStore ======
  
 ===== How it works ===== ===== How it works =====
  
-NorStore uses the [[http://svnbook.red-bean.com/en/1.7/svn.serverconfig.choosing.html#svn.serverconfig.choosing.svnserve|svnserve]] server solution to connect local svn repositories to the internet+NorStore uses the [[http://svnbook.red-bean.com/en/1.7/svn.serverconfig.choosing.html#svn.serverconfig.choosing.svnserve|svnserve]] server solution to take local svn repositories online
  
-For every new repository, an svnmerge demon is started as background process on the NorStore node noresg.norstore.uio.no. The svn repository recieves the URL <nowiki>svn://noresg.norstore.uio.no/<repository name></nowiki>  +On the NorStore node ''noresg.norstore.no'', a svnmerge demon is running as a background process. The demon serves repositories that are stored in NorStore's project work space in ''/projects/NS2345K/svn''. The svn repositories each receive an URL of form <nowiki>svn://noresg.norstore.no/<repository name></nowiki>   
  
 ===== Prerequisites ===== ===== Prerequisites =====
  
-To administer svn repositories on NorStorefollowing prerequisites must be fulfilled:   +To create and manage a repository, you need a user account at NorStore which is member of the ns2345k project.  
-  * you must have a user account at NorStore +      
-  * your NorStore user account must be member in the ns2345k group  +The creator of a repository has the full flexibility to grant remote read/write access to external users. Once the repository is create, the use of the repository does not require a NorStore account. The repository creator can define svn users (consisting of a user-name with corresponding password) which in general have no relation to NorStore user accounts.       
-  your NorStore user account must have access to noresg.norstore.uio.no + 
-   +To start and stop the svn server, your NorStore user must in addition have access to noresg.norstore.no. Currently, this group contains following people: Alf Grini, Ingo Bethke, Thierry Toutain and Martin King. 
-Users that fulfill these prerequisites can take local ns2345k repositories stored in (<wiki>/projects/NN2345K/svn</nowiki>) online/offline and have the full flexibility to grant read/write access for NorStore svn repositories to external users (i.e., the normal use of the repositories does not require NorStore account)    + 
 +===== Start/stop server  ===== 
 + 
 +Log on to ''noresg.norstore.no'' via ssh.  
 + 
 +To take all svn repositories online, do  
 +  svnserve -d -r /projects/NS2345K/svn --log-file /projects/NS2345K/svn/svnserve.log --pid-file /projects/NS2345K/svn/svnserve.pid 
 + 
 +An svnserve demon has now been started as background process on noresg.norstore.no. The process id is logged in ''/projects/NS2345K/svn/svnserve.pid''.  
 + 
 +To take all repositories offline again, do  
 +  kill `cat /projects/NS2345K/svn/svnserve.pid`
  
 ===== Creating a new repository ===== ===== Creating a new repository =====
Line 24: Line 35:
 Create a new svn repository with  Create a new svn repository with 
   svnadmin create testrepo   svnadmin create testrepo
-where ''testrepo'' is to be replaced with name of your choice.  +where ''testrepo'' is to be replaced with the repository name.  
  
-The new repository is now set up in ''/projects/NS2345K/svn/testrepo''.+The new repository is now set up in ''/projects/NS2345K/svn/testrepo''
  
 ===== Customizing access rights ===== ===== Customizing access rights =====
  
-Edit ''testrepo/conf/svnserve.conf'' for general customisation of access rights. The default is read/write access for authenticated users and no access for anonymous. +Edit ''testrepo/conf/svnserve.conf'' for general customisation of access rights. Important: Make sure to remove all leading blanks when activating an option.  
 + 
 +The default is read/write access for authenticated users and no access for anonymous. 
  
 To limited access to read for authenticated users, change    To limited access to read for authenticated users, change   
Line 42: Line 55:
   anon-access = read   anon-access = read
      
-**IMPORTANT**: Make sure to remove all leading blanks when activating an option.  
- 
 The users of the repository are defined in ''testrepo/conf/passwd'' with user name and password, e.g.  The users of the repository are defined in ''testrepo/conf/passwd'' with user name and password, e.g. 
   [users]   [users]
Line 49: Line 60:
   sally = sallyssecret   sally = sallyssecret
   guestuser = friendly   guestuser = friendly
 +The user customisation is activated in ''svnserve.conf'' by uncommenting 
 +  # password-db = passwd
 +to
 +  password-db = passwd
  
 Further fine tuning of access rights can be done in ''testrepo/conf/authz''. E.g.,  Further fine tuning of access rights can be done in ''testrepo/conf/authz''. E.g., 
-  [/projects/NS2345K/svn/svntestingo]+  [/] 
 +  harry = rw 
   guestuser = r   guestuser = r
-limits the access of the user ''guest-user'' to read access.  +gives ''harry'' read/write access but limits the access of ''guestuser'' to read-only. The ''authz'' customisation is activated in ''svnserve.conf'' by uncommenting  
 +  # authz-db = authz 
 +to 
 +  authz-db = authz 
 +        
 +===== Remote access =====  
 + 
 +After taking the repository online, the URL of the repository ''testrepo'' is <nowiki> svn://noresg.norstore.no/testrepo </nowiki>  
 + 
 +To checkout the repository, do  
 +  svn co svn://noresg.norstore.no/testrepo 
 +   
 +Change directory to ''testrepo''  
 +  cd testrepo  
 +   
 +Create a dummy file and mark it for adding   
 +  echo test > README  
 +  svn add README  
 + 
 +Commit the repository  
 +  svn commit -m "my commit message"        
 +  
  • noresm/svnnorstorehowto.1418983907.txt.gz
  • Last modified: 2022-05-31 09:23:24
  • (external edit)