Differences between revisions 4 and 5
Revision 4 as of 2010-03-31 05:15:33
Size: 5315
Editor: root
Comment:
Revision 5 as of 2010-03-31 05:16:20
Size: 5321
Editor: root
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
For compatibility with the low level Berkeley DB tools, you will generally use the environment variable $DB_HOME to point to the path of the actual Database Environment. Alternatively, you could specify it in the configuration file with the EMEN2DBPATH setting. For compatibility with the low level Berkeley DB tools, you will generally use the environment variable $DB_HOME to point to the path of the actual EMEN2 database environment. Alternatively, you could specify it in the configuration file with the EMEN2DBPATH setting.

EMEN2 Configuration

For ease of editing, EMEN2 uses YAML as the configuration file format. YAML is a markup language similar to XML or JSON for structured documents. The default configuration file (emen2/config/config.sample.yml) is presented below, with comments detailing each setting.

For compatibility with the low level Berkeley DB tools, you will generally use the environment variable $DB_HOME to point to the path of the actual EMEN2 database environment. Alternatively, you could specify it in the configuration file with the EMEN2DBPATH setting.

The most important settings are the paths specified for various EMEN2 subsystems. By default, the &root element (first item below) is used as a "prefix" for the various subsystem directories (applog, archive, emen2files, db_hotbackup), so &root as /home/emen2 would result in /home/emen2/applog, /home/emen2/archive, etc.

If you wish to specify an absolute path to an element, without the &root prefix, remove the "prefix: -*root" item from that block.

---
# run cmdlineutils/expandyaml.py to see contents of this file after processing

root:

  # Default directory for emen2 items: db, applog, archive, db_hotbackup, emen2files, emen2tiles
  # This should be an absolute path
  root: &root
    /home/emen2/

  # path to Berkeley DB installation
  bdbprefix: &bdbprefix
    /usr/local/BerkeleyDB.4.8/ 

  # path to configuration files -- loaded after this one and overrides it
  configfiles:
    - /etc/emen2config.yml 


base:
  prefix:
      - *root

  # EMEN2 Database Environment
  # I recommend using the $DB_HOME environment variable for this setting, as $DB_HOME/config.yml will be loaded as the default environment
  #    as well as convenience with the Berkeley DB command line utils, without specifying -h
  # EMEN2DBPATH: /home/emen2/db
  

  # Log directory: access.log, error.log, debug.log (see logging section)
  LOGPATH: &logpath
      applog
      
  # Berkeley DB Log Archive directory. Backup offsite.
  ARCHIVEPATH:
      log_archive
      
  # Berkeley DB Hot Backup directory, for incremental backups and failover. Backup offsite.      
  BACKUPPATH:
      db_backup

  # Cache for "map" interface for large image files
  TILEPATH:
      emen2tiles


# Raw data storage area. You may want to place this on a large raid array.
# You can also set this up to split file storage by date, e.g.:
    # 0: /raid1/
    # 20080501: /raid2/
    # 20100101: /raid3/
# Files from beginning -> May 2008 will be on /raid1, May 2008 to Jan 2010 on /raid2, and files after Jan 2010 on /raid3
# You will need to use an absolute path here
binaries:
   BINARYPATH:
      0: /home/emen2/emen2data
    

# Command to invoke to run EMAN2 tile generator for micrographs. These will be cached in the TILEPATH directory.
EMAN2:
   E2TILEFILE: emen2/clients/e2tilefile.py --buildspec


params:
  # Database version. This may be moved out of the config file at some point.
  VERSION: 20100325

  # Number of web server threads to run. Note: these are python threads, so limited to single CPU
  NUMTHREADS: 1
  
  # URI and port configuration.
  EMEN2EXTURI: http://localhost:8080
  EMEN2HOST: localhost
  EMEN2PORT: 8080

  # Web root is useful is you are proxying behind apache: e.g. /proxy/virtualroot/db -> /db... and external proxy port
  EMEN2WEBROOT: ""
  EMEN2EXTPORT: 8080

  # SSL
  EMEN2HTTPS: False
  EMEN2PORT_HTTPS: 65532
  
  # You will want to leave these at their default settings
  TIMESTR: '%Y/%m/%d %H:%M:%S'
  MAXRECURSE: 50
  BLOCKLENGTH: 100000
  MAXIDLE: 604800
  USETXN: True
  RECOVER: True


customization:
  # Short string for database identification. This shows up several places in the UI
  EMEN2DBNAME: "EMEN2"
  
  # Logo in emen2/tweb/images to use
  EMEN2LOGO: "emen2logo-small.png"
  
  # Default text to show on login screen
  GREETING: 
      <p>Welcome!</p>

  # Template to use for anonymous uses (e.g. before login)
  HOME_NOAUTH: '/pages/home.noauth'
  
  # Words to ignore in full-text indexing.
  UNINDEXED_WORDS: ["in", "of", "for", "this", "the", "at", "to", "from", "at", "for", "and", "it", "or"]

  # Default groups for new users
  GROUP_DEFAULTS: ["create"]
  
  # Unused at the moment
  SPARSETREE: 1


# Record IDs to use in the top toolbar in the web UI
bookmarks:
  BOOKMARKS:
    GROUPS: 1
    PROJECTS: 1
    EQUIPMENT: 1


# Set mailhost to 0 to leave mail subsystem off, otherwise set to outgoing SMTP server
mailsettings:
  MAILADMIN: root@localhost
  MAILHOST: 0




# Probably don't want to touch these unless you have an unusual Berkeley DB setup, e.g. db48_recover instead of db_recover
dbutils:
    prefix:
        - *bdbprefix
    db_recover: bin/db_recover
    db_hotbackup: bin/db_hotbackup
    db_archive: bin/db_archive
    db_checkpoint: bin/db_checkpoint
 
 
# Additional template and view directories to add to search paths 
viewsettings:
  TEMPLATEDIRS_DEFAULT: True
  TEMPLATEDIRS: 
    - 'templates'
  VIEWPATHS:
    - 'views'


# Logging files. See &logpath for base directory.
logging:
  prefix:
    - *logpath
  EMEN2ERRLOG: emen2errlog
  EMEN2JOBFILE: emen2job
  DEBUGLOG: debug.log
  DEBUG: True
  

EMEN2/config (last edited 2010-09-22 07:15:32 by root)