Packaging a Structural Biology Application – imod / 3dmod

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

Utilizing the GDB debugger to analyze programs Background and application.
Git/Unix Lab March Version Control ●Keep track of changes to a project ●Serves as a backup ●Revert to previous version ●Work on the same files concurrently.
Guide To UNIX Using Linux Third Edition
Guide To UNIX Using Linux Third Edition
Introduction to Unix (CA263) Introduction to Shell Script Programming By Tariq Ibn Aziz.
Overview Basic functions Features Installation: Windows host and Linux host.
Command Console Tutorial BCIS 3680 Enterprise Programming.
Julie McEnery1 Installing the ScienceTools The release manager automatically compiles each release of the Science Tools, it creates a set of wrapper scripts.
7/17/2009 rwjBROOKDALE COMMUNITY COLLEGE1 Unix Comp-145 C HAPTER 2.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
Installation Process: Step 1 Step1: Login in to Unix Host name or IP address type in douglass User name type in user name Password type in user password.
Introduction to UNIX/Linux Exercises Dan Stanzione.
Advanced Shell Programming. 2 Objectives Use techniques to ensure a script is employing the correct shell Set the default shell Configure Bash login and.
UNIX command line. In this module you will learn: What is the computer shell What is the command line interface (or Terminal) What is the filesystem tree.
Deploying Experiments with Raven Scott Baker SB-Software John H. Hartman University of Arizona.
November 2014Prepared by the Computer Lab Montgomery County-Norristown Public Library.
Introduction to Shell Script Programming
Created by: Maria Abrahms Modified Date: Classification: How to get it done Contributing to OpenStack.
DTIAtlasBuilder Adrien Kaiser Neuro Image Research and Analysis Laboratories University of North Carolina at Chapel Hill A tool to create an atlas from.
Introduction Use of makefiles to manage the build process Declarative, imperative and relational rules Environment variables, phony targets, automatic.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 8-Oct-15.
Drexel University Software Engineering Research Group Git for SE101 1.
Introduction to Bash Programming Ellen Zhang. Previous three classes What have we learnt so far ?
Shell Programming Any command or a sequence of UNIX commands stored in a text file is called a shell program. It is common to call this file a command.
UNIX Commands. Why UNIX Commands Are Noninteractive Command may take input from the output of another command (filters). May be scheduled to run at specific.
Agenda Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Review next lab assignments Break Out Problems.
Guide to Linux Installation and Administration1 Chapter 4 Running a Linux System.
ENEE150 – 0202 ANDREW GOFFIN Introduction to ENEE150.
Git Fundamentals Rochelle Terman 13 January 2014.
Chapter 33 Troubleshooting Windows Errors. STOP Errors  When Microsoft Windows XP encounters a serious problem  And the operating system can't continue.
Chapter 3 MATLAB Fundamentals Introduction to MATLAB Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Setting up Cygwin Computer Organization I 1 May 2010 ©2010 McQuain Cygwin: getting the setup tool Free, almost complete UNIX environment emulation.
1 FreeBSD Installation AFNOG X Cairo, Egypt May 2009 Hervey Allen.
MySQL Getting Started BCIS 3680 Enterprise Programming.
Intro to Git presented by Brian K. Vagnini Hosted by.
CS 245 – Part 1 Using Operating Systems and Networks for Programmers Jiang Guo Dept. of Computer Science California State University Los Angeles.
2007 TAX YEARERO TRAINING - MODULE 61 ERO (Transmitter) Training Module 6 Federal and State Installation and Updates.
1 FreeBSD Installation AFNOG Chix 2011 Blantyre, Malawi 31 st Oct - 4 th Nov 2011 Dorcas Muthoni and Evelyn Namara.
Sed. Class Issues vSphere Issues – root only until lab 3.
Lab 8 Overview Apache Web Server. SCRIPTS Linux Tricks.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
Linux Tutorial Lesson Two *Getting Help in Linux *Data movement and manipulation *Relative and Absolute path *Processes Note: see chapter 1,2,3 from Linux.
Installing git In Linux: sudo apt-get install git In Windows: download it from run the setuphttp://git-scm.com/download/win.
Downloading and Installing GRASP-AF Workshop Ian Robson Information Analyst, North of England Cardiovascular Network.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 28-Jun-16.
The Characterisation Virtual Laboratory James Wettenhall Clayton Campus 20 th June 2012.
Cygwin: getting the setup tool
Subversion Subversion is a brand of version control software that is frequently used to store the code and documentation of a project so as to permit.
L – Modeling and Simulating Social Systems with MATLAB
Release Numbers MATLAB is updated regularly
L – Modeling and Simulating Social Systems with MATLAB
How to link a test to a launcher (in this case a shell launcher)
GIT AND GITHUB WORKSHOP
L – Modeling and Simulating Social Systems with MATLAB
Part 3 – Remote Connection, File Transfer, Remote Environments
The Linux Operating System
Lab 1 introduction, debrief
The Websites Team Robert Mayr (robyduck).
Using Linux Commands Lab 3.
User Defined Functions
UNITY TEAM PROJECT TOPICS: [1]. Unity Collaborate
WEB PROGRAMMING JavaScript.
SUSE Linux Enterprise Desktop Administration
CSE 303 Concepts and Tools for Software Development
GitHub 101 Using Github and Git for Source Control
Cygwin: getting the setup tool
Carthage ios 8 onwards Dependency manager that streamlines the process of integrating the libraries into the project.
Presentation transcript:

