"Wee Yeh Tan" writes:
> Hi,
> 
> This issue came up when I wrote the manifest for SunDS at my workplace.
> 
> SMF instances must either be "named" at import via the <instance
> name=...> tag or it can be a default instance.
> 
> Can SMF be extended to support delivery of "unnamed" service instances?
> 
> A typical example will be for SunDS where the user will create an LDAP
> instance.  The instance name is not known at the point of
> installation.  If SunDS wants to do SMF, the manifest has to be
> generated and imported at the creation of the LDAP instance.

You can specify shared configuration on the service in the manifest, and
just create an instance via a set of svccfg commands when you're ready to
set it up.

   svccfg -s <my service> add <new instance name>
   svccfg -s <service>:<instance> addpg general framework
   svccfg -s <service>:<instance> setprop general/enabled = boolean: false

   (anything else you need to do)

   svcadm enable service:instance

Right now, that's complex enough that embedding it in a script is 
probably useful.  Though it's easier to do that creating new manifests, 
I think.  (And is the solution that the JES development team has talked 
about using for the App Server, if I recall correctly.)

> Alternatively, we can support something like:
>   <instance name = "*" ...>
> and supply a start/stop method that takes in instance_name as an arguement.
> 
> We can then do:
>   svcadm enable ldap-server:newinstance
> without having to import a new service instance.
> 
> This should benefit any services that supports creation of instances.

Interesting!  We *should* make it easier to tear off new instances -- 
I'll think about this as we're exploring templates further too, as they
could allow you when creating the service to specify the required bits on
a new instance (new name, maybe a different method, etc.).

   http://www.opensolaris.org/os/project/vpanels/templates/

Expect a proposal in this space as we get further along in considering 
how we can enhance the svc* commands using templates.  I'm looking 
forward to getting feedback once I've got a coherent first draft of the 
proposal.

liane
-- 
Liane Praza, Solaris Kernel Development
liane.praza at sun.com - http://blogs.sun.com/lianep



Reply via email to