Robs DiracServer Install Guide

From GridPP Wiki
Revision as of 15:00, 17 March 2015 by Rcurrie 83080d9ccc (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is a WIP guide for setting up a server version of DIRAC mainly for testing/development when install scripts aren't being your friend. (This is also a training exercise to make sure I know how things tie together)

I'm assuming that you're installing DIRAC into: /opt/dirac/DIRAC and that you've followed other tutorials on how to ensure your system is compatible and you have the required pre-requisits

Get DIRAC

Firstly lets grab DIRAC and any extra modules you want and put them in place:

git clone DIRAC and switch to the branch we're interested in (the latest in the v6r12 series here):

git clone https://github.com/ic-hep/DIRAC.git /opt/dirac/DIRAC
git --git-dir=/opt/dirac/DIRAC/.git --work-tree=/opt/dirac/DIRAC checkout rel-v6r12
/opt/dirac/DIRAC/Core/scripts/dirac-deploy-scripts.py

The final line here deploys the scripts used by DIRAC which will become useful later on and creates a useful .bashrc

Web interface (optional but highly recommended)

git --git-dir=/opt/dirac/Web/.git --work-tree=/opt/dirac/Web checkout v1r3p7

GridPPDIRAC extensions

git clone https://github.com/ic-hep/GridPPDIRAC.git /opt/dirac/GridPPDIRAC
git --git-dir=/opt/dirac/GridPPDIRAC/.git --work-tree=/opt/dirac/GridPPDIRAC checkout master

Setup Grid Certificates

Create the folder:

mkdir -p /opt/dirac/etc/grid-security

and copy your hostcert.pem and hostkey.pem to this folder and make the following symlinks:

ln -sf /etc/grid-security/certificates /opt/dirac/etc/grid-security/certificates
ln -sf /etc/grid-security/vomsdir /opt/dirac/etc/grid-security/vomsdir

or, configure your certificates to be installed in this directory.

Run install script

You now need to create a config file which will be used to install DIRAC:

LocalInstallation                                                                                                                                                                                                                            
{                                                                                                                                                                                                                                            
  Release = integration                                                                                                                                                                                                                      
  PythonVersion = 27                                                                                                                                                                                                                         
  InstallType = server                                                                                                                                                                                                                       
  UseVersionsDir = no                                                                                                                                                                                                                        
  TargetPath = /opt/dirac                                                                                                                                                                                                                    
  ExtraModules = Web, GridPP                                                                                                                                                                                                                 
  SiteName = DEV.DIRAC                                                                                                                                                                                                                       
  Setup = Development                                                                                                                                                                                                                        
  InstanceName = Devel                                                                                                                                                                                                                       
  SkipCADownload = yes                                                                                                                                                                                                                       
  UseServerCertificate = yes                                                                                                                                                                                                                 
  ConfigurationName = DevelConfig                                                                                                                                                                                                            
  AdminUserName = dirac_host                                                                                                                                                                                                                 
  AdminUserDN = ChangeME__to_a_sensible_UserDN                                                                                                                                                                                               
  AdminUserEmail = ChangeME__to_a_sensible_Email                                                                                                                                                                                             
  AdminGroupName = dirac_admin                                                                                                                                                                                                               
  HostDN = ChangeME__to_a_hostDN                                                                                                                                                                                                             
  ConfigurationMaster = yes                                                                                                                                                                                                                  
  Host = ChangeME__to_a_HostName                                                                                                                                                                                                             
  Services  = Configuration/Server                                                                                                                                                                                                           
  Services += Framework/SystemAdministrator                                                                                                                                                                                                  
  Services += DataManagement/StorageElement                                                                                                                                                                                                  
  Services += DataManagement/FileCatalog                                                                                                                                                                                                     
  Services += Framework/SystemLoggingReport                                                                                                                                                                                                  
  Services += Framework/Monitoring                                                                                                                                                                                                           
  Services += Framework/Notification
  Services += Framework/SecurityLogging
  Services += Framework/UserProfileManager
  Services += Framework/ProxyManager
  Services += Framework/SystemLogging
  Services += Framework/Plotting
  Services += Framework/BundleDelivery
  Services += WorkloadManagement/SandboxStore
  Services += WorkloadManagement/Matcher
  Services += WorkloadManagement/JobMonitoring
  Services += WorkloadManagement/JobManager
  Services += WorkloadManagement/JobStateUpdate
  Services += WorkloadManagement/WMSAdministrator
  Services += WorkloadManagement/OptimizationMind
  Services += RequestManagement/ReqManager
  Services += Accounting/DataStore
  Services += Accounting/ReportGenerator
  Agents  = Framework/SystemLoggingDBCleaner
  Agents += Framework/TopErrorMessagesReporter
  Agents += WorkloadManagement/PilotStatusAgent
  Agents += WorkloadManagement/JobHistoryAgent
  Agents += WorkloadManagement/SiteDirector
  Agents += WorkloadManagement/InputDataAgent
  Agents += WorkloadManagement/TaskQueueDirector
  Agents += WorkloadManagement/JobCleaningAgent
  Agents += WorkloadManagement/StalledJobAgent
  Agents += RequestManagement/RequestExecutingAgent
  Agents += RequestManagement/CleanReqDBAgent
  Agents += WorkloadManagement/StatesAccountingAgent
  Agents += WorkloadManagement/PilotMonitorAgent
  Databases  = AccountingDB
  Databases += SandboxMetadataDB
  Databases += JobDB
  Databases += FileCatalogDB
  Databases += JobLoggingDB
  Databases += UserProfileDB
  Databases += TaskQueueDB
  Databases += NotificationDB
  Databases += ReqDB
  Databases += FTSDB
  Databases += ComponentMonitoringDB
  Databases += ProxyDB
  Databases += PilotAgentsDB
  Databases += SystemLoggingDB
  Executors = WorkloadManagement/Optimizers
  WebPortal = yes
  Database
  {
    User = Dirac
    Password = CHANGEME_PASSWORD
    RootPwd = CHANGEME_ROOT_PASSWORD
    Host = localhost
    MySQLLargeMem = no
  }
}

Setting Up the external Dependencies

The external dependencies are often troublesome/time-consuming to compile as it requires compiling static versions of very large projects and is often fought with difficulties.

It is heavily recommended to just install the version which has been provided by the DIRAC developers.

For our example the latest externals correspond to the ones available through the v6r12p32. version6 release12 patch32

The dirac-install script doesn't always determine the latest patch-level correctly and would pull in the Externals corresponding to v6r12p0.

/opt/dirac/scripts/dirac-install -t server -B -X -r v6r12p32 /opt/dirac/etc/dinstall.cfg


==