Index: /trunk/ippdor/deployment/Deployment.py
===================================================================
--- /trunk/ippdor/deployment/Deployment.py	(revision 32896)
+++ /trunk/ippdor/deployment/Deployment.py	(revision 32897)
@@ -96,4 +96,5 @@
         """
         Check different elements
+        TODO: add checks for IppSite definition
         """
         Deployment.logger.info('Checking Condor-IPP Softwares Configuration')
@@ -153,4 +154,8 @@
         """
         Deployment.logger.info('Deploying Condor-IPP Softwares')
+        Deployment.logger.info('... Installing Site definition class to [%s]' 
+                               % self.target_directory)
+        shutil.copyfile('.tmp_site/IppSite.py',
+                        '%s/IppSite.py' % (self.target_directory))
         Deployment.logger.info('... Installing Python classes to [%s]' % self.target_directory)
         for filename in Deployment.CLASSES_FILENAMES:
Index: /trunk/ippdor/deployment/deploy.py
===================================================================
--- /trunk/ippdor/deployment/deploy.py	(revision 32896)
+++ /trunk/ippdor/deployment/deploy.py	(revision 32897)
@@ -4,33 +4,6 @@
 Utility executable for IPP Condor deployment
 """
-def hostname():
-    """
-    Get the host name
-    >>> print hostname()
-    neverland
-    """
-    import socket
-    return socket.gethostbyaddr(socket.gethostname())[0].split('.')[0]
-
-# Default values
-class DefaultValues:
-    """
-    This class contains all default values for the IPP Condor deployment
-    """
-    if hostname().startswith('ipp'): # Production cluster
-        svnSourceUrl          = 'https://svn.pan-starrs.ifa.hawaii.edu/repo/ipp/trunk/ippdor/src'
-        targetDirectory       = '/home/panstarrs/ippdor/local/share/python/ipp'
-        targetBinaryDirectory = '/home/panstarrs/ippdor/local/bin'
-    else:
-        svnSourceUrl          = 'file:///home/schastel/svnrepo/ippdor/trunk/src'
-        targetDirectory       = '/home/schastel/local/share/python/ipp'
-        targetBinaryDirectory = '/home/schastel/local/bin'
-
-    def __init__(self):
-        """Not to be used as a class
-        """
-        raise Exception('Not to be used as a class')
-
 import sys
+import os
 import logging
 #optparse Deprecated in python 2.7. Will be replaced by argparse
@@ -39,5 +12,5 @@
 
 if __name__ == '__main__':
-    USAGE = """usage: %prog [options] arg1 arg2
+    USAGE = """usage: %prog [options] <ipp site definition file>
 
 Deploy the Condor-IPP softwares
@@ -53,18 +26,10 @@
                       help = 'Be quiet',
                       default = False)
-    PARSER.add_option( '-s', '--svnSourceUrl',
-                       dest = "svnSourceUrl",
-                       help = 'SVN Source URL [default: %default]',
-                       default = DefaultValues.svnSourceUrl )
-    PARSER.add_option( '-t', '--targetDirectory',
-                       dest = "targetDirectory",
-                       help = 'Target Python Directory for classes [default: %default]',
-                       default = DefaultValues.targetDirectory )
-    PARSER.add_option( '-b', '--targetBinaryDirectory',
-                       dest = "targetBinaryDirectory",
-                       help = 'Target Executables Directory [default: %default]',
-                       default = DefaultValues.targetBinaryDirectory )
     (OPTIONS, ARGS) = PARSER.parse_args()    # ... the values are stored in options
-
+    if len(ARGS) != 1:
+        PARSER.print_help()
+        sys.exit(1)
+    IPP_SITE_FILE = ARGS[0]
+    # Logging setup
     LOGGER = logging.getLogger('ippdor')
     FORMATTER = logging.Formatter('%(asctime)s | %(levelname)7s | %(message)s', 
@@ -81,9 +46,22 @@
     else:
         LOGGER.setLevel(logging.INFO)
+    # Import IppSite definition
+    LOGGER.info('Importing local site definitions')
+    try:
+        os.makedirs('.tmp_site')
+    except OSError:
+        LOGGER.warn('Existing .tmp_site directory')
+    import shutil
+    shutil.copy(IPP_SITE_FILE, '.tmp_site/IppSite.py')
+    INITFILE = open('.tmp_site/__init__.py', 'w')
+    INITFILE.close()
+    sys.path.append('.tmp_site')
+    from IppSite import IppSite
 
+    # Deployment
     try:
-        DEPLOYMENT = Deployment(OPTIONS.svnSourceUrl,
-                                OPTIONS.targetDirectory,
-                                OPTIONS.targetBinaryDirectory)
+        DEPLOYMENT = Deployment(IppSite.SVN_SOURCE_URL,
+                                IppSite.TARGET_DIRECTORY,
+                                IppSite.TARGET_BINARY_DIRECTORY)
         DEPLOYMENT.check()
         DEPLOYMENT.svn_export()
@@ -97,2 +75,8 @@
         import traceback
         traceback.print_exc()
+    # Clean temporary site
+    LOGGER.info('Cleaning temporary site definitions')
+    os.remove('.tmp_site/IppSite.py')
+    os.remove('.tmp_site/IppSite.pyc')
+    os.remove('.tmp_site/__init__.py')
+    os.rmdir('.tmp_site')
Index: /trunk/ippdor/quality_metrics.sh
===================================================================
--- /trunk/ippdor/quality_metrics.sh	(revision 32896)
+++ /trunk/ippdor/quality_metrics.sh	(revision 32897)
@@ -10,5 +10,5 @@
 /bin/rm -rf ./test
 mkdir -p ./test/ipp ./test/bin
-./deployment/deploy.py -t ./test/ipp -b ./test/bin 
+./deployment/deploy.py IppSiteTest.py
 
 echo "\"\"\"Stupido\n\"\"\"" > ./test/__init__.py
Index: /trunk/ippdor/src/executables/ippdor_chip_to_warp.py
===================================================================
--- /trunk/ippdor/src/executables/ippdor_chip_to_warp.py	(revision 32896)
+++ /trunk/ippdor/src/executables/ippdor_chip_to_warp.py	(revision 32897)
@@ -44,8 +44,5 @@
     def __init__(self,
                  label,
-                 recipient,
-                 host='ippdb01.ifa.hawaii.edu', 
-                 user='ipp', 
-                 passwd='ipp'):
+                 recipient):
         """
         The constructor:
@@ -54,5 +51,5 @@
         - creates a local directory
         """
