directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r635524 - in /directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main: java/org/apache/directory/daemon/installers/bin/ resources/org/apache/directory/daemon/installers/bin/
Date Mon, 10 Mar 2008 11:06:21 GMT
Author: pamarcelot
Date: Mon Mar 10 04:06:19 2008
New Revision: 635524

URL: http://svn.apache.org/viewvc?rev=635524&view=rev
Log:
Updated the InstallerCommand for Binary Installer.

Added:
    directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/apacheds-default.conf
    directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/apacheds.conf
Modified:
    directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java
    directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/bootstrap.sh
    directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/install.sh
    directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/variables.sh

Modified: directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java?rev=635524&r1=635523&r2=635524&view=diff
==============================================================================
--- directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java
(original)
+++ directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/java/org/apache/directory/daemon/installers/bin/BinInstallerCommand.java
Mon Mar 10 04:06:19 2008
@@ -109,9 +109,11 @@
 
         // Copying the apacheds files in the root directory
         File binRootDirectory = new File( binDirectory, "root" );
+        binRootDirectory.mkdirs();
+        File binRootServerDirectory = new File( binRootDirectory, "server" );
         try
         {
-            copyFiles( baseDirectory, binRootDirectory );
+            copyFiles( baseDirectory, binRootServerDirectory );
         }
         catch ( IOException e )
         {
@@ -120,27 +122,42 @@
                 + ") to the Bin directory (" + binRootDirectory + ")" );
         }
 
-        // Create sh directory
+        // Create instance and sh directory
+        File binRootInstanceDirectory = new File( binRootDirectory, "instance" );
+        binRootInstanceDirectory.mkdirs();
         File binShDirectory = new File( binDirectory, "sh" );
         binShDirectory.mkdirs();
 
         // Copying the resources files
         try
         {
-            MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "bootstrap.sh"
), new File( binDirectory,
-                "bootstrap.sh" ) );
+            // Copying the apacheds.conf file to the server installation layout
+            MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
"apacheds.conf" ),
+                new File( binRootServerDirectory, "conf/apacheds.conf" ), false );
 
+            // Copying the default instance apacheds.conf file
             MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
-                "createInstaller.sh" ), new File( binDirectory, "createInstaller.sh" ), true
);
-
-            MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "functions.sh"
), new File( binShDirectory,
-                "functions.sh" ) );
-
-            MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "install.sh"
), new File( binShDirectory,
-                "install.sh" ) );
+                "apacheds-default.conf" ), new File( binRootInstanceDirectory, "apacheds.conf"
), false );
 
-            MojoHelperUtils.copyBinaryFile( getClass().getResourceAsStream( "variables.sh"
), new File( binShDirectory,
-                "variables.sh" ) );
+            // Copying the log4j.properties file for the default instance
+            MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, new File( binRootServerDirectory,
+                "conf/log4j.properties" ), new File( binRootInstanceDirectory, "log4j.properties"
), false );
+
+            // Copying the server.xml file for the default instance
+            MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, new File( binRootServerDirectory,
+                "conf/server.xml" ), new File( binRootInstanceDirectory, "server.xml" ),
false );
+
+            // Copying shell script utilities for the installer
+            MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
"bootstrap.sh" ),
+                new File( binDirectory, "bootstrap.sh" ), true );
+            MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
+                "createInstaller.sh" ), new File( binDirectory, "createInstaller.sh" ), true
);
+            MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
"functions.sh" ),
+                new File( binShDirectory, "functions.sh" ), false );
+            MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
"install.sh" ),
+                new File( binShDirectory, "install.sh" ), false );
+            MojoHelperUtils.copyAsciiFile( mymojo, filterProperties, getClass().getResourceAsStream(
"variables.sh" ),
+                new File( binShDirectory, "variables.sh" ), false );
         }
         catch ( IOException e )
         {
@@ -212,5 +229,6 @@
         filterProperties.putAll( mymojo.getProject().getProperties() );
         filterProperties.put( "tmpArchive", "__tmp.tar.gz" );
         filterProperties.put( "finalName", target.getFinalName() );
+        filterProperties.put( "apacheds.version", target.getApplication().getVersion() );
     }
 }

Added: directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/apacheds-default.conf
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/apacheds-default.conf?rev=635524&view=auto
==============================================================================
--- directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/apacheds-default.conf
(added)
+++ directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/apacheds-default.conf
Mon Mar 10 04:06:19 2008
@@ -0,0 +1,41 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#
+  
+#
+# In this file you can override parameters specified in the default
+# Apache Directory Server config file which is usually at
+# /opt/apacheds-x.x.x/conf/apacheds.conf
+#
+# See also http://wrapper.tanukisoftware.org/doc/english/properties.html
+# For a list of properties that can be set.
+#
+# Common overrides shown commented below
+
+
+# Override the JRE used
+# wrapper.java.command=%JAVA_HOME%/bin/java
+
+# Override the JVM memory settings
+# Initial Java Heap Size (in MB)
+# wrapper.java.initmemory=384
+
+# Maximum Java Heap Size (in MB)
+# wrapper.java.maxmemory=384
+
+# apacheds.instance.start=auto
\ No newline at end of file

Added: directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/apacheds.conf
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/apacheds.conf?rev=635524&view=auto
==============================================================================
--- directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/apacheds.conf
(added)
+++ directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/apacheds.conf
Mon Mar 10 04:06:19 2008
@@ -0,0 +1,126 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#
+
+#include /etc/apacheds/%INSTANCE%.conf
+
+# If the default java executable is not on the path,
+# this will need to be set to a fully qualified path.
+# This can also be overridden in /var/lib/apacheds/<instance_name>/conf/apacheds.conf
+#
+#wrapper.java.command=/usr/local/java/jdk1.5.0_10/bin/java
+#
+wrapper.java.command=@app.java.home@
+
+wrapper.java.mainclass=org.apache.directory.daemon.TanukiBootstrapper
+wrapper.max_failed_invocations=1
+
+wrapper.java.classpath.1=../lib/bootstrapper.jar
+wrapper.java.classpath.2=../lib/wrapper.jar
+wrapper.java.classpath.3=../lib/slf4j-api-1.4.3.jar
+wrapper.java.classpath.4=../lib/slf4j-log4j12-1.4.3.jar
+wrapper.java.classpath.5=../lib/log4j-1.2.14.jar
+
+# Java Library Path (location of Wrapper.DLL or libwrapper.so)
+wrapper.java.library.path.1=../lib
+
+# Java Additional Parameters
+wrapper.java.additional.1=-Dlog4j.configuration="file:///%INSTANCE_HOME%/%INSTANCE%/conf/log4j.properties"
+wrapper.java.additional.2=-Dapacheds.var.dir="%INSTANCE_HOME%/%INSTANCE%"
+wrapper.java.additional.3=-Dapacheds.log.dir="%INSTANCE_HOME%/%INSTANCE%/log"
+wrapper.java.additional.4=-Dapacheds.run.dir="%INSTANCE_HOME%/%INSTANCE%/run"
+wrapper.java.additional.5=-Dapacheds.instance=%INSTANCE%
+wrapper.java.additional.6=-Dbootstrap.start.class=org.apache.ldap.server.Service
+wrapper.java.additional.7=-Dbootstrap.stop.class=org.apache.ldap.server.Service
+
+# Initial Java Heap Size (in MB)
+wrapper.java.initmemory=384
+
+# Maximum Java Heap Size (in MB)
+wrapper.java.maxmemory=384
+
+# Application parameters.  Add parameters as needed starting from 1
+wrapper.app.parameter.1="%APACHEDS_HOME%"
+wrapper.app.parameter.2=org.apache.directory.server.Service
+wrapper.app.parameter.3="%INSTANCE_HOME%/%INSTANCE%/conf/server.xml"
+
+#********************************************************************
+# Wrapper Logging Properties
+#********************************************************************
+# Format of output for the console.  (See docs for formats)
+wrapper.console.format=PM
+
+# Log Level for console output.  (See docs for log levels)
+wrapper.console.loglevel=INFO
+
+# Log file to use for wrapper output logging.
+wrapper.logfile="%INSTANCE_HOME%/%INSTANCE%/log/wrapper.log"
+
+# Format of output for the log file.  (See docs for formats)
+wrapper.logfile.format=LPTM
+
+# Log Level for log file output.  (See docs for log levels)
+wrapper.logfile.loglevel=INFO
+
+# Maximum size that the log file will be allowed to grow to before
+#  the log is rolled. Size is specified in bytes.  The default value
+#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
+#  'm' (mb) suffix.  For example: 10m = 10 megabytes.
+wrapper.logfile.maxsize=1m
+
+# Maximum number of rolled log files which will be allowed before old
+#  files are deleted.  The default value of 0 implies no limit.
+wrapper.logfile.maxfiles=5
+
+# Log Level for sys/event log output.  (See docs for log levels)
+wrapper.syslog.loglevel=NONE
+
+#********************************************************************
+# Wrapper Windows Properties
+#********************************************************************
+# Title to use when running as a console
+wrapper.console.title=apacheds-%INSTANCE%
+
+#********************************************************************
+# Wrapper Windows NT/2000/XP Service Properties
+#********************************************************************
+# WARNING - Do not modify any of these properties when an application
+#  using this configuration file has been installed as a service.
+#  Please uninstall the service before modifying this section.  The
+#  service can then be reinstalled.
+
+# Name of the service
+wrapper.ntservice.name=apacheds-%INSTANCE%
+
+# Display name of the service
+wrapper.ntservice.displayname=Apache Directory Server - %INSTANCE%
+
+# Description of the service
+wrapper.ntservice.description=Apache Directory Server - %INSTANCE%
+
+# Service dependencies.  Add dependencies as needed starting from 1
+#wrapper.ntservice.dependency.1=
+
+# Mode in which the service is installed.  AUTO_START or DEMAND_START
+wrapper.ntservice.starttype=AUTO_START
+
+# Allow the service to interact with the desktop.
+wrapper.ntservice.interactive=false
+
+# Anything after this line can't be overridden
+#include "%INSTANCE_HOME%/%INSTANCE%/conf/apacheds.conf"
\ No newline at end of file

