Hi,

> Well, let's review what we want to accomplish:
> 
> 1. We want to support multiple versions from a single manifest. (directory 
> structure as in the DRAFT, I think the directory structure is a good idea in 
> itself).
> 2. We (read: I) want the most important of  Solaris' nice bundled packages, 
> such Apache, to support delegation out-of-the-box.

Additional requirement:
For a given service instance of Apache, user should be able to start
prefork (application name "httpd") or worker (application name "httpd.worker") 
server either in 32 or 64 bit mode.

> #2 is not accomplished with the current DRAFT as an instance will still be 
> forced to have config in /etc, logs in /var, and so on, without any 
> possibility for override.

> Here is a possible solution:

> <exec_method 
>     type='method' 
>     name='start'
>     exec='/usr/apache2/%{httpd/version}/bin/apachectl 
> %{httpd/startup_options} -k start'
>     ...
>    />
> 
> A site wanting to use a specific version of Apache would set the 
> httpd/version property to e.g. "2.2.6" which would cause the manifest to 
> start v2.2.6 of Apache. Furthermore a site wanting to customize the location 
> of conf files and the like would set the httpd/startup_options property to 
> e.g. "-f /foo/apache/conf/httpd.conf".
> 
> There you go: both requirements from above supported within the same solution 
> ... and we rely on apachectl for everything which is what we should do.

Agreed, this is a better approach.

But, how do we handle the case of starting of 32 and 64 bit Apache instances.
64 bit binaries will be installed under either "sparcv9"
or "amd64" sub directories.

For e.g., /usr/apache2/2.2/bin          --> 32 bit
          /usr/apache2/2.2/bin/amd64    --> 64 bit
or        /usr/apache2/2.2/bin/sparcv9  --> 64 bit

I was thinking of a bitness property of the type boolean for choosing the 64 
bit server.
So, when the user sets it to true, the method script can choose the appropriate 
apachectl based on the
architecture. But without this script, we will have to have a property of the 
type "astring" for
specifying either the 64 bit directory name or the complete path to the 
apachectl script (instead of
manifest forming it based on the version and bitness).

Another requirement is the choice of prefork and worker server.
apachectl uses HTTPD variable to choose the server. User can set this variable
within /etc/apache2/2.2/envvars.
In SMF mode, method script could have set this variable. Otherwise, apachectl 
should be
modified to lookup this SMF property.

> To really support out-of-the-box delegation we would need to add 
> action_authorization and value_authorization tags in the proper places in the 
> manifest, which is something the 2.0 manifest does not have as of today - 
> unlike other of the core Solaris manifests.
> Later I'll post a full manifest to give the full picture.

That will help.


Thanks and Regards,
Seema.

Reply via email to