Adding sling config data to launchpad debian packaging

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding sling config data to launchpad debian packaging

Bruce Edge
I¹d like to extend the debian packaging contrib to allow the user some
degree of configurability in terms of things like:
- Adding new OBR repositories
- Setup logging preferences
- Bundle specific configuration data

My use case is to provide developers with an installable launchpad package
that reads optional config data to seed the items above. This minimizes
the effort to get a team up and running with a specific sling
configuration.

What are the options for seeding this type data before the initial launch,
or, immediately after?

With most apps one would provide an etc/defaults file, but in the sling
case, I¹m not sure how the above data is stored.

Would a config script that POSTs data to the servlet be appropriate for
this case?

How does one configure new OBR repos non-interactively?

-Bruce

Reply | Threaded
Open this post in threaded view
|

Re: Adding sling config data to launchpad debian packaging

Felix Meschberger-3
Hi Bruce

The most basic information Sling reads is the sling.properties file which is generally found at ${sling.home}/sling.properties. Defining the "sling.properties“ as a system or startup property you can specify a different location or name for that file. For example:

> $ java -jar sling.jar -Dsling.properties=/etc/defaults/sling

The next level of configurations are the OSGi configurations loaded by the Launchpad Installer during initial installation. These files are read from the ${sling.home}/install folder and can be set by the „sling.installer.dir“ system property. For example:

> $ java -jar sling.jar -Dsling.installer.dir='${sling.home}/installer‘

Unfortunately, this property is currently single valued and for moving configuration into /etc it is not really suitable since that would mean moving all initially installed bundles and configurations there.

Hope this helps

Regards
Felix


> Am 20.01.2015 um 08:19 schrieb Bruce Edge <[hidden email]>:
>
> I¹d like to extend the debian packaging contrib to allow the user some
> degree of configurability in terms of things like:
> - Adding new OBR repositories
> - Setup logging preferences
> - Bundle specific configuration data
>
> My use case is to provide developers with an installable launchpad package
> that reads optional config data to seed the items above. This minimizes
> the effort to get a team up and running with a specific sling
> configuration.
>
> What are the options for seeding this type data before the initial launch,
> or, immediately after?
>
> With most apps one would provide an etc/defaults file, but in the sling
> case, I¹m not sure how the above data is stored.
>
> Would a config script that POSTs data to the servlet be appropriate for
> this case?
>
> How does one configure new OBR repos non-interactively?
>
> -Bruce
>

Reply | Threaded
Open this post in threaded view
|

Re: Adding sling config data to launchpad debian packaging

Bruce Edge
>
>The most basic information Sling reads is the sling.properties file which
>is generally found at ${sling.home}/sling.properties. Defining the
>"sling.properties“ as a system or startup property you can specify a
>different location or name for that file. For example:
>
>>$ java -jar sling.jar -Dsling.properties=/etc/defaults/sling

sling.properties specifies:
obr.repository.url=http\://sling.apache.org/obr/repository.xml

Does this property allow additional comma separated values, or would one
have to override the URL and provide a complete set of OBR repos in the
new URL?
Which, raises the next question, how is
http\://sling.apache.org/obr/repository.xml generated?
This is the only http url in sling.properties, is there a reason that this
is not seeded with static data? Is this to handle the case where the
default OBR repo URLs may change?

Are there any other hooks from which sling pulls configuration data over
HTTP aside from the OBR list?

>
>The next level of configurations are the OSGi configurations loaded by
>the Launchpad Installer during initial installation. These files are read
>from the ${sling.home}/install folder and can be set by the
>„sling.installer.dir“ system property. For example:
>
>>$ java -jar sling.jar -Dsling.installer.dir='${sling.home}/installer‘
>
>Unfortunately, this property is currently single valued and for moving
>configuration into /etc it is not really suitable since that would mean
>moving all initially installed bundles and configurations there.

The contents of ${sling.home}/installer are a single java serialization
data file:
-rw-r--r-- 1 sling adm 45646 Jan 18 23:49 RegisteredResourceList.ser
What’s in this file?
Can one add bundles and/or other resources to this location?

In a related question, is it good practice to replicate the
launchpad/builder project outside of the sling tree to create a custom
launchpad?

I’m a bit overwhelmed at the size & scope of the contents of the sling svn
tree. Is there any docs on the overall tree structure and the intent
behind some of the components? i.e.: Use a sample for new XXX projects,
etc.

I’m re-thinking the debian packaging stuff I contributed earlier in that
maybe it does belong in the launchpad/builder as then that folder offers a
way to build fully customized sling instances into debian packages.
Although, I suppose one just needs to pull out launchpad/builder and
contrib/launchpad/debian into two local projects to make a fully
customized distro package as the maven resolver will “do the right thing”
and put everything together as needed.
I’ll play with this and if it works, add it to the debian/README.

-Bruce

>
>Hope this helps
>
>Regards
>Felix
>
>
>>Am 20.01.2015 um 08:19 schrieb Bruce Edge
>><[hidden email]>:
>>I¹d like to extend the debian packaging contrib to allow the user some
>>degree of configurability in terms of things like:
>>- Adding new OBR repositories
>>- Setup logging preferences
>>- Bundle specific configuration data
>>My use case is to provide developers with an installable launchpad
>>package
>>that reads optional config data to seed the items above. This minimizes
>>the effort to get a team up and running with a specific sling
>>configuration.
>>What are the options for seeding this type data before the initial
>>launch,
>>or, immediately after?
>>With most apps one would provide an etc/defaults file, but in the sling
>>case, I¹m not sure how the above data is stored.
>>Would a config script that POSTs data to the servlet be appropriate for
>>this case?
>>How does one configure new OBR repos non-interactively?
>>-Bruce
>
>
>
>