Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit 5e3501f8 authored by Fabio Hernandez's avatar Fabio Hernandez
Browse files

Document how to develop against the stack using the binary distribution

parent d5112662
# Advanced usage
This document presents detailed instructions on using the LSST binary distribution for more advanced use cases.
### How to develop your own package on top of the LSST stack
If you need to develop your own software package which depends on other packages already present on the LSST stack, or need to modify an existing package, you can proceed as presented below.
First, you need to instruct EUPS to use a database on your `$HOME` directory, in addition to the database already included in the binary distribution of the LSST stack. Let's say you are using `$HOME/eups` for this purpose. For setting up your environment (this is a one-time process) do:
* Create the EUPS database:
```bash
$ mkdir -p $HOME/eups/ups_db
```
* Initialize the environment variable EUPS_PATH. Add to your shell profile:
```bash
export EUPS_PATH=$HOME/eups
```
* Each time you want to work with a particular version of the stack do:
```bash
$ source /cvmfs/lsst.in2p3.fr/software/x86_64-slc6/lsst-v9.2/loadLSST.sh
```
You may want to add this line to your shell profile.
Once your environment is ready, you can start developing against the stack. Let's say you want to improve one of the packages of the stack, namely, `obs_cfht`, and your work is kept on a particular branch. You need first to checkout the relevant branch and instruct EUPS to use that package:
* Clone the package into your `$HOME` directory:
```bash
$ cd $HOME
$ git clone git@git.lsstcorp.org:LSST/DMS/obs_cfht.git -b tickets/DM-1380`
$ cd obs_cfht
```
* EUPS setup and build the package you just cloned
```bash
$ setup -k -r .
$ scons opt=3
```
* EUPS declare this package (`obs_cfht`) and its version (`my_obs_cfht`)
```bash
$ eups declare -r . obs_cfht my_obs_cfht
```
* From now on, you are using your own version of `obs_cfht`. If you want to verify, do:
```bash
$ eups list | grep obs_cfht
```
* If you don't want to use your private version any longer (perhaps, your modifications were merged into master), you can tell EUPS so:
```bash
$ eups undeclare obs_cfht my_obs_cfht
```
*Acknowledgements: thanks to Dominique Boutigny for providing this use case and helping validating the solution.*
## Doesn't work for you? Do you have a different use case not covered here?
If this document did not solve your problem or you have a use case not covered here let us know by [opening an issue](https://github.com/airnandez/lsst-cvmfs/issues).
\ No newline at end of file
# Introduction
This document provides the steb-by-step instructions to configure your computer to use the binary distribution of the [LSST](http://www.lsst.org) software stack using [CernVM FS](http://cernvm.cern.ch/portal/filesystem).
CERN's CernVM FS is a software component which allow you to mount (in read-only mode) a remote software repository, which will appear to your computer as if the software was locally installed. At [CC-IN2P3](http://cc.in2p3.fr) we prepared a binary distribution of LSST stack to be used through CernVM FS. You will find below the procedure for installing CernVM FS and configuring it to use LSST software.
CERN's CernVM FS is a software component which allow you to mount, in **read-only mode** a remote software repository, which will appear to your computer as if the software was locally installed. At [CC-IN2P3](http://cc.in2p3.fr) we prepared a binary distribution of LSST stack to be used through CernVM FS. You will find below the procedure for installing CernVM FS and configuring it to use the binary LSST software repository.
Context and perspectives about this work can be found in [this presentation](https://speakerdeck.com/airnandez/experimenting-with-cernvm-fs-for-distributing-lsst-software).
......@@ -53,7 +53,7 @@ The configuration of CernVM FS client to use the binary distribution of LSST sof
* Create file `/etc/cvmfs/keys/lsst.in2p3.fr.pub`:
$ cat > /etc/cvmfs/keys/lsst.in2p3.fr.pub <<-EOF
# cat > /etc/cvmfs/keys/lsst.in2p3.fr.pub <<-EOF
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxpOBi4YSHya9NLFyjwko
1QGO0cEbcN6JKMht8bfqUOsH/gdov8sUIlZ3XOzAqwHmb/F76QbtaftDXrJqwCXF
......@@ -69,7 +69,7 @@ The configuration of CernVM FS client to use the binary distribution of LSST sof
* Create the file `/etc/cvmfs/default.local`:
$ cat > /etc/cvmfs/default.local <<-EOF
# cat > /etc/cvmfs/default.local <<-EOF
CVMFS_REPOSITORIES=lsst.in2p3.fr
CVMFS_QUOTA_LIMIT=20000
# Default cache directory is '/var/lib/cvmfs' but you can change it by uncommenting
......@@ -85,10 +85,10 @@ The configuration of CernVM FS client to use the binary distribution of LSST sof
* Create file `/etc/cvmfs/config.d/lsst.in2p3.fr.conf`:
$ cat > /etc/cvmfs/config.d/lsst.in2p3.fr.conf <<-EOF
CVMFS_SERVER_URL=http://cccrnvmfs01.in2p3.fr/cvmfs/lsst.in2p3.fr
# cat > /etc/cvmfs/config.d/lsst.in2p3.fr.conf <<-EOF
CVMFS_SERVER_URL="http://cccrnvmfs01.in2p3.fr/cvmfs/lsst.in2p3.fr"
CVMFS_HTTP_PROXY="http://cctbcrnvmfsli01.in2p3.fr:3128"
CVMFS_PUBLIC_KEY=/etc/cvmfs/keys/lsst.in2p3.fr.pub
CVMFS_PUBLIC_KEY="/etc/cvmfs/keys/lsst.in2p3.fr.pub"
EOF
* Set the permissions of the files created in the previous steps:
......@@ -124,7 +124,11 @@ In order to use the LSST software stack, you need to setup your environment for
$ cd /cvmfs/lsst.in2p3.fr/software/x86_64-slc6/lsst-v9.2
$ source loadLSST.sh
Next you can test run the LSST demo, as documented [here](https://confluence.lsstcorp.org/display/LSWUG/Testing+the+Installation).
Note that you don't need super-user privileges to use this distribution of the LSST software. For testing your installation you can run the LSST demo, as documented [here](https://confluence.lsstcorp.org/display/LSWUG/Testing+the+Installation).
# Advanced usage
Details on how to use this distribution mechanism for more advanced use cases are provided in the [Advanced Usage](AdvancedUsage.md) document. There you will find details on how you can develop your own software package which depends on other packages already present in the binary distribution.
# Troubleshooting
Please note that in order for this distribution mechanism to work for you, you need your machine to be connected to the network and able to contact CC-IN2P3 server. To check this is the case please do:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment