Difference between revisions of "Adding a new cvmfs repository"

From PDP/Grid Wiki
Jump to navigationJump to search
(Created page with "This article is under development. Stratum-0: * Create new repo: cvmfs_server mkfs -w http://mesthoop.nikhef.nl/cvmfs/my.repo.fqdn -o cvmfs my.repo.fqdn f * Populate repo: ...")
 
Line 5: Line 5:
 
* Create new repo:
 
* Create new repo:
 
  cvmfs_server mkfs -w http://mesthoop.nikhef.nl/cvmfs/my.repo.fqdn -o cvmfs my.repo.fqdn
 
  cvmfs_server mkfs -w http://mesthoop.nikhef.nl/cvmfs/my.repo.fqdn -o cvmfs my.repo.fqdn
f
+
 
 
* Populate repo:
 
* Populate repo:
 
  cvmfs_server transaction my.repo.fqdn
 
  cvmfs_server transaction my.repo.fqdn
Line 16: Line 16:
 
* Enable replication to Stratum-1:
 
* Enable replication to Stratum-1:
 
  cvmfs_server alterfs -m on my.repo.fqdn
 
  cvmfs_server alterfs -m on my.repo.fqdn
 
 
 
  
  
Line 32: Line 29:
 
or
 
or
 
   cvmfs_server snapshot my.repo.fqdn
 
   cvmfs_server snapshot my.repo.fqdn
 
  
  
Line 40: Line 36:
  
 
* Install config for new repo:
 
* Install config for new repo:
 
+
# cat /etc/cvmfs/config.d/my.repo.fqdn.conf  
# cat /etc/cvmfs/config.d/my.repo.fqdn.conf  
+
CVMFS_PUBLIC_KEY=/etc/cvmfs/keys/my.repo.fqdn.pub
CVMFS_PUBLIC_KEY=/etc/cvmfs/keys/my.repo.fqdn.pub
+
CVMFS_SERVER_URL=http://<STRATUM-1>/cvmfs/@fqrn@/
CVMFS_SERVER_URL=http://<STRATUM-1>/cvmfs/@fqrn@/
 

Revision as of 14:55, 11 October 2013

This article is under development.

Stratum-0:

  • Create new repo:
cvmfs_server mkfs -w http://mesthoop.nikhef.nl/cvmfs/my.repo.fqdn -o cvmfs my.repo.fqdn
  • Populate repo:
cvmfs_server transaction my.repo.fqdn
rsync -av <SRCDIR> /cvmfs/my.repo.fqdn/
cvmfs_server publish my.repo.fqdn

(or to abort:)

cvmfs_server abort my.repo.fqdn
  • Enable replication to Stratum-1:
cvmfs_server alterfs -m on my.repo.fqdn


Stratum-1:

  • Add the pub key of the new repo to /etc/cvmfs/keys/my.repo.fqdn.pub
  • Add the repo:
 cvmfs_server add-replica http://<STRATUM-0>/cvmfs/my.repo.fqdn /etc/cvmfs/keys/my.repo.fqdn.pub
  • To synchronize:
/usr/local/sbin/cvmfs-stratum1-synchronize.sh

or

 cvmfs_server snapshot my.repo.fqdn


Client:

  • Add the pub key of the new repo to /etc/cvmfs/keys/my.repo.fqdn.pub
  • Install config for new repo:
# cat /etc/cvmfs/config.d/my.repo.fqdn.conf 
CVMFS_PUBLIC_KEY=/etc/cvmfs/keys/my.repo.fqdn.pub
CVMFS_SERVER_URL=http://<STRATUM-1>/cvmfs/@fqrn@/