You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ace.apache.org by Philipp Buluschek <dj...@gmail.com> on 2014/04/24 08:57:32 UTC

Questions on ACE

Dear all

Initiated with my question on SO 
(http://stackoverflow.com/questions/23243609), I have tried the ACE demo 
and have found it very good. I would like to clarify whether the 
following things are possible with it, and if not whether you think that 
a modification of the sources could (easily) be done to support that.

My use case: I will have several hundred embedded systems running Felix 
which must be kept up to date. I will probably have few (maybe 4) 
different "distributions" (ie. applications), each on many of those 
systems. Here are my questions:

Can I put targets (ie. the machines to be updated) into groups, so that 
I can easily deploy a new version of a distribution to a large group of 
targets?

Can I configure when the update takes place - ideally some time in the 
night (when the users don't use the system) with a large jitter (so the 
server is not overloaded all at once).

Can I configure locally (on the agent) whether it should update?

Can I update the OSGI framework itself from ACE?

Thanks & regards
   Philipp



Re: Questions on ACE

Posted by Philipp Buluschek <dj...@gmail.com>.
Thank you all for the quick answers.

I understand that most things I need are somehow possible (cool!). 
Unfortunately I will not be able to test your suggestions immediately. I 
will report again as soon as I can set up a real server with real 
devices to test in more real-world settings than only client/server 
locally on my dev machine.

Regards Philipp


On 24.04.2014 09:55, Jan Willem Janssen wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Philipp,
>
> Good to hear ACE solves most of your use-cases already, see my
> (lengthy) answers inline.
>
> On 24/04/14 08:57, Philipp Buluschek wrote:
>> My use case: I will have several hundred embedded systems running
>> Felix which must be kept up to date. I will probably have few
>> (maybe 4) different "distributions" (ie. applications), each on
>> many of those systems. Here are my questions:
>>
>> Can I put targets (ie. the machines to be updated) into groups, so
>> that I can easily deploy a new version of a distribution to a large
>> group of targets?
> There is no "real" grouping mechanism for targets yet. However, there
> are two ways you could solve this right now:
>
> * from the web UI, you can select a number of targets that need
>    approval, and hit the 'A' button. This allows you to approve all of
>    those in a single step. This can be made a little easier when ACE-320
>    and ACE-321 are resolved;
>
> * alternatively, you can add a custom tag to all targets that divides
>    them into groups, after which you use the GoGo shell to approve them:
>
>    w = (cw)
>    each ($w lt "(customTag=target-group-X)") {$it approve}
>    $w commit
>
>> Can I configure when the update takes place - ideally some time in
>> the night (when the users don't use the system) with a large jitter
>> (so the server is not overloaded all at once).
> The ACE agent, responsible for the deployment on the target side, is
> responsible for checking whether updates are available and, if so,
> downloads it. The server does not push updates to the targets. That
> said, if you are worrying about the load on the ACE server, you might
> consider using ACE relays to distribute the load over more servers.
>
> At the target-side, the default agent can be configured to perform its
> update-check by specifying the "-Dagent.controller.syncinterval=N",
> where N is the interval in seconds. By default, it runs once every 30
> seconds.
>
>> Can I configure locally (on the agent) whether it should update?
> The default agent has one simple rule: if there is an update
> available, it'll download and install it.
>
> To get more control on whether an update should be installed, for
> example, by explicit user intervention, you need to create a custom
> controller for the agent. Examples on how to do this can be found in
> the `org.apache.ace.agent.controller.itest` project (see [1]).
>
>> Can I update the OSGI framework itself from ACE?
> Just like it is currently possible to update the ACE agent itself,
> updating the OSGi FW is possible as well (it is a bundle, so can be
> updated).
>
> However, it is not implemented yet, as it requires some work. For the
> launcher (responsible for bootstrapping the target) to update the FW,
> it must work with its own classloader (allowing you to load two OSGi
> frameworks separately) and on the server side, a mechanism for
> providing information on whether there are FW updates available must
> be made (I'm not sure if this is a matter of configuration or whether
> actual code changes need to be done).
>
>
> 1.
> http://svn.apache.org/repos/asf/ace/trunk/org.apache.ace.agent.controller.itest/src/org/apache/ace/agent/itest/
>
> - -- 
> Met vriendelijke groeten | Kind regards
>
> Jan Willem Janssen | Software Architect
> +31 631 765 814
>
> /My world is revolving around PulseOn and Amdatu/
>
> Luminis Technologies B.V.
> J.C. Wilslaan 29
> 7313 HK   Apeldoorn
> +31 88 586 46 30
>
> http://www.luminis-technologies.com
> http://www.luminis.eu
>
> KvK (CoC) 09 16 28 93
> BTW (VAT) NL8169.78.566.B.01
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBAgAGBQJTWMOGAAoJEKF/mP2eHDc4CUwQALP1rVZqY1OzhzKotrxcp13V
> cpXYvZuhOxe2qdqvxrmfg4PDUEXcRIu2vkMjIYBWrc3jwusw05eO7O6fxrVzRjrU
> 5vP2OnkwrOy0xHc+x/8F/5g//wu4BzDW225PCIIs/1zP2Y0MSP7RqiRiYWXhVmU6
> q9eLfOQtWCdBIB+3dfXXz2BsclEmBgI8mDi+LtGc0h0Gh84MX5DfDdisg/6deFiZ
> LnTgLROwKb565jizA7OINQx4SBPn4VrjYd+FuFHJwbCOP9JgKlDbR6zHiQtdbzdE
> 1C9AK4l37EUlPkm5HgPkoY5+c1mVCtydrCe2ufV1AnqBEEqpdnikvXUMAxa/zIke
> vsr4h8q+ieGKM/RKQeh0WgtW9d9p94Z3MMXFB6bvkHvDk0IS4oYLEgEyYxGPlpxH
> x6tIdTl68Dn1rVcRO4b5G+7ujoZWtQRmKAm8gwyfcZPb+gWLBnnJHq6B/+P9Ouuw
> vD0pJjxtQDCpOGo3kCXsIf3LuhSk9RXML1+CbM+zQdYTUMI3EqUSrvfrbqoYazh5
> jHqHEItLHsJtehnmW5HgaousdiyU71N+Xu3ydPPymCeAb3z+2Igv64jVj2+in/Z2
> JQIAdVOkTcVuwpS9D2TNjQCTFvWmvg+gYDlI8+a1qVXP21weEt2/Xnt/I9DB7V/z
> tGX5BlTIxmDXKLGRHq2/
> =udmU
> -----END PGP SIGNATURE-----


Re: Questions on ACE

Posted by Jan Willem Janssen <ja...@luminis.eu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Philipp,

Good to hear ACE solves most of your use-cases already, see my
(lengthy) answers inline.

On 24/04/14 08:57, Philipp Buluschek wrote:
> My use case: I will have several hundred embedded systems running
> Felix which must be kept up to date. I will probably have few
> (maybe 4) different "distributions" (ie. applications), each on
> many of those systems. Here are my questions:
> 
> Can I put targets (ie. the machines to be updated) into groups, so
> that I can easily deploy a new version of a distribution to a large
> group of targets?

There is no "real" grouping mechanism for targets yet. However, there
are two ways you could solve this right now:

* from the web UI, you can select a number of targets that need
  approval, and hit the 'A' button. This allows you to approve all of
  those in a single step. This can be made a little easier when ACE-320
  and ACE-321 are resolved;

* alternatively, you can add a custom tag to all targets that divides
  them into groups, after which you use the GoGo shell to approve them:

  w = (cw)
  each ($w lt "(customTag=target-group-X)") {$it approve}
  $w commit

> Can I configure when the update takes place - ideally some time in
> the night (when the users don't use the system) with a large jitter
> (so the server is not overloaded all at once).

The ACE agent, responsible for the deployment on the target side, is
responsible for checking whether updates are available and, if so,
downloads it. The server does not push updates to the targets. That
said, if you are worrying about the load on the ACE server, you might
consider using ACE relays to distribute the load over more servers.

At the target-side, the default agent can be configured to perform its
update-check by specifying the "-Dagent.controller.syncinterval=N",
where N is the interval in seconds. By default, it runs once every 30
seconds.

> Can I configure locally (on the agent) whether it should update?

The default agent has one simple rule: if there is an update
available, it'll download and install it.

To get more control on whether an update should be installed, for
example, by explicit user intervention, you need to create a custom
controller for the agent. Examples on how to do this can be found in
the `org.apache.ace.agent.controller.itest` project (see [1]).

> Can I update the OSGI framework itself from ACE?

Just like it is currently possible to update the ACE agent itself,
updating the OSGi FW is possible as well (it is a bundle, so can be
updated).

However, it is not implemented yet, as it requires some work. For the
launcher (responsible for bootstrapping the target) to update the FW,
it must work with its own classloader (allowing you to load two OSGi
frameworks separately) and on the server side, a mechanism for
providing information on whether there are FW updates available must
be made (I'm not sure if this is a matter of configuration or whether
actual code changes need to be done).


1.
http://svn.apache.org/repos/asf/ace/trunk/org.apache.ace.agent.controller.itest/src/org/apache/ace/agent/itest/

- -- 
Met vriendelijke groeten | Kind regards

Jan Willem Janssen | Software Architect
+31 631 765 814

/My world is revolving around PulseOn and Amdatu/

Luminis Technologies B.V.
J.C. Wilslaan 29
7313 HK   Apeldoorn
+31 88 586 46 30

http://www.luminis-technologies.com
http://www.luminis.eu

KvK (CoC) 09 16 28 93
BTW (VAT) NL8169.78.566.B.01
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJTWMOGAAoJEKF/mP2eHDc4CUwQALP1rVZqY1OzhzKotrxcp13V
cpXYvZuhOxe2qdqvxrmfg4PDUEXcRIu2vkMjIYBWrc3jwusw05eO7O6fxrVzRjrU
5vP2OnkwrOy0xHc+x/8F/5g//wu4BzDW225PCIIs/1zP2Y0MSP7RqiRiYWXhVmU6
q9eLfOQtWCdBIB+3dfXXz2BsclEmBgI8mDi+LtGc0h0Gh84MX5DfDdisg/6deFiZ
LnTgLROwKb565jizA7OINQx4SBPn4VrjYd+FuFHJwbCOP9JgKlDbR6zHiQtdbzdE
1C9AK4l37EUlPkm5HgPkoY5+c1mVCtydrCe2ufV1AnqBEEqpdnikvXUMAxa/zIke
vsr4h8q+ieGKM/RKQeh0WgtW9d9p94Z3MMXFB6bvkHvDk0IS4oYLEgEyYxGPlpxH
x6tIdTl68Dn1rVcRO4b5G+7ujoZWtQRmKAm8gwyfcZPb+gWLBnnJHq6B/+P9Ouuw
vD0pJjxtQDCpOGo3kCXsIf3LuhSk9RXML1+CbM+zQdYTUMI3EqUSrvfrbqoYazh5
jHqHEItLHsJtehnmW5HgaousdiyU71N+Xu3ydPPymCeAb3z+2Igv64jVj2+in/Z2
JQIAdVOkTcVuwpS9D2TNjQCTFvWmvg+gYDlI8+a1qVXP21weEt2/Xnt/I9DB7V/z
tGX5BlTIxmDXKLGRHq2/
=udmU
-----END PGP SIGNATURE-----

Re: Questions on ACE

Posted by Bram de Kruijff <bd...@gmail.com>.
Hello Phillipp,

welcome to ACE :)

On Thu, Apr 24, 2014 at 8:57 AM, Philipp Buluschek <dj...@gmail.com> wrote:
> Dear all
>
> Initiated with my question on SO
> (http://stackoverflow.com/questions/23243609), I have tried the ACE demo and
> have found it very good. I would like to clarify whether the following
> things are possible with it, and if not whether you think that a
> modification of the sources could (easily) be done to support that.
>
> My use case: I will have several hundred embedded systems running Felix
> which must be kept up to date. I will probably have few (maybe 4) different
> "distributions" (ie. applications), each on many of those systems. Here are
> my questions:
>
> Can I put targets (ie. the machines to be updated) into groups, so that I
> can easily deploy a new version of a distribution to a large group of
> targets?
>

Yes, you can. The standard model uses 4 columns
(artifact,features,distributions,targets) and indeed you can define
your applications as 'distributions' and then freely associate any
number of targets with it. Once you update and (auto)approve the
distribution it will be provisioned to all those targets. Also note,
that associating can also be done through scripting and matching. You
do not need to do it by hand!

> Can I configure when the update takes place - ideally some time in the night
> (when the users don't use the system) with a large jitter (so the server is
> not overloaded all at once).
>

Yes, you can (with custom scripting). You can do this by timing the
approval on the server side and/or by controlling the agent behavior.
The former can be done using some form of externally timed scripting
(eg. a cron job) to execute approval at a preset time (with some
jitter) through a scripted client. The latter can be done by
implementing a custom controller that manages agent behavior (and
introduces jitter).

> Can I configure locally (on the agent) whether it should update?
>

Yes, you can (with custom controller). The management agent uses a
'default' controller that you can easily override with a custom
implementation to enforce any kind of custom behavior.

> Can I update the OSGI framework itself from ACE?
>

Yes, you can (with some effort). You can leverage the provisioning
mechanisms to deploy the framework (felix x.y.z) artifacts to the
target. Either as a special resource type with a custom processor or
as part of a special bundle that stores it at a defined place. All you
need then is a way to detect the update and restart the agent through
some external process (eg. System.exit() && watchdog).


> Thanks & regards
>   Philipp
>

Hope that helps!

Regards,
Bram

Re: Questions on ACE

Posted by Damien Martin-Guillerez <da...@iqspot.fr>.
Hello,

I just give partial answer for that.

On 24 Apr 2014, at 08:57, Philipp Buluschek <dj...@gmail.com> wrote:

> Dear all
> 
> Initiated with my question on SO (http://stackoverflow.com/questions/23243609), I have tried the ACE demo and have found it very good. I would like to clarify whether the following things are possible with it, and if not whether you think that a modification of the sources could (easily) be done to support that.
> 
> My use case: I will have several hundred embedded systems running Felix which must be kept up to date. I will probably have few (maybe 4) different "distributions" (ie. applications), each on many of those systems. Here are my questions:
> 
> Can I put targets (ie. the machines to be updated) into groups, so that I can easily deploy a new version of a distribution to a large group of targets?

At iQSpot, we use ACE in conjunction with Oopscode Chef to do such a thing (an unfinished explanation is here: http://developer.iqspot.fr/2014/archi-part-1/).

> 
> Can I configure when the update takes place - ideally some time in the night (when the users don't use the system) with a large jitter (so the server is not overloaded all at once).

Well I don’t think it is possible alone, but you can modify tags on target with the REST API and so instrument it whenever you want.

> 
> Can I configure locally (on the agent) whether it should update?

As far as I know, you can configure the update interval. You should also be able to trigger the update function (thought I haven’t look how to do it) using Gogo shell script.

> 
> Can I update the OSGI framework itself from ACE?

I think it is possible in the 2.0.1 version but I don’t know for sure.

> 
> Thanks & regards
>  Philipp
> 
> 

Regards,
 — Damien



Re: Questions on ACE

Posted by Daniel McGreal <da...@redbite.com>.
Hi,
Just a quick note to say that we also would like this functionality.
Dan.

On 24 Apr 2014, at 07:57, Philipp Buluschek <dj...@gmail.com> wrote:

> Dear all
> 
> Initiated with my question on SO (http://stackoverflow.com/questions/23243609), I have tried the ACE demo and have found it very good. I would like to clarify whether the following things are possible with it, and if not whether you think that a modification of the sources could (easily) be done to support that.
> 
> My use case: I will have several hundred embedded systems running Felix which must be kept up to date. I will probably have few (maybe 4) different "distributions" (ie. applications), each on many of those systems. Here are my questions:
> 
> Can I put targets (ie. the machines to be updated) into groups, so that I can easily deploy a new version of a distribution to a large group of targets?
> 
> Can I configure when the update takes place - ideally some time in the night (when the users don't use the system) with a large jitter (so the server is not overloaded all at once).
> 
> Can I configure locally (on the agent) whether it should update?
> 
> Can I update the OSGI framework itself from ACE?
> 
> Thanks & regards
>  Philipp
> 
>