Packaging a Structural Biology Application – imod / 3dmod CVL Workshop Packaging a Structural Biology Application – imod / 3dmod James Wettenhall Nov 7th, 2012

Install without CVL Build System First Install the software on a CentOS 6.2/6.3 test machine. I used our “CVL Demo” instance. Installing from binaries is OK, as long as the binaries are relocatable CVL software must be installed in /usr/local/<package>/<version>/ Add menus, menu items and the modulefile.

imod / 3dmod running on CVL Demo instance

imod/3dmod installed in modules environment

imod/3dmod menus and menu items

Preparing imod/3dmod for packaging in the CVL Build System As root on machine where imod/3dmod is installed: cd /usr/local/ echo "This is a binary package." >> imod/4.5.3/readme.txt mv imod/4.5.3/bin/*-run . tar cvf imod-4.5.3-binary.tar imod/ gzip imod-4.5.3-binary.tar scp imod-4.5.3-binary.tar.gz cvllab1@115.146.94.0:/tmp/ mv *-run imod/4.5.3/bin/ The *-run files (used by CVL menu items) will be automatically generated by the CVL Build System. Each *-run file performs a “module load imod/4.5.3”, and then run the desired executable, e.g. /usr/local/imod/4.5.3/bin/3dmod

Using CVL Lab 1 instance to build CVL package for imod / 3dmod As root: cvlcreate imod 4.5.3 mv /tmp/imod-4.5.3-binary.tar.gz /usr/local/src/IMOD/4.5.3/ Now edit /usr/local/src/IMOD/4.5.3/config, as described here:https://confluence-vre.its.monash.edu.au/display/CVL/How+to+package+a+binary+application+and+submit+it+to+the+CVL+repository

Adding an online document link to the menu echo "google-chrome http://bio3d.colorado.edu/imod/doc/3dmodguide.html" > /usr/local/src/IMOD/4.5.3/userguide chmod a+x /usr/local/src/IMOD/4.5.3/userguide vi /usr/local/src/IMOD/4.5.3/check Add this line: cp ${SOURCE_DIR}/userguide ${INSTALL_DIR}/bin

Building the package mkdir /usr/local/tmp/imod_build cd /usr/local/tmp/imod_build/ cvlbuild Press ‘c’. Then, press ‘q’.

Building the package If running cvlbuild gives errors, check your config file very carefully for parse errors. If running cvlbuild succeeds, then run: cvlbuild –p to build an RPM. Now try installing the RPM (initially we will install locally, rather than using the CVL repository). yum install cvl-imod4_5_3-4.5.3-0.1.el6.x86_64.rpm

Testing the installation Start up a remote desktop (VNC) session to CVL Lab 1 (115.146.94.0) using the Launcher. I can see evidence of 3 mistakes. Mistake 1 I forgot to add the userguide menu item: “bin/userguide:3dmod userguide:help:false” into the MenuDesktop section of the /usr/local/src/IMOD/4.5.3/config file. NB: The MenuDesktop entry in the config file is a string, surrounded by quotes. Multiple menu items are separated by semicolons (;).

Testing the installation Mistake 2 – I forgot to add the environment variables’ initialization (e.g. setenv IMOD_DIR …) into the “EnvironmentModuleList” section of the config file. I determined this by noticing that neither of the 3dmod menu items worked. I checked the binary executables called by those menu items in /usr/share/applications/cvl-imod-4.5.3-3dmod.desktop etc. I tried running those executables from the command-line, and quickly discovered that a required environment variable (IMOD_DIR) had not been set. The required environment variables can be found in the /usr/local/Modules/modulefiles/imod/4.5.3 module initialization file on the CVL Demo instance (where I manually installed imod). The IMOD installation recommended adding an IMOD-linux.sh script to /etc/profile.d/ so that the environment variables would be available globally, but we only want them to be set when we do “module load imod”. When adding the environment variables to the “EnvironmentModuleList” section of the “config” file, remember that: The list of environment variable settings must begin with: EnvironmentModuleList=“ and end with a closing quote: “ All quotes (“) and dollar signs ($) within the EnvironmentModuleList string must be escaped using backslashes, i.e. \” and \$. All setenv lines except for the last one, should end with a semicolon (;) Don’t add any comment lines (#) within the EnvironmentModuleList string.

Testing the installation Mistake 3 – I forgot that by default, the 3dmod GUI (when run from the command-line), runs in the background – returning control to the Terminal immediately after launching. By default we run all our applications with Terminal windows for debugging, but in this case, the CVL menu system incorrectly assumes that the application has finished immediately after it is launched. The 3dmod GUI executable can accept a “-W” command-line option to workaround this problem, but we can’t add command-line arguments directly to the MenuDesktop line of the config file, so we need to create an executable “3dmod_minus_W” script in imod’s bin/ directory and rebuild the binary tarball. We will create 2 separate menu items for 3dmod – one using the “3dmod_minus_W” script which runs in a Terminal for debugging, and one using the standard “3dmod” executable, which doesn’t run in a Terminal. Choosing whether to run in a Terminal is done by specifying “true” or “false” in the MenuDesktop entry within the “config file”.

Removing the bad installation and rebuilding The CVL Build System uses the /usr/local/imod/4.5.3/ directory as part of the build/packaging process. We should remove the installed package before rebuilding. yum remove cvl-imod4_5_3 cd /usr/local/tmp/imod_build/ rm –fr * cvlbuild cvlbuild –p yum install cvl-imod4_5_3-4.5.3-0.1.el6.x86_64.rpm

It works!

Save /usr/local/src/IMOD/4.5.3/ to GitHub Using CVL-dev’s StructuralBiology repository First clone the repository from GitHub to your local computer, Then add the IMOD subdirectory to the StructuralBiology repository Then commit your changes and push them to GitHub. CVL-dev currently has one huge repository on GitHub for all StructuralBiology software. This is starting to become unmanageable – doing a “git clone” or a “git pull” from GitHub is very slow for such a large repository.

Adding package to CVL repository scp cvl-imod4_5_3-4.5.3-0.1.el6.x86_64.rpm cvlrepo@cvlrepo.massive.org.au:/home/cvlrepo/incoming Wait 10 minutes yum clean all yum list | grep cvl-imod cvl-imod4_5_3.x86_64 4.5.3-0.1 @/cvl-imod4_5_3-4.5.3-0.1.el6.x86_64 yum install cvl-imod4_5_3 Contact Jupiter Hu to request adding a package to a “yum groupinstall” group.

Time spent building this package and documenting the process. Total time taken, including documenting the steps in Powerpoint and correcting my mistakes: Approximately 3 hours (without GitHub) Hopefully much less with a bit more practice. However large (multi-gigabyte) applications will never be quick to package, even for expert users of the CVL Build System.

Acknowledgements NeCTAR Jupiter Hu Carlo Hamalainen Geoffrey Kong For funding the project. Jupiter Hu For developing the CVL Build System and for helping with troubleshooting. Carlo Hamalainen For trying out our CVL Build instructions on the CVL wiki and providing feedback. Geoffrey Kong For advice on which Structural Biology applications should be installed. Wojtek Goscinski and Paul McIntosh For steering the development of the CVL Build System.