You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Romain_FR <ro...@capgemini.com> on 2015/02/17 18:44:38 UTC

Re: Oak + Sling

Hi,

is there any improvements concerning this problem ?

For our project, we are looking for the solution to use Sling with Oak.

Romain



--
View this message in context: http://apache-sling.73963.n3.nabble.com/Oak-Sling-tp4041347p4047440.html
Sent from the Sling - Dev mailing list archive at Nabble.com.

Re: Oak + Sling

Posted by Tomek Rękawek <to...@cognifide.com>.
Hello Bruce,

I've just committed the sling-s3 module to the sling/contrib [1]. I also
added new sling/contrib/extensions/oak-s3 module that gathers all
dependencies required to run S3 on Oak.

On Thu, Mar 12, 2015 at 11:58 PM, Bruce Edge <br...@nextissuemedia.com>
wrote:
>
> There's a few options here.
> 1) If the Sling-S3 is as a contrib component, then I can depend on it
> within the packaging module. Although I'm not sure exactly what the
> cleanest way to pull it in is, as it's not a maven artifact and I really
> just need the base templates & the ruby script. I suppose it could be
> packaged as resources in a jar. That doesn't feel right though.
>

It doesn't have to be jar, we can wrap it in a Maven module producing tgz
or zip assembly, but still - it's somehow strange.


> Where you you see this in the sling tree? While it is an end to end
> S3/mongo setup, it's more akin to a contrib module for crankstart as it
> provides a quick start setup for crankstart.
>

Yep, I put it into the contrib.


> 2) I could pull your scripts directly into the packaging module, but I
> think this loses some flexibility. While it doesn't restrict anyone from
> using it in a non-debian/ubuntu manner, it does make it a bit confusing if
> it's all wrapped up with the debian bits.
>

I agree. Right now one can simply svn export the sling-s3 module and run it
on any OS providing "make" command.


> 3) Add the debian packaging folder under Sling-S3 (or whatever you end up
> calling it). That way I can refer to the parent module for all the pieces
> I need and it doesn¹t imply that one needs to build a .deb to use it.
>

Sounds good.


> Regarding the actual packaging I'm thinking of putting the crank.*/ dirs
> into /etc/sling/crank.*/ such that they are treated as config files such
> that they are created if not present on initial installation, but then
> remain untouched by update installations.
> This lets the user modify these files as needed, while at the same time
> retaining the ability to update the crank.d/*-sling-startlevel-*.txt
> manually for existing installations.
>

Good idea. It'll mimic other Linux services using this convention and also
it'll separate configuration from the code.


> The building phase (install-deps & make target/*) would take place from
> the package's postinst script, as it will have internet connectivity
> during this phase.
>

Please notice that when you start Sling via Crankstart it'll probably also
need an internet connection, as it'll try to download bundles present in
the configuration but not in the local repo. The install-deps was
responsible only for downloading and installing only a few SNAPSHOT
dependencies from the SVN, but in the contributed version I removed it and
configured crankstart to use snapshot Apache Maven repository [2].

Right now there is no way to force downloading all configured dependencies
other than running Crankstart. We can think about some way to provide such
feature, it'll require modyfing Crankstart or creating a new Java
executable.


> Lastly, /etc/default/sling will define the storage mode for sling, unset
> (default to tar), s3, mongo, or s3-mongo.
>

Sounds good.

Regards,
Tomek

[1] http://svn.apache.org/repos/asf/sling/trunk/contrib/sling-s3/
[2] https://repository.apache.org/content/repositories/snapshots/

-- 
Tomek Rękawek
Senior Software Engineer

Cognifide Polska Sp. z o.o.
skype: trekawek

www.cognifide.com

Re: Oak + Sling

Posted by Bruce Edge <br...@nextissuemedia.com>.
>On Tue, Feb 17, 2015 at 10:58 PM, Bertrand Delacretaz <
>bdelacretaz@apache.org> wrote:
>
>>(...)
>>Tomasz just published https://github.com/trekawek/Sling-S3 with
>>interesting setups for running Sling on Oak + Mongo. That stuff is not
>>officially part of Sling but now that he's a committer, having more
>>users might convince him to bring this here as a contrib ;-)
>
>
>After such call I have no other choice but to move Sling-S3 to the Sling
>contrib :) I'll do it in a few days.
>

I¹d like to update that debian packaging module I did to use this
crankstart mechanism instead of launchpad because it provides a more
flexibility for configuring options at runtime.

There¹s a few options here.
1) If the Sling-S3 is as a contrib component, then I can depend on it
within the packaging module. Although I¹m not sure exactly what the
cleanest way to pull it in is, as it¹s not a maven artifact and I really
just need the base templates & the ruby script. I suppose it could be
packaged as resources in a jar. That doesn¹t feel right though.

Where you you see this in the sling tree? While it is an end to end
S3/mongo setup, it¹s more akin to a contrib module for crankstart as it
provides a quick start setup for crankstart.

2) I could pull your scripts directly into the packaging module, but I
think this loses some flexibility. While it doesn¹t restrict anyone from
using it in a non-debian/ubuntu manner, it does make it a bit confusing if
it¹s all wrapped up with the debian bits.

3) Add the debian packaging folder under Sling-S3 (or whatever you end up
calling it). That way I can refer to the parent module for all the pieces
I need and it doesn¹t imply that one needs to build a .deb to use it.


Regarding the actual packaging I¹m thinking of putting the crank.*/ dirs
into /etc/sling/crank.*/ such that they are treated as config files such
that they are created if not present on initial installation, but then
remain untouched by update installations.
This lets the user modify these files as needed, while at the same time
retaining the ability to update the crank.d/*-sling-startlevel-*.txt
manually for existing installations.
The building phase (install-deps & make target/*) would take place from
the package¹s postinst script, as it will have internet connectivity
during this phase. 
Lastly, /etc/default/sling will define the storage mode for sling, unset
(default to tar), s3, mongo, or s3-mongo.


-Bruce


Re: Oak + Sling

Posted by Tomek Rękawek <to...@cognifide.com>.
Hello,

On Tue, Feb 17, 2015 at 10:58 PM, Bertrand Delacretaz <
bdelacretaz@apache.org> wrote:

> (...)
> Tomasz just published https://github.com/trekawek/Sling-S3 with
> interesting setups for running Sling on Oak + Mongo. That stuff is not
> officially part of Sling but now that he's a committer, having more
> users might convince him to bring this here as a contrib ;-)


After such call I have no other choice but to move Sling-S3 to the Sling
contrib :) I'll do it in a few days.

Regards,
Tomek

-- 
Tomek Rękawek
Senior Software Engineer

Cognifide Polska Sp. z o.o.
skype: trekawek

www.cognifide.com

Re: Oak + Sling

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,

On Tue, Feb 17, 2015 at 6:44 PM, Romain_FR <ro...@capgemini.com> wrote:
> ...is there any improvements concerning this problem ?
> For our project, we are looking for the solution to use Sling with Oak....

Tomasz just published https://github.com/trekawek/Sling-S3 with
interesting setups for running Sling on Oak + Mongo. That stuff is not
officially part of Sling but now that he's a committer, having more
users might convince him to bring this here as a contrib ;-)

Note that we should eventually update the Crankstart launcher to use
the tooling/support/provisioning-model format. Once that happens the
format of the crankstart files will change, but the conversion should
be fairly simple.

-Bertrand