Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Mar 2007 4:28:22 -0700
From:      Vizion <vizion@vizion.occoxmail.com>
To:        <ports@freebsd.org>
Subject:   Ports - proposal - To handle Multiple instances 
Message-ID:  <20070330112822.CYSZ12099.dukecmmtao03.coxmail.com@dukecmmtao03>

next in thread | raw e-mail | index | archive | help
> Sent: Friday, March 30, 2007 4:06 AM
> To: ports@freebsd.org
> Cc: Lowell Gilbert; Wesley Shields
> Subject: 

WAS ORIGINALLY

RE: joomla ports - installation- multiple virtual hosts
> 
> 
> >>
> .. much deleted
> >>
> 
> The past dialogue has encouraged me to an idea to discover 
> whether anyone thinks its implementation could provide a 
> generic solution for any port needing multiple installation 
> instances. It may be there is another way of achieving the 
> same goal but here is my two pennyworth. 
> 
> Content management Systems, galleries and forums spring 
> immediately to mind , as natural beneficiaries but I am sure 
> that there may be other applications including network 
> managed installations to multiple servers.
> 
> Unfortunately I do not believe I have the experience to build 
> the solution I propose nor do I know whether it would require 
> a large or small amount of work.
> 
> Here are the bones of the idea which should be a seperate 
> port which  have tried to describe as concisely as I can. 
> Lets call it IGI (for Instance generator and Installer).
> 
> here is what I see IGI doing:
> 1. IGI is run in a port directory (we will call this the 
> INSTANCE_ROOT (e.g. www/joomla). The idea is that where a 
> multiple instance is required there will be no installation 
> from the ROOT_INSTANCE but only from a PORT_INSTANCE (see below). 
> 
> I envisage IGI taking the following minimal parameters:
> 
> IGI [[-N number |-D number | -A number [[installdir ....] 
> |filename]]] | [-M [[number ....]|[number_range]] | [-I 
> [[number ....]|[number_range]] | [-MIC [[number 
> ....]|[number_range]]] |[-U [[number ....]|[number_range]]
> 
> -N number
> IGI reads the installdir entries either from the command line 
> or a file. IGI stores them, checks each one for validity, and 
> counts to ensure the number of installdirs is equal to 
> ${number}. IGI returns an error if the checks fail.
> IGI looks at current port, and creates a ${number} of New 
> directories named ${CATEGORIES}/${PORTNAME}_IG${x} where x is 
> initially 0000 for the first directory created and 
> incremented by 1 as each subsequent directory is created 
> until the number of directories created = ${number}.IGI 
> returns an error if there is a failure.
> 
> IGI records the new directories in a file contained in a 
> dedicated IGI working directory. Lets call this IGIdb.
> 
> IGI then
> # make clean 
> and copies the current port into each of the newly created 
> directories to create a new PORT_INSTANCE. In the process IGI 
> amends the PORTNAME= line in the Makefile for each to 
> ${PORTNAME}_IG${x}.
> It also adds the line
> ROOT_PORT= ${ROOT_PORT}to the Makefile
> IGI then modifies the install dir for each instance, using 
> the list of install dirs in sequence. 
> The modifications are logged to IGIdb
> 
> IGI then if there exists a file named IGI_${ROOTPORT} in the 
> port then IGI runs any commands it contains. This feature 
> would enable port maintainers to piggy back on IGI to create 
> additional customisation when multiple instances are 
> installed (e.g to meet logging requirements).
> A record is logged into IGIdb
> 
> -D number
> IGI searches ports tree within current category for a port 
> for ${CATEGORIES}/${PORTNAME}_IG${number} if it finds it it 
> moves to the directory and Deinstalls that instance.
> A record is logged into IGIdb
> 
> -A number
> This is simply to Add a number of additional instances when a 
> number of instances already exist.
> A record is logged into IGIdb
> 
> -M [[number ....]|[number_range] 
> IGI moves to each PORT_INSTANCE identified by the ${number} 
> or {number_range} and 
> # make
> for each PORT_INSTANCE
> A record is logged into IGIdb
> 
> -I [[number ....]|[number_range]] 
> IGI moves to each PORT_INSTANCE identified by the ${number} 
> or {number_range} and 
> # make install
> for each PORT_INSTANCE
> A record is logged into IGIdb
> 
> -MIC[[number ....]|[number_range]
> IGI moves to each PORT_INSTANCE identified by the ${number} 
> or {number_range} and 
> # make install clean
> for each PORT_INSTANCE
> A record is logged into IGIdb
> 
> -U [[number ....]|[number_range]
> This command should be run after cvsup of the ports. I 
> envisage as a tool to manage the upgrade of each 
> PORT_INSTANCE using the information contained in IGIdb to 
> identify the upgrade target. I have no idea how this might 
> work but my guess is that someone with more experience than I 
> might feel it has some future.
> 
> Ok
> 
> Is this doable??
> Would it work?
> Would it have value?
> Is there a better way or existing tool/tools that can do this?
> 
> david
> 

On reflection I thought it better to start a generic thread to discuss this away from the www/joomla instance discussion.

David




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070330112822.CYSZ12099.dukecmmtao03.coxmail.com>