Modified: directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/bootstrap.sh
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/bootstrap.sh?rev=635524&r1=635523&r2=635524&view=diff
==============================================================================
--- directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/bootstrap.sh
(original)
+++ directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/bootstrap.sh
Mon Mar 10 04:06:19 2008
@@ -1,5 +1,8 @@
 #!/bin/sh
 
+# Variables
+export APACHEDS_VERSION=${apacheds.version}
+
 # Displaying welcome message and license terms
 more <<"EOF"
                    WELCOME TO THE APACHE DS INSTALLER PROGRAM

Modified: directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/install.sh
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/install.sh?rev=635524&r1=635523&r2=635524&view=diff
==============================================================================
--- directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/install.sh
(original)
+++ directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/install.sh
Mon Mar 10 04:06:19 2008
@@ -28,25 +28,26 @@
 # Installing
 echo "Installing..."
 
-# Installing Apache DS core files
+# Copying the server files
 mkdir -p $APACHEDS_HOME_DIRECTORY
-cp -r ../data/apacheds/* $APACHEDS_HOME_DIRECTORY
+cp -r ../root/server/* $APACHEDS_HOME_DIRECTORY
 
-# Creating Instances Home Directory
+# Creating instances home directory
 mkdir -p $INSTANCES_HOME_DIRECTORY
 
-# Creating the Example Instance
-case $userInput in
-    [yY] | [yY][eE][sS])
-        EXAMPLE_HOME_DIRECTORY=$INSTANCES_HOME_DIRECTORY/example;
-        mkdir -p $EXAMPLE_HOME_DIRECTORY;
-        mkdir -p $EXAMPLE_HOME_DIRECTORY/conf;
-        mkdir -p $EXAMPLE_HOME_DIRECTORY/ldif;
-        mkdir -p $EXAMPLE_HOME_DIRECTORY/log;
-        mkdir -p $EXAMPLE_HOME_DIRECTORY/partitions;
-        mkdir -p $EXAMPLE_HOME_DIRECTORY/run;
-        cp ../data/example_instance/apacheds.conf $EXAMPLE_HOME_DIRECTORY/conf/;
-        cp ../data/example_instance/log4j.properties $EXAMPLE_HOME_DIRECTORY/conf/;
-        cp ../data/example_instance/server.xml $EXAMPLE_HOME_DIRECTORY/conf/;
-        cp ../data/example_instance/example.ldif $EXAMPLE_HOME_DIRECTORY/ldif/
-esac
+# Creating the default instance home directory
+DEFAULT_INSTANCE_HOME_DIRECTORY=$INSTANCES_HOME_DIRECTORY/example;
+mkdir -p $DEFAULT_INSTANCE_HOME_DIRECTORY
+mkdir -p $DEFAULT_INSTANCE_HOME_DIRECTORY/conf
+mkdir -p $DEFAULT_INSTANCE_HOME_DIRECTORY/ldif
+mkdir -p $DEFAULT_INSTANCE_HOME_DIRECTORY/log
+mkdir -p $DEFAULT_INSTANCE_HOME_DIRECTORY/partitions
+mkdir -p $DEFAULT_INSTANCE_HOME_DIRECTORY/run
+
+# Copying the default instance files
+cp ../instance/apacheds.conf $DEFAULT_INSTANCE_HOME_DIRECTORY/conf/
+cp ../instance/log4j.properties $DEFAULT_INSTANCE_HOME_DIRECTORY/conf/
+cp ../instance/server.xml $DEFAULT_INSTANCE_HOME_DIRECTORY/conf/
+
+# Creating the directory for the pid files
+mkdir -p /var/run/apacheds-${APACHEDS_VERSION}
\ No newline at end of file

Modified: directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/variables.sh
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/variables.sh?rev=635524&r1=635523&r2=635524&view=diff
==============================================================================
--- directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/variables.sh
(original)
+++ directory/sandbox/pamarcelot/trunks/apacheds-additional-installers/daemon/plugin/src/main/resources/org/apache/directory/daemon/installers/bin/variables.sh
Mon Mar 10 04:06:19 2008
@@ -1,4 +1,3 @@
 #!/bin/sh
-Where do you want to install Apache DS|APACHEDS_HOME_DIRECTORY|/usr/local/apacheds||
-Where do you want to install Apache DS instances|INSTANCES_HOME_DIRECTORY|${APACHEDS_HOME_DIRECTORY}/instances||
-Do you want to create an example instance|CREATE_EXAMPLE_INSTANCE|yes||
+Where do you want to install Apache DS|APACHEDS_HOME_DIRECTORY|/opt/apacheds-${APACHEDS_VERSION}||
+Where do you want to install Apache DS instances|INSTANCES_HOME_DIRECTORY|/var/lib/apacheds-${APACHEDS_VERSION}||



Mime
View raw message