-        Gpc1Manager.__init__(self, recipient=recipient, host=host, user=user, passwd=passwd)
+        Gpc1Manager.__init__(self, recipient=recipient)
         self.label = label
         if self.is_label_used():
@@ -231,8 +228,5 @@
         print 'Aborting'
         sys.exit(4)
-    if os.getenv('USER') == 'ippdor':
-        BUILDER = ChipWarpBuilder(LABEL, RECIPIENT)
-    else:
-        BUILDER = ChipWarpBuilder(LABEL, RECIPIENT, host='ipp0012.ifa.hawaii.edu')
+    BUILDER = ChipWarpBuilder(LABEL, RECIPIENT)
     # Check exposures        
     EXPOSURES_IDS = dict()
Index: /trunk/ippdor/src/ipp/Gpc1Manager.py
===================================================================
--- /trunk/ippdor/src/ipp/Gpc1Manager.py	(revision 32896)
+++ /trunk/ippdor/src/ipp/Gpc1Manager.py	(revision 32897)
@@ -5,4 +5,5 @@
 import sys
 import MySQLdb
+from ipp.IppSite import Gpc1
 
 #################################################################
@@ -12,12 +13,12 @@
     """
     def __init__(self,
-                 recipient = 'schastel@ifa.hawaii.edu',
-                 host = 'ippdb01.ifa.hawaii.edu', 
-                 user = 'ipp', 
-                 passwd = 'ipp'):
+                 recipient = 'schastel@ifa.hawaii.edu'):
         """Create a connector to the gpc1 database
         """
         self.recipient = recipient
-        self.connector = MySQLdb.connect(host, user, passwd, db = 'gpc1')
+        self.connector = MySQLdb.connect(Gpc1.HOST, 
+                                         Gpc1.USER, 
+                                         Gpc1.PASSWORD, 
+                                         db = Gpc1.NAME)
         self.label = None # Set by derived classes
 
Index: /trunk/ippdor/src/ipp/constants/Globals.py
===================================================================
--- /trunk/ippdor/src/ipp/constants/Globals.py	(revision 32896)
+++ /trunk/ippdor/src/ipp/constants/Globals.py	(revision 32897)
@@ -17,4 +17,5 @@
 from ipp.helpers import hostname
 from ipp.exceptions.UninstantiableIppException import UninstantiableIppException
+from ipp.IppSite import IppSite
 
 class Globals:
@@ -27,14 +28,8 @@
         raise UninstantiableIppException()
 
-    if hostname().startswith('ipp'): # Production cluster
-        IPPDOR_BINARY_PATH = '/home/panstarrs/ippdor/local/bin'
-        LOCAL_TMP_DIR    = '/export/%s.0/ippdor/processing' % hostname()
-        NFS_TMP_DIR    = '/home/panstarrs/ippdor/processing'
-        IPP_BIN_PATH = '/home/panstarrs/ippdor/psconfig/20110920/current.lin64/bin'
-    else: # Development
-        IPPDOR_BINARY_PATH = '~/local/bin'
-        LOCAL_TMP_DIR    = '/tmp/ippdor_processing'
-        NFS_TMP_DIR    = '~/ippdor_processing'
-        IPP_BIN_PATH = '~/ipp/default.linux'
+    IPPDOR_BINARY_PATH = IppSite.TARGET_BINARY_DIRECTORY
+    LOCAL_TMP_DIR = IppSite.LOCAL_TMP_DIR
+    NFS_TMP_DIR = IppSite.NFS_TMP_DIR
+    IPP_BIN_PATH = IppSite.IPP_BIN_PATH
 
     # Global requirements
@@ -42,5 +37,6 @@
 
     # Condor scripts
-    GENERATE_EXPOSURE_DAG = '%s/generate_exposure_dag.py %s %s %s' % (IPPDOR_BINARY_PATH, '%s', '%s', '%s')
+    GENERATE_EXPOSURE_DAG = '%s/generate_exposure_dag.py %s %s %s' % (IPPDOR_BINARY_PATH, 
+                                                                      '%s', '%s', '%s')
 
     ###################
@@ -67,3 +63,2 @@
     # Stack stage
     STACKTOOL = '%s/stacktool' % IPP_BIN_PATH
-
