Difference between revisions of "A quick guide to CVMFS"
From GridPP Wiki
(Created the page.) |
(Added further instructions to the CVMFS trivial example.) |
||
Line 1: | Line 1: | ||
==Deploying software with CVMFS== | ==Deploying software with CVMFS== | ||
− | For more information about CVMFS | + | For more information about CVMFS at RAL, click [[RAL Tier1 CVMFS|here]]. |
+ | |||
+ | ===Overview of the process=== | ||
+ | |||
+ | # Prepare your working area | ||
+ | # Prepare your software | ||
+ | # Upload your software to the RAL CVMFS repository and deploy it | ||
+ | # Wait a bit... | ||
+ | # Run your CVMFS-powered jobs | ||
===A trivial example=== | ===A trivial example=== | ||
+ | Log in to your machine of choice and create a new working area. | ||
+ | |||
+ | <pre> | ||
+ | $ ssh -Y whyntie@heppc402 | ||
+ | whyntie@heppc402's password: # enter your password here | ||
+ | |||
+ | $ mkdir cvmfstests | ||
+ | $ cd cvmfstests | ||
+ | $ mkdir helloworld | ||
+ | $ cd helloworld | ||
+ | $ pwd | ||
+ | /users/whyntie/cvmfstests/helloworld | ||
+ | </pre> | ||
+ | |||
+ | Create a new directory that will form the basis of your CVMFS tarball. | ||
+ | |||
+ | <pre> | ||
+ | $ mkdir hello-world_001-00-00 | ||
+ | $ cd hello-world_001-00-00 | ||
+ | $ pwd | ||
+ | /users/whyntie/cvmfstests/helloworld/hello-world_001-00-00 | ||
+ | </pre> | ||
+ | |||
+ | Create three files in this directory: | ||
+ | |||
+ | * <code>hello-world.sh</code> - the "software"; | ||
+ | * <code>run.sh</code> - the script that runs the software; | ||
+ | * <code>README.md</code> - for your notes, ideally in the [http://daringfireball.net/projects/markdown/syntax MarkDown] format. | ||
+ | |||
+ | <pre> | ||
+ | $ cat hello-world.sh | ||
+ | #!/bin/bash | ||
+ | # | ||
+ | #============================================================================= | ||
+ | # The GridPP CVMFS Hello World! Script | ||
+ | #============================================================================= | ||
+ | # | ||
+ | # Usage: . hello-world.sh [whoever you want to greet] | ||
+ | # | ||
+ | echo 'Hello' $1'!' | ||
+ | $ | ||
+ | $ | ||
+ | $ cat run.sh | ||
+ | #!/bin/bash | ||
+ | # | ||
+ | #============================================================================= | ||
+ | # The GridPP CVMFS Hello World! run script | ||
+ | #============================================================================= | ||
+ | # | ||
+ | # Usage: . run.sh [full path of the hello-world.sh script] | ||
+ | # | ||
+ | # Note that for grid jobs (or clusters with CVMFS enabled) this will be | ||
+ | # the CVMFS directory. | ||
+ | # | ||
+ | $1/hello-world.sh World | ||
+ | $ | ||
+ | $ | ||
+ | $ cat README.md | ||
+ | My CVMFS Test Notes | ||
+ | =================== | ||
+ | You're keeping detailed notes, right? Good good. | ||
+ | </pre> | ||
+ | |||
+ | Now compress these files into a tarball. | ||
+ | |||
+ | <pre> | ||
+ | $ cd ../ | ||
+ | $ tar -cvf hello-world_001-00-00.tar hello-world_001-00-00 | ||
+ | $ ls | ||
+ | hello-world_001-00-00 hello-world_001-00-00.tar | ||
+ | </pre> | ||
+ | |||
+ | Now upload the tarball to the [https://cvmfs-upload01.gridpp.rl.ac.uk/ RAL CVMFS repository]. You will need your grid certificate installed in your browser in order to access (and be identified). | ||
+ | |||
+ | <pre> | ||
+ | firefox https://cvmfs-upload01.gridpp.rl.ac.uk & | ||
+ | </pre> | ||
==Useful links== | ==Useful links== | ||
* [http://cernvm.cern.ch/portal/ The CERN CVMFS page]. | * [http://cernvm.cern.ch/portal/ The CERN CVMFS page]. |
Revision as of 11:10, 1 May 2014
Contents
Deploying software with CVMFS
For more information about CVMFS at RAL, click here.
Overview of the process
- Prepare your working area
- Prepare your software
- Upload your software to the RAL CVMFS repository and deploy it
- Wait a bit...
- Run your CVMFS-powered jobs
A trivial example
Log in to your machine of choice and create a new working area.
$ ssh -Y whyntie@heppc402 whyntie@heppc402's password: # enter your password here $ mkdir cvmfstests $ cd cvmfstests $ mkdir helloworld $ cd helloworld $ pwd /users/whyntie/cvmfstests/helloworld
Create a new directory that will form the basis of your CVMFS tarball.
$ mkdir hello-world_001-00-00 $ cd hello-world_001-00-00 $ pwd /users/whyntie/cvmfstests/helloworld/hello-world_001-00-00
Create three files in this directory:
-
hello-world.sh
- the "software"; -
run.sh
- the script that runs the software; -
README.md
- for your notes, ideally in the MarkDown format.
$ cat hello-world.sh #!/bin/bash # #============================================================================= # The GridPP CVMFS Hello World! Script #============================================================================= # # Usage: . hello-world.sh [whoever you want to greet] # echo 'Hello' $1'!' $ $ $ cat run.sh #!/bin/bash # #============================================================================= # The GridPP CVMFS Hello World! run script #============================================================================= # # Usage: . run.sh [full path of the hello-world.sh script] # # Note that for grid jobs (or clusters with CVMFS enabled) this will be # the CVMFS directory. # $1/hello-world.sh World $ $ $ cat README.md My CVMFS Test Notes =================== You're keeping detailed notes, right? Good good.
Now compress these files into a tarball.
$ cd ../ $ tar -cvf hello-world_001-00-00.tar hello-world_001-00-00 $ ls hello-world_001-00-00 hello-world_001-00-00.tar
Now upload the tarball to the RAL CVMFS repository. You will need your grid certificate installed in your browser in order to access (and be identified).
firefox https://cvmfs-upload01.gridpp.rl.ac.uk &