This is a proposal to allow easier distribution and installation of MiR. It is intended to make packaging for GNU/Linux and *BSD distributions easier too.


DISCLAIMER

This document tends to be Debian biased because most of our servers, if not all, run Debian and because I've only installed and administered MiR on Debian boxes. (Pietro)

Conventions used in this doc

System Directories

  • $BINDIR = /usr/bin
  • $SBINDIR = /usr/sbin

Directories Created/Used by MiR

  • $ETCDIR = /etc/mir
  • $LIBDIR = /usr/lib/mir
  • $SHAREDIR = /usr/share/mir
  • $VARDIR = /var/lib/mir

Paths

  • $TOMCAT_HOME = the home of your Tomcat installation (/var/lib/tomcat in Debian for instance)

Others

  • INSTANCE: The installation of MiR that powers one website. A server with one installation of MiR can have multiple instances. In fact, one of the goal of this proposal is to make it easier to install, maintain and upgrade multiple instances of MiR.

Summary

We keep a tar.gz of an already compiled MiR somewhere in the system. Provide scripts to unpack, configure, create a PostgreSQL database and make Tomcat aware of it.

Detailed explanation

Location of files

  • The mir.tar.gz stays at $SHAREDIR
  • Scripts to create/remove a mir installation are kept at $BINDIR or $SBINDIR.
  • Helper scripts (like createmirdb.sh) called by the create/remove ones are kept at $LIBDIR/bin.
  • Data for the scripts above (like the SQL files in dbscripts) are kept at $SHAREDIR or in a subdirectory of it.
  • A global configuration file with data about Tomcat, PostgreSQL, etc. at $ETCDIR. The file should have a descriptive name e.g.: mir.properties or mir-global.properties.
  • MiR installations go to $VARDIR e.g.: $VARDIR/foo, $VARDIR/bar. A symlink to $VARDIR/INSTANCE has to be created at $TOMCAT_HOME/webapps.
  • The etc directory of each instalation is placed in $ETCDIR e.g.: $ETCDIR/foo, $ETCDIR/bar. A symlink to the instalation etc directory ($ETCDIR/INSTANCE) has to be created at $VARDIR/INSTANCE/etc.

Description of files

  • mir.tar.gz: The results of downloading the lastest release of MiR and building it. Steps needed to create this are:
    • Getting MiR source tree from MirCvs.
    • Run Ant
    • cd bin
    • tar czvf mir.tar.gz mir
  • mir-global.properties: This file is probably going to have to use valid shell script variable names like $FOO, $FOO_BAR instead of the Java like keys used in config.properties Foo.Bar. I hope to keep this file as minimal as possible and as it is intended to be edited/used only by sysadmins I think this won't cause much confusion. This file has:
    • $TOMCAT_HOME
    • PostgreSQL root user and password if ident sameuser auth is not set for PostgreSQL root user and the user name is not the sane default postgres.
    • $LIBDIR, $SHAREDIR, $VARDIR: only if you don't want to use the default directories. As $ETCDIR keeps this file it has to be hardcoded in the main scripts.
  • $ETCDIR/INSTANCE: the etc directory of the mir.tar.gz. We have to decide if we will just move it or if it will have its own tarball.

-- PietroFerrari - 21 Sep 2005
Topic revision: r4 - 22 Sep 2005, PietroFerrari
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback