wiki:Admin/StandardOperatingProcedures/InstallSoftwareFromSource

Version 10 (modified by Mikael Brandström Durling, 6 years ago) (diff)

--

Software installations (Currently being rewritten)

In general when installing software, we prefer to install software as modules. This facilitates for users to revert to older software versions, as well as to keep track of what version was used for a specific project. However, most general libraries (eg. in many cases packages called libsomething in Debian) should be installed as Debian packages. If unsure, please discuss with Mikael and/or Les. Debian packages can only be installed by system administrators, while software packages installed and made available as software modules can also be installed by users who have been granted software install permissions (and adhere to the software install guidelines.)

Which software should be installed and made available to all users? In general, software that will have a use by more than a single project, and that can be installed in a manner that can be shared by many users can be installed. (This excludes for example excludes software that needs write permission to a central database och file set)

Software install procedure (all parts not yet available)

Software install is a two step procedure. First you install the software into a given directory that is created under /opt/sw and made available to you. Once the module file is written, a system administrator can make the software available for all users. This two step procedure is implemented for security and quality reasons. Software under /opt/sw is installed in directories adhering to the naming standard /opt/sw/SOFTWARE/VERSION. Since we are now using Lmod, module files can be written either in the legacy TCL/C syntax, or in Lua. Please visit Lmod homepage for more information https://github.com/TACC/Lmod/

Detailed procedure (not involving software specifics on how to set installation location).

  1. module load gridsw to enable software installation related modules.
  2. Run the command gridsw to switch primare group to mykopat-grid-software. This must be done prior to any work on software in the shell you will be working with.
  3. Run grid-mkswdir SOFTWARE VERSION to create a directory /opt/sw/SOFTWARE/VERSION, where you can install the package. This directory is read and writable by you, readable by other software admins, but not by ordinary users.
  4. Dowload software source or binaries archive to /opt/sources
  5. Unzip archive, and if necessary configure/compile whith correctly specified installation path
  6. Install package into the the folder obtained at step 3. (This should be done as your ordinary user, in a shell where you have run the gridsw command.) If the install script/makefile/install procedure complains about denied permissions, DO NOT use sudo. You should rather check that all install paths etc are correct.
  7. Write a module file (copy and edit previous version or so) to reflect the new software version you have installed. The module file should be created in /opt/modulefiles_staging/ and named SOFTWARE/VERSION (or SOFTWARE/VERSION.lua if you prefer to write a Lua module).
  8. Add the module file to subversion with svn add (you might have to add the directory too, if you had to create it) and then commit the module file with svn commit.
  9. Ask a system administrator to publish the newly installed software.

Software installations, as modules, is a two step procedure.

"OldGrid?" Software install from source package as a module

  1. module load gridadmin
  2. module load modules
  3. gridsw
  4. Dowload the software to /opt/sources
  5. Untar/unzip the source file (e.g. tar xzf sour-x.y.z.tar.gz)
  6. Create install dir, and populate with standard directories: mkdir -p /opt/sw/[package name]/[version] && ( cd /opt/sw/[package name]/[version] && mkroot -m ) In most cases it is enough to create the base directory, i.e. skip the second half including and after &&.
  7. Cd into source directory
  8. Configure and install software (e.g. for a typical package ./configure --prefix=/opt/sw/[package name]/[version]
  9. make
  10. make install
  11. Create a modulefile called /opt/modulefiles/[package name]/[version] by copying and editing from some other module file, for example. See man modulefile
  12. If this is the first version of the package installed add the whole package to svn by doing cd /opt/modulefiles/ && svn add [package name]
  13. If this is a new version installed just svn add the module file for the new version.
  14. Commit the change to svn, svn commit [modulefile or module directory] You will get a nano session to write a descriptive comment on what you have done. Check carefully that only the files you have modified are listed below the divider! If more files are there, quit the editor without saving any changes and make sure that you only give svn ci the files you want to commit.
  15. If some default version should be there, create/modify /opt/modulefiles/[package name]/.version to specify default. (Check the syntax in some other module directory). Don't forget to check in the .version file in SVN too.