Post on 17-Jul-2015
transcript
Continuous Integration andDelivery of
Research Applications
Bruce Beckerbbecker@csir.co.zaCoordinator, AAROC
Meraka Institute, CSIR
Fanie RiekertRiekertSJPK@ufs.ac.za
Senior Systems EngineerHPC Unit, UFS
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
2
The problem
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
What users want
Amazing infrastructure
Some users want highly varied, modular
application selection
Vertically integratedHighly specialised
applications
Highly trained supportHighly trained support
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
What users get sometimes
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
Current Methods
Are you a legitscientist ?
Ok, sounds goodwhat applications are you running ?
We can run almost anything !
Hi, I heard aboutAfricaGrid – sounds
grrrrreat ! Can I Use it ?
I've got beakers…
And glasses !
Awesome ! Well, first we do some preprocessing with RaNDo, then we run a massively parallel pipeline with XBOT, then blah and blah then blah
blah blah and blah, we also need blah blah and sometimes our colleagues from FarAwayU need to access the data with StrangeProtocolx1, and of course blah blah, not to mention blah
…..
We'll see what we can do
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
Actual workflow● Find the source code
● Unpack, ./configure && make … Error 1 missing x.h● … hack hack hack … hm. Missing dependencies
● Recursively* determine the dependencies**● *Yes, recursively means curse, curse then curse again.● **The actual dependencies, not the ones that were written
on the web page from 5 years ago.
● … mutter mutter …● ???? Why are you compiling now !?
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
Actual communicationHey, how's it going ?
you done with my porting yet ?
You done yet ?
You done ?
…. bloody IT people !
Have you actually seen this code ?
I just... It looks like Cthulhu's beard....
Ok, I got it to compile, but only with if you
type with your left toes.
AAArrrgh, I'm a scientist, not an IT people !
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
There's gotta be a better way
Let's give researchers a ”better deal”
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
9
• Hypothesis 1: – It always comes down to an application
• At the end of all first-contact you get a list of applications that users want
– Let's focus on that, shall we ?
• Hypothesis 2:
– No software is an island
• Everything has dependencies, even if it's just glibc or libgfortran
– Let's make those explicit, shall we ?
Compuatational InfrastructureWhat is it good for ?
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
10
• Hypothesis 3:– Applications need an environment
• Compiler ?
• Architecture ?
• Dependencies ?
• Middleware ?
• Etc....
– Let's make those explicit shall we ?
Compuatational InfrastructureWhat is it good for ?
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
11
• Hypothesis 4: – there is more than one environment.
• Nothing is going to ever be really useful if it can only run in one place.
• Nobody wants to be forced into a single environment (grid/HPC/cloud, etc)
– Let's try to simulate as many target environments (sites) as we can, shall we?
Compuatational InfrastructureWhat is it good for ?
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
12
Compuatational InfrastructureWhat is it good for ?
● Hypothesis 5: ● Solutions decay
– The solution – as well as the dead ends – are part of the process.
– If it's not in a version-controlled repository, it's no good.– If it's not executable (in a wiki/document, etc), then you
have to convert it back into something a computer understands – why not just leave it in executable format ?
● Let's recognise that solutions decay and code for the future, shall we ?
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
13
Humans need not apply
● Hypothesis 6: ● Most of the work of porting and supporting
applications can be automated– Reduce the load on the user and the operator, by
automating common tasks
● Let's:– Integrate the various software, middleware, service and
infrastructure components as far as possible, – Keep it Open
● … shall we ?
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
14
Compuatational InfrastructureWhat is it good for ?
● Hypothesis 6 (Corollary) : You're in the way
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
15
Compuatational InfrastructureWhat is it good for ?
● Hypothesis 7: ● This stuff's not hard
– Continuous Integration has been around for a long time– If it can be done by hand, it can be scripted; if it can be
scripted, it can be automated properly. ● Let's
– adopt widely-used tools and methodologies, and – hey, how about we use the web to communciate
(you know, like we do with EVERYTHING else ?)
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
Let's work on a better deal...● How do we lower the barrier to entry to the grid or
cloud infrastructure ?● How can the application expert prove to the resource
provider that the application will actually run on the execution environment of the site ?
● How can we manage the lifecycle of applications across multiple versions, architectures, configurations ?
● How can we ensure that once applications are ”certified”, they are actually available on as many sites as possible ?
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
Go to Bootcamp
http://software-carpentry.org/bootcamps
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
18
What are we actually doing ?● Put the ball in the developer/community/user's court
● You tell us how to build your application● Provide a simple interface to porting pipeline● Provide focussed, goal-oriented support when needed.● Communication has a context and is directly linked to the issues
at hand
● Publish and preserve the entire toolchain● It's a real collaboration now :)● Collaborate with code● The Big S word ? (not the 4-letter word - SUSTAINABLE)
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
19
Tools of the Trade (1)
Waffle.ioProjectplanning
Slack.comTeam collab
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
20
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
21
What's the plan, Stan ?https://waffle.io/aaroc/devops
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
Typical workflow
Test
ing
mat
rix
Defines relevanttests in Jenkins
Writes code to pass required tests
Dev/Stage env.Application developer
Infrastructure expert
Reads descriptionof execution environment tests
Promote a buildto CVMFS
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
23
Application porting, testing, integration and deployment workflow
CreateBuild Script
Pull Request
Create Jenkins Job
Build
if first time
Invoke Test
if buildhas passed
Fail Build
Build Fails Build Passes
Follow upwith the user Fail Test
Tests Fail
Invoke Artifact
Tests Pass
Open Issueon Github
Stage toTesting Repo
Field Tests
Update RepoVersion
Lock CVMFSrepo
Field Tests Pass
Open Issueon Github
Field Tests Fail
DeployArtifact
Update RepoVersion
Tag sites
Application porting, testing, integration and deployment workflow
CreateBuild Script
Pull Request
Create Jenkins Job
Build
if first time
Invoke Test
if buildhas passed
Fail Build
Build Fails Build Passes
Follow upwith the user Fail Test
Tests Fail
Invoke Artifact
Tests Pass
Open Issueon Github
Stage toTesting Repo
Field Tests
Update RepoVersion
Lock CVMFSrepo
Field Tests Pass
Open Issueon Github
Field Tests Fail
DeployArtifact
Update RepoVersion
Tag sites
The new pipeline
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
24
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
25
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
26
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
27
Does it work !?
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
28
Yes, it works.
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
29
Let's get very explicit
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
30
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
cat <<MODULE_FILE#%Module1.0## $NAME modulefile##proc ModulesHelp { } { puts stderr " This module does nothing but alert the user" puts stderr " that the [moduleinfo name] module is not available"}preqreq("gsl","fftw/2.1.5","hdf5")modulewhatis "$NAME $VERSION."setenv GSL_VERSION $VERSIONsetenv GSL_DIR /apprepo/$::env(SITE)/$::env(OS)/$::env(ARCH)/$NAME/$VERSIONprependpath LD_LIBRARY_PATH $::env(GSL_DIR)/libMODULE_FILE) > modules/$VERSION
cat <<MODULE_FILE#%Module1.0## $NAME modulefile##proc ModulesHelp { } { puts stderr " This module does nothing but alert the user" puts stderr " that the [moduleinfo name] module is not available"}preqreq("gsl","fftw/2.1.5","hdf5")modulewhatis "$NAME $VERSION."setenv GSL_VERSION $VERSIONsetenv GSL_DIR /apprepo/$::env(SITE)/$::env(OS)/$::env(ARCH)/$NAME/$VERSIONprependpath LD_LIBRARY_PATH $::env(GSL_DIR)/libMODULE_FILE) > modules/$VERSION
Generic build script.# GADGET requires HDF5 FFTW2 ZLIB and openmpimodule add cimodule add fftw/2.1.5module add hdf5module add openmpimodule add gsl
# GADGET requires HDF5 FFTW2 ZLIB and openmpimodule add cimodule add fftw/2.1.5module add hdf5module add openmpimodule add gsl
Set up theenvironment
make install DESTDIR=$WORKSPACE/buildmkdir p $REPO_DIRrm rf $REPO_DIR/*tar cvzf $REPO_DIR/build.tar.gz C $WORKSPACE/build apprepo
make install DESTDIR=$WORKSPACE/buildmkdir p $REPO_DIRrm rf $REPO_DIR/*tar cvzf $REPO_DIR/build.tar.gz C $WORKSPACE/build apprepoActually build...
Create the artifact
Create the modulefile
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
There's gotta be a better way !(thanks for the idea, Travis)
---author: Bruce Beckerrepo: https://github.com/SAGridOps/SoftwareInstallationname: GCCtarget: - sites: - generic - mpi - mpi_infiniband - OS: - sl6 - u1404versions: - 4.6.1category: compilersdependencies: - [ name: mpfr, version: 3.1.2 ]url: http://gnu.org/path/to/gcc.tar.gzbuild_script: build.sh
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
33
Last Bit: Delivery
Executable Artifactsgo here
Every site can mountthe CVMFS repoEven your laptop...
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
34
Summary● Making the best use of computational infrastructure
comes down to running applications● Maintaining and porting them is hard and tricky.
Communication is the hardest part.● We've built an automated porting system, which
● will deliver functional, tested, relevant software to your site.● Can ease the communication blocks in collaborative work
● Oh and it works :)● Come on in and help us build it, there's plenty to do !
Bruce Becker: Coordinator, SAGrid | bbecker@csir.co.za | http://www.sagrid.ac.za
35
Thanks !
● Join the organisations:● http://github.com/AAROC/● http://github.com/SAGridOps
● Let's talk :● @TheSAGrid● @brusisceddu● fb.com/SAGrid