README.md 9.36 KB
Newer Older
Fabio Hernandez's avatar
Fabio Hernandez committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# Distribution of LSST software via CernVM FS

## Table of contents

* [Introduction](#introduction)
* [Benefits](#benefits)
* [Installation](#installation)
* [Configuration](#configuration)
* [Usage](#usage)
* [Available releases](#available-releases)
* [Advanced Usage](#advanced-usage)
* [Troubleshooting](#troubleshooting)
* [Frequently Asked Questions](#frequently-asked-questions)
* [Credits](#credits)


## Introduction
18
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).
Fabio Hernandez's avatar
Fabio Hernandez committed
19

20
CERN's CernVM FS is a software component which allow you to mount a remote software repository in **read-only mode**, 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.
Fabio Hernandez's avatar
Fabio Hernandez committed
21

22 23 24
Context and perspectives about this work can be found in [this presentation](https://speakerdeck.com/airnandez/experimenting-with-cernvm-fs-for-distributing-lsst-software).

**WARNING** : *please bear in mind that this work is experimental. Your feedback on how to improve it is very welcome. Scroll to the end of this document to know how you can provide feedback.*
Fabio Hernandez's avatar
Fabio Hernandez committed
25

Fabio Hernandez's avatar
Fabio Hernandez committed
26
## Benefits
Fabio Hernandez's avatar
Fabio Hernandez committed
27 28 29
With this method, you need to install and configure CernVM FS only once. Once this is done, when your computer is connected to the network, you will find the available versions of the LSST software stack under the local directory:

	/cvmfs/lsst.in2p3.fr
30

31
This method of distributing the software is particularly useful for individuals: you don't need to install each official LSST software release from sources on your personal computer, but rather to automatically mount and use the binary distributions prepared for your convenience.
Fabio Hernandez's avatar
Fabio Hernandez committed
32

Fabio Hernandez's avatar
Fabio Hernandez committed
33 34 35 36
The figure below shows the namespace and the releases currently available:

![](namespace.png)

37
Please note that you don't need special privileges to use the LSST software stack distributed this way: any user on a pre-configured computer can use the software. However, in order to install and configure CernVM FS, a one-time process, you need super-user privileges on the target machine.
38

Fabio Hernandez's avatar
Fabio Hernandez committed
39
## Installation
Fabio Hernandez's avatar
Fabio Hernandez committed
40
We have succesfully tested several versions of the LSST software using this installation on MacOS X 10.10 Yosemite, Scientific Linux 6, Scientific Linux 7, CentOS 7 and Ubuntu 14.04. It may work on other Linux distributions as well.
Fabio Hernandez's avatar
Fabio Hernandez committed
41

42
### Installing on Scientific Linux 6 and 7, CentOS 7 (64 bits)
43
To download the software from CERN's repository and install it do:
Fabio Hernandez's avatar
Fabio Hernandez committed
44

45
   	$ cd /tmp
46 47
	$ curl -O https://ecsft.cern.ch/dist/cvmfs/cvmfs-2.1.20/cvmfs-2.1.20-1.el6.x86_64.rpm
	$ curl -O https://ecsft.cern.ch/dist/cvmfs/cvmfs-config/cvmfs-config-default-1.2-2.noarch.rpm
48
	$ sudo yum install --assumeyes ./cvmfs-*.rpm
Fabio Hernandez's avatar
Fabio Hernandez committed
49 50

### Installing on Ubuntu 14.04 (64 bits)
51
Some packages are either necessary or recommended on Ubuntu. To install them do:
Fabio Hernandez's avatar
Fabio Hernandez committed
52

Fabio Hernandez's avatar
Fabio Hernandez committed
53
    $ sudo apt-get install autofs attr gdb git sysv-rc-conf uuid libossp-uuid16
54

55
Download and install CernVM FS:
56

57
    $ cd /tmp
58 59
    $ curl -O https://ecsft.cern.ch/dist/cvmfs/cvmfs-2.1.20/cvmfs_2.1.20_amd64.deb
    $ curl -O https://ecsft.cern.ch/dist/cvmfs/cvmfs-config/cvmfs-config-default_1.1-1_all.deb
60
    $ sudo dpkg -i ./cvmfs_2.1.20_amd64.deb  ./cvmfs-config-default_1.1-1_all.deb
Fabio Hernandez's avatar
Fabio Hernandez committed
61 62
    
*NOTE: this method has been reported to work also on Linux Mint v17.3*
63

Fabio Hernandez's avatar
Fabio Hernandez committed
64 65
### Installing on OS X 10.9 Mavericks, 10.10 Yosemite, 10.11 El Capitan
* Download and install the **latest stable** release of [FUSE for OS X](https://osxfuse.github.io/). This is a dependency of the CernVM FS client.
66

67
* Download and install [the CernVM FS client package](https://ecsft.cern.ch/dist/cvmfs/cvmfs-2.1.20/cvmfs-2.1.20.pkg). Alternatively, you can do it manually if you prefer:
68 69

	```
70 71 72
   	$ cd /tmp
	$ curl -O https://ecsft.cern.ch/dist/cvmfs/cvmfs-2.1.20/cvmfs-2.1.20.pkg
	$ open cvmfs-2.1.20.pkg
73
	```
74

Fabio Hernandez's avatar
Fabio Hernandez committed
75
At this point, you have installed the CernVM FS client software on your computer. For configuring it please see the next section.
76

Fabio Hernandez's avatar
Fabio Hernandez committed
77

Fabio Hernandez's avatar
Fabio Hernandez committed
78
## Configuration
79
Configuring the CernVM FS client to use the binary distribution of LSST software served by CC-IN2P3 is a *one-time operation*:
Fabio Hernandez's avatar
Fabio Hernandez committed
80

81
* Clone this repository and run the provided configuration script. The configuration script needs super-user privileges:
Fabio Hernandez's avatar
Fabio Hernandez committed
82

83 84 85
		$ cd /tmp
		$ git clone https://github.com/airnandez/lsst-cvmfs.git
		$ cd lsst-cvmfs
86
		$ sudo bash ./configure.sh
Fabio Hernandez's avatar
Fabio Hernandez committed
87 88

	After this step, among other things, an unprivileged user `cvmfs` is created in your computer and several configuration files with sensible default values are located under `/etc/cvmfs`.
89

90
  You can tell the configuration process was successful if you don't see any error message.
91

Fabio Hernandez's avatar
Fabio Hernandez committed
92
* **[OS X only]** On OS X, you need to manually mount the file system:
93

94
		$ sudo mount -t cvmfs lsst.in2p3.fr /cvmfs/lsst.in2p3.fr
95

96
	For unmounting do:
97

98
		$ sudo umount /cvmfs/lsst.in2p3.fr
99

100
* **[Linux - recommended]** On Linux, the CernVM FS client uses `autofs` for automatically mounting and unmounting the file system. We recommend to configure the `autofs` service to start at boot time. On Scientific Linux and CentOS do:
101

102
		$ sudo chkconfig autofs on
103

104
	and on Ubuntu, do:
105

106
		$ sudo sysv-rc-conf autofs on
107

108

109
Now you are ready to use the stack. See next section.
110

Fabio Hernandez's avatar
Fabio Hernandez committed
111
## Usage
Fabio Hernandez's avatar
Fabio Hernandez committed
112
In order to use the LSST software stack, you need to bootstrap your environment for a specific version of the LSST software for which a binary distribution is available. For instance, to use LSST `v11.0` on a Linux machine do:
Fabio Hernandez's avatar
Fabio Hernandez committed
113

Fabio Hernandez's avatar
Fabio Hernandez committed
114
		$ cd /cvmfs/lsst.in2p3.fr/software/linux-x86_64/lsst-v12.0.rc1
115
		$ source loadLSST.bash
116

117
Note that you don't need super-user privileges to use this distribution of the LSST software. You may want to test your installation by [running the LSST demo](https://confluence.lsstcorp.org/display/LSWUG/Testing+the+Installation).
118

Fabio Hernandez's avatar
Fabio Hernandez committed
119 120
**NOTE**: *there are some known issues with some releases of the LSST software distributed via this channel, which may not work on all Linux distributions. See the [known issues](https://github.com/airnandez/lsst-cvmfs/issues) if you experience some problems and don't hesitate to provide feedback.*

Fabio Hernandez's avatar
Fabio Hernandez committed
121 122
## Available releases
At any moment, you can see what releases are available for Linux-based machines by inspecting the directory:
123

Fabio Hernandez's avatar
Fabio Hernandez committed
124
	ls -l /cvmfs/lsst.in2p3.fr/software/linux-x86_64
125

Fabio Hernandez's avatar
Fabio Hernandez committed
126
You can list the releases available for OS X with the command:
127

Fabio Hernandez's avatar
Fabio Hernandez committed
128
	ls -l /cvmfs/lsst.in2p3.fr/software/darwin-x86_64
129

130 131 132
Currently you will find the releases presented in the table below:

| Platform                | Available versions of LSST software |
Fabio Hernandez's avatar
Fabio Hernandez committed
133 134 135
| ---------------------   | ----------------------------------- |
| Linux, x86_64, 64bits   |   `v10.1`, `v11.0`, `v12.0.rc1` |
| Darwin, x86_64, 64bits  |   `v10.1`, `v11.0`, `v12.0.rc1` |
136

137
For details on the platform each binary release was built on please refer to the `README` file in the corresponding directory.
138

Fabio Hernandez's avatar
Fabio Hernandez committed
139
## Advanced usage
140 141
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.

Fabio Hernandez's avatar
Fabio Hernandez committed
142

Fabio Hernandez's avatar
Fabio Hernandez committed
143
## Troubleshooting
Fabio Hernandez's avatar
Fabio Hernandez committed
144 145
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:

Fabio Hernandez's avatar
Fabio Hernandez committed
146
	$ curl --proxy http://cccvmfssqdli01.in2p3.fr:3128 --head http://cccrnvmfs01.in2p3.fr/cvmfs/lsst.in2p3.fr/.cvmfspublished
147

Fabio Hernandez's avatar
Fabio Hernandez committed
148 149
You should see a line containning `HTTP/1.0 200 OK` which indicates that your machine can talk to the relevant server.

Fabio Hernandez's avatar
Fabio Hernandez committed
150 151
Please also refer to the [known issues](https://github.com/airnandez/lsst-cvmfs/issues).

Fabio Hernandez's avatar
Fabio Hernandez committed
152
## Frequently Asked Questions
153

Fabio Hernandez's avatar
Fabio Hernandez committed
154 155 156 157 158 159
* **How can I provide feedback?**

  Your feedback is very welcome. Please feel free to [open an issue](https://github.com/airnandez/lsst-cvmfs/issues).

*  **Where can I get more detailed information on CernVM FS?**

160
	The [CernVM FS downloads page](http://cernvm.cern.ch/portal/filesystem/downloads) contains additional information. In addition, you may want to read the [CernVM FS Technical Information](http://cernvm.cern.ch/portal/filesystem/techinformation) for more in-depth information on how CernVM FS works.
Fabio Hernandez's avatar
Fabio Hernandez committed
161 162 163 164

* **Can I use my remote LSST software distribution while disconnected from the network?**

  The CernVM FS client caches all the file metadata and the contents of the accessed remote files in the local disk of your computer. If you have previously used the stack it is likely that the relevant files are locally available in your local disk, in which case, you may work while disconnected. However, we have not tested this thoroughly, so let us know how it works for you.
165

166 167 168
* **Can I use this for my Docker containers?**

  Yes, you can configure your container for automatically mounting a read-only file system with LSST software stack ready to use. Sébastien Binet did exactly this, so you can just use as is or as a baseline for your own containers. You will find all the details [here](https://github.com/hepsw/docks/tree/master/cvmfs-lsst).
Fabio Hernandez's avatar
Fabio Hernandez committed
169

Fabio Hernandez's avatar
Fabio Hernandez committed
170
## Credits
Fabio Hernandez's avatar
Fabio Hernandez committed
171
This work was done by Fabio Hernandez from [IN2P3/CNRS computing center](http://cc.inp3.fr) (Lyon, France) with very valuable help from Vanessa Hamar who set up the CernVM FS server and proxy infrastructure.