You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ace.apache.org by Alexander Broekhuis <a....@gmail.com> on 2012/03/07 15:41:57 UTC

Target tags in Node Launcher

Hi all,

I am trying to write my own NodeLauncher to do some bootstrapping, now I'd
like to use some of the tags that can be set on a target. How can I
retrieve these in the NodeLauncher?

In this specific case I need to have a NodeLauncher which starts a new OSGi
container on a host. Since there can be multiple hosts I need to specify
the IP address/Hostname of the host. Is a tag a correct solution for this?
Or can this be done differently?

TiA!

-- 
Met vriendelijke groet,

Alexander Broekhuis

Re: Target tags in Node Launcher

Posted by Alexander Broekhuis <a....@gmail.com>.
Hi all,

Just a follow-up on how I solved this.

As I thought, it is possible to create an own UI extension. I used this to
create a custom panel with additional fields for my use case.
To be able to use this information I added a second service to the
NodeLauncherImpl (NodeConfigurator). This service provides an API which can
be used to set additional properties (in my case the host name/ip address
etc).

In the new UI panel (a copy from the ACE NodeLauncher UI, with some
updates) the NodeConfigurator is used to set the properties before starting
the actual node.

So now I can add a new target, set specific launcher properties on this
target and start the target using these properties.

2012/3/8 Alexander Broekhuis <a....@gmail.com>

>
>
> 2012/3/7 Marcel Offermans <ma...@luminis.nl>
>
>> Hello Alexander,
>>
>> Tags can be used in combination with autoconfig configuration. If you
>> deploy an XML / MetaType artifact to a target and it contains placeholders,
>> those will be resolved using tags that are attached to targets,
>> distributions or features. The actual template engine that is being used
>> for that is Velocity.
>>
>
> Thanks for the clarification on this!
>
>
>> That being said, the NodeLauncher itself is not something you can
>> currently target with a configuration, you have to target a bundle (or
>> rather ManagedService(Factory)) in the container.
>>
>
> So if I understand correctly, currently it is not possible to use the
> Vaadin interface to specify on which host a container is launched. I
> already use a ManagedService to set several common properties on the
> NodeLauncher. Even though I could use a factory, I still would not be able
> to select an instance from the web interface.
>
> Looking at the Ace source I see that a NodeLauncherPanel is used, would it
> be possible to create my own UI Extension which I can use to set the host?
>
> Since we are looking at an automated solution (ie no user interaction), I
> think I already have to dive into this to be able to have the dynamics I
> need. This way I could probably as well make a user interface which makes
> it possible to assign a container to a selected host.
>
> Are there any resources/help docs on this topic?
>
> TiA!
>
> --
> Met vriendelijke groet,
>
> Alexander Broekhuis
>



-- 
Met vriendelijke groet,

Alexander Broekhuis

Re: Target tags in Node Launcher

Posted by Alexander Broekhuis <a....@gmail.com>.
2012/3/7 Marcel Offermans <ma...@luminis.nl>

> Hello Alexander,
>
> Tags can be used in combination with autoconfig configuration. If you
> deploy an XML / MetaType artifact to a target and it contains placeholders,
> those will be resolved using tags that are attached to targets,
> distributions or features. The actual template engine that is being used
> for that is Velocity.
>

Thanks for the clarification on this!


> That being said, the NodeLauncher itself is not something you can
> currently target with a configuration, you have to target a bundle (or
> rather ManagedService(Factory)) in the container.
>

So if I understand correctly, currently it is not possible to use the
Vaadin interface to specify on which host a container is launched. I
already use a ManagedService to set several common properties on the
NodeLauncher. Even though I could use a factory, I still would not be able
to select an instance from the web interface.

Looking at the Ace source I see that a NodeLauncherPanel is used, would it
be possible to create my own UI Extension which I can use to set the host?

Since we are looking at an automated solution (ie no user interaction), I
think I already have to dive into this to be able to have the dynamics I
need. This way I could probably as well make a user interface which makes
it possible to assign a container to a selected host.

Are there any resources/help docs on this topic?

TiA!

-- 
Met vriendelijke groet,

Alexander Broekhuis

Re: Target tags in Node Launcher

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

On Mar 7, 2012, at 15:41 PM, Alexander Broekhuis wrote:

> I am trying to write my own NodeLauncher to do some bootstrapping, now I'd
> like to use some of the tags that can be set on a target. How can I
> retrieve these in the NodeLauncher?
> 
> In this specific case I need to have a NodeLauncher which starts a new OSGi
> container on a host. Since there can be multiple hosts I need to specify
> the IP address/Hostname of the host. Is a tag a correct solution for this?
> Or can this be done differently?

Tags can be used in combination with autoconfig configuration. If you deploy an XML / MetaType artifact to a target and it contains placeholders, those will be resolved using tags that are attached to targets, distributions or features. The actual template engine that is being used for that is Velocity.

That being said, the NodeLauncher itself is not something you can currently target with a configuration, you have to target a bundle (or rather ManagedService(Factory)) in the container.

Greetings, Marcel