You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ace.apache.org by Dan Gravell <el...@googlemail.com> on 2013/04/09 13:50:10 UTC

Using the management interface to deploy distros to targets

Hi all. I just built and ran up the latest version of the server from SVN
trunk. I've got some questions... mainly about the UI.

What do "retrieve", "store" and "revert" do? Is there some notion of local,
uncommitted data?

How do I uninstall a distro from an agent? "-" buttons do nothing. "x"
removes a target but then it re-appears, disassociated. Even though it
appears disassociated to the distro the bundles are still installed on the
target.

Similarly, I want to remove a distro and add a new distro, to simulate a
new release of my product. I expect this is related to how to uninstall...
but how do I do this?

The "identification" of an agent - how is this normally populated? I assume
people don't leave it as "target-1". Any ideas on how to make this work for
thousands of targets?

I have a set of beta users. I want to be able to offer the latest beta
distro to the beta users, and the latest GA release to everyone else.
What's the best way of doing this... different servers or a way of
parameterising?

After a while I can't use the UI anymore, I get "Session Expired". Even
when I log back in I get the same message and this redirects me back to
login page. I can log in via incognito mode instead.

Dan

Re: Using the management interface to deploy distros to targets

Posted by Dan Gravell <el...@googlemail.com>.
I just tried starting again to try these things, and the UI is unpopulated.
I click "Retrieve" but nothing happens. I click "Add artifact" and the
previous bundles _are_ shown in "Artifacts in repository". I thought they
would show when I clicked "Retrieve"? I can't try the distro update without
being able to see the previous distros.

In the network traffic tab in Chrome I see a LOT of POSTs with the
following response:

for(;;);[{"changes":[], "meta" : {}, "resources" : {}, "locales":[],
"timings":[1846, 1]}]

I guess this is some sort of comet style long polling Vaadin does to update
the UI when there are changes? If that's the case it's obviously sending a
lot of changes, all empty.

Any ideas how to move forward, to re-establish my old data?

Dan



On Tue, Apr 9, 2013 at 1:46 PM, Marcel Offermans <
marcel.offermans@luminis.nl> wrote:

> Hello Dan,
>
> On Apr 9, 2013, at 14:38 , Dan Gravell <el...@googlemail.com>
> wrote:
>
> >>> How do I uninstall a distro from an agent? "-" buttons do nothing. "x"
> >>> removes a target but then it re-appears, disassociated. Even though it
> >>> appears disassociated to the distro the bundles are still installed on
> >> the
> >>> target.
> >>
> >> You make associations by drag and drop.
> >>
> >> Removing them is a bit less intuitive. You select one hand of the
> >> association, then move your mouse to the other hand (which should be
> >> highlighted at this point) and press the "-" to just remove the
> association.
> >>
> >
> > On this, what is the relationship with retrieve/store/revert and
> > associating with targets? Are changes only pushed out once 'store' is
> > clicked?
>
> Yes.
>
> Apart from the fact that changes are only pushed after storing changes,
> you can also turn off "auto approve" for each target. Turning this flag off
> means that, even though there are new bundles available for this target,
> they will not be installed until you manually approve such changes. You can
> see this as an extra step/barrier so you can hold off changes and/or
> approve them only after consulting with a client about them.
>
>
> > Also, if I uninstall one distro and install another, I assume only the
> > changed bundles are uninstalled/installed?
>
> Exactly. This also means that you can completely reorganize features and
> distributions. If the end result is the same, nothing will happen to a
> target (provided you make these changes in one go, not storing intermediate
> results).
>
> Greetings, Marcel
>
>

Re: Using the management interface to deploy distros to targets

Posted by Marcel Offermans <ma...@luminis.nl>.
Hello Dan,

On Apr 9, 2013, at 14:38 , Dan Gravell <el...@googlemail.com> wrote:

>>> How do I uninstall a distro from an agent? "-" buttons do nothing. "x"
>>> removes a target but then it re-appears, disassociated. Even though it
>>> appears disassociated to the distro the bundles are still installed on
>> the
>>> target.
>> 
>> You make associations by drag and drop.
>> 
>> Removing them is a bit less intuitive. You select one hand of the
>> association, then move your mouse to the other hand (which should be
>> highlighted at this point) and press the "-" to just remove the association.
>> 
> 
> On this, what is the relationship with retrieve/store/revert and
> associating with targets? Are changes only pushed out once 'store' is
> clicked?

Yes.

