Re: Is Sling DevOps and Cluster friendly?

2014-04-23 Thread Bertrand Delacretaz
Hi,

On Sat, Nov 16, 2013 at 10:58 AM, Ian Boston i...@tfd.co.uk wrote:
 ...the repository under Sling would have to be
 reserved for data generated by the application or initial content,
 whilst application code and configuration is kept on the filesystem,
 so that a running instance could be upgraded entirely on the
 filesystem by configuration management and versioned in a single
 atomic operation...

FYI, in case anyone's interested we've been doing some experiments
along these lines with my intern Artyom. The experiments themselves
are at [1] and we'll be using the work-in-progress contrib/crankstart
module to continue experimenting.

This experimental crankstart launcher fully defines a Sling instance
in a text file like [2], which is useful in a devops/continuous
deployment context, especially if Sling instances can be considered
throwaway - in our experiments we never change the configuration of
a Sling instance (in a wide sense, configuration including bundles,
scripts, OSGi configs etc) but spin up and switch to new Sling
instances when the config changes. Careful coordination with the HTTP
front-end (mod_proxy or similar) allows for the switch from one
configuration to the next to be atomic, as seen from the outside.

This is all still very experimental...just wanted to share the rough
ideas in case people are interested in contributing or playing with
that stuff.

-Bertrand

[1] https://github.com/bdelacretaz/sling-devops-experiments (and
Artyom's fork might be more current,
https://github.com/ArtyomStetsenko/sling-devops-experiments)

[2] 
http://svn.apache.org/repos/asf/sling/trunk/contrib/crankstart/launcher/sling.crank.txt


Re: Is Sling DevOps and Cluster friendly?

2013-11-27 Thread Bertrand Delacretaz
Hi,

On Wed, Nov 20, 2013 at 11:49 AM, Felix Meschberger fmesc...@adobe.com wrote:
 Am 20.11.2013 um 20:08 schrieb Bertrand Delacretaz bdelacre...@apache.org:
 ...Due to the async way in which Sling handles config and code changes,
 making sure things happen atomically might require some work.

 Well, if we want to do that we really should investigate Deployment Admin 
 because this has
 transactional promises: Either all or nothing

Inside of straining too much inside Sling, we might also take a
systems approach to this and use throwaway Sling instances.

To upgrade to a more recent config (including rendering scripts etc)
start a new instance, and once it's ready have the front-end switch to
it gracefully, like apachectl -k restart does.

I've been playing a bit with http://www.docker.io/ and I like what I
see - initial experiments at [1] FWIW. Ironing out the details would
need work, of course ;-)

-Bertrand

[1] 
https://git.corp.adobe.com/bdelacre/docker-experiments/blob/master/sling-runnable-jar/Dockerfile


Re: Is Sling DevOps and Cluster friendly?

2013-11-27 Thread Bertrand Delacretaz
On Wed, Nov 27, 2013 at 10:55 AM, Bertrand Delacretaz
bdelacre...@apache.org wrote:
 ...I've been playing a bit with http://www.docker.io/ and I like what I
 see - initial experiments at [1] FWIW...

I sent a wrong link, sorry, the right one is
https://github.com/bdelacretaz/docker-experiments/blob/master/sling-runnable-jar/Dockerfile

-Bertrand