Apart from the fact that changes are only pushed after storing changes, you can also turn off "auto approve" for each target. Turning this flag off means that, even though there are new bundles available for this target, they will not be installed until you manually approve such changes. You can see this as an extra step/barrier so you can hold off changes and/or approve them only after consulting with a client about them.


> Also, if I uninstall one distro and install another, I assume only the
> changed bundles are uninstalled/installed?

Exactly. This also means that you can completely reorganize features and distributions. If the end result is the same, nothing will happen to a target (provided you make these changes in one go, not storing intermediate results).

Greetings, Marcel


Re: Using the management interface to deploy distros to targets

Posted by Dan Gravell <el...@googlemail.com>.
Thanks Marcel...

> Hi all. I just built and ran up the latest version of the server from SVN
> > trunk. I've got some questions... mainly about the UI.
> >
> > What do "retrieve", "store" and "revert" do? Is there some notion of
> local,
> > uncommitted data?
>
> Yes. The idea is similar to a version control system:
>
> 1. First you retrieve the latest state from the server into your
> "workspace".
>
> 2. Then you edit that data until you are happy with the changes.
>
> 3. Finally you store your changes to make them take effect (or revert if
> not).
>
> > How do I uninstall a distro from an agent? "-" buttons do nothing. "x"
> > removes a target but then it re-appears, disassociated. Even though it
> > appears disassociated to the distro the bundles are still installed on
> the
> > target.
>
> You make associations by drag and drop.
>
> Removing them is a bit less intuitive. You select one hand of the
> association, then move your mouse to the other hand (which should be
> highlighted at this point) and press the "-" to just remove the association.
>

On this, what is the relationship with retrieve/store/revert and
associating with targets? Are changes only pushed out once 'store' is
clicked?

Also, if I uninstall one distro and install another, I assume only the
changed bundles are uninstalled/installed?

Dan

Re: Using the management interface to deploy distros to targets

Posted by Marcel Offermans <ma...@luminis.nl>.
Hello Dan,

On Apr 9, 2013, at 13:50 , Dan Gravell <el...@googlemail.com> wrote:

> Hi all. I just built and ran up the latest version of the server from SVN
> trunk. I've got some questions... mainly about the UI.
> 
> What do "retrieve", "store" and "revert" do? Is there some notion of local,
> uncommitted data?

Yes. The idea is similar to a version control system:

1. First you retrieve the latest state from the server into your "workspace".

2. Then you edit that data until you are happy with the changes.

3. Finally you store your changes to make them take effect (or revert if not).

> How do I uninstall a distro from an agent? "-" buttons do nothing. "x"
> removes a target but then it re-appears, disassociated. Even though it
> appears disassociated to the distro the bundles are still installed on the
> target.

You make associations by drag and drop.

Removing them is a bit less intuitive. You select one hand of the association, then move your mouse to the other hand (which should be highlighted at this point) and press the "-" to just remove the association.

The "x" is to remove something. For targets that still won't work 100% because of [1] and [2].

> Similarly, I want to remove a distro and add a new distro, to simulate a
> new release of my product. I expect this is related to how to uninstall...
> but how do I do this?

See above, remove one association, create a new one.

> The "identification" of an agent - how is this normally populated? I assume
> people don't leave it as "target-1". Any ideas on how to make this work for
> thousands of targets?

You have to somehow generate a unique ID. The management agent uses an "Identification" service for that. The current one simply reads a system property, but you could provide an implementation that, for example, uses the MAC address of your network card or some other unique property.

> I have a set of beta users. I want to be able to offer the latest beta
> distro to the beta users, and the latest GA release to everyone else.
> What's the best way of doing this... different servers or a way of
> parameterising?

You could create two distributions ("beta" and "GA") and associate targets (users) with either. In your case, if you have many users, I would programmatically create one association between "GA" and all targets that don't have a beta flag, and one association between "beta" and all targets that do have a beta flag.

I think I briefly mentioned how to do that with the REST API, but feel free to follow up...

> After a while I can't use the UI anymore, I get "Session Expired". Even
> when I log back in I get the same message and this redirects me back to
> login page. I can log in via incognito mode instead.


Hmm, I did recently fix a bug which now expires sessions a bit more aggressively. However, you should still be able to log out and back in if this happens.

I would have to investigate. It could be that something is left in the Vaadin session. As a work-around you could try appending this to the URL:

?restartApplication=true

That should restart the Vaadin application. Let me know if that helps, as that would be a hint that something in Vaadin is not correctly reset when the session times out now.

Greetings, Marcel


[1] https://issues.apache.org/jira/browse/ACE-221
[2] https://issues.apache.org/jira/browse/ACE-230