You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by Gowri LN <go...@gmail.com> on 2015/04/21 05:42:58 UTC

how to create Apache brooklyn blueprint using entity

HI,

I am trying to create an application from available entities from Apache
Brooklyn. My blueprint is :

name: Tomcat3 location: jclouds:.... services: - type:
brooklyn.entity.webapp.tomcat.TomcatServer name: tomcat
provisioning.properties: minRam: 1024mb minCores: 2 minDisk: 1024
extraSshPublicKeyUrls: - https://.............../file.pub

This creates an instance with Tomcat and the status shows as 'Running' and
the service status is up . But when I connect to the URL of the tomcat
application I cannot see Tomcat running there . What am I missing here ?

Can anybody help me with this ?

Thanks,

Re: how to create Apache brooklyn blueprint using entity

Posted by Aled Sage <al...@gmail.com>.
Hi,

For most entity types (i.e. types of things to be deployed), there are 
no mandatory keys. It will do a standard deploy (or at least one of the 
standard ways of deploying - some software defines multiple ways).

For things like Tomcat and JBoss app-server, it will not deploy a WAR 
unless you tell it to. You can either supply WARs as config at start 
time, or you can subsequently call the deploy effector.

---
To say where it should be deployed (i.e. which cloud/machine), you will 
need to specify a location and configuration for that location (e.g. 
influencing the machine size, image, etc).

---
If using chef, there is more configuration that needs to be supplied: 
for example, you need to specify the chef recipes and attributes.

You'd normally define this once (e.g. to say what is needed to deploy 
MySQL) and then add that blueprint definition to the catalog. 
Subsequently, people can reference your blueprint using its type name, 
and thus deploy that entity type without having to supply any additional 
configuration.

---
For logging onto the box and looking at the processes / services, it 
depends on the entity for how it was installed. The definitive source of 
information is to look at the code behind a given entity to see what 
install/launch commands it executes.

For normal usage, you don't need to look at the code - looking at the 
sensors (i.e. attributes) should give you all the connection details 
that one normally requires to use it.

Aled


On 22/04/2015 05:02, Gowri LN wrote:
> Hi,
>
> Thanks for the references. I
>
>   I tried a similar blueprint for RabbitMQ entity . The deployment is
> successful and the service status says 'running' but when I ssh into the
> instance and try to check status of rabbitmq-server , it says '
> rabbitmq-server not installed '. I can find that rabbitmq-broker is
> downloaded into install.dir .
>
> In cases like this , should we explicitly mention a command to install the
> service  ?  if not then how do I check the rabbitmq installation ?
> (Assuming that the management plugin is not part of entity and hence
> management UI will not be accessible )
>
> In short , my question is , what are the mandatory 'config keys' that needs
> to be provided for a entity to launch successfully ?
>
> Thanks,
>
>
> On Tue, Apr 21, 2015 at 7:38 PM, Aled Sage <al...@gmail.com> wrote:
>
>> Hi,
>>
>> The configuration options are listed at [1].
>>
>> You can create a dependency on another entity by setting a config value
>> using the "attributeWhenReady" approach, see [2].
>>
>> Entity install: correct, the machine where Tomcat is being set up will
>> download and install it.
>>
>> Aled
>>
>> [1] https://brooklyn.incubator.apache.org/learnmore/catalog/index.html
>> [2]
>> https://brooklyn.incubator.apache.org/v/latest/yaml/multiple-services.html
>>
>>
>>
>> On 21/04/2015 11:22, Gowri LN wrote:
>>
>>> Hi ,
>>>
>>> Thanks for your time  .
>>>
>>> Yes, I was able to reach tomcat after adding the wars.root. I was assuming
>>> that without the war file , I should have access to tomcat's home page but
>>> that was not the case.
>>>
>>> How do we know the dependencies/ configurations for other entities ? Can
>>> you suggest me link to the documentation/sample blueprints created using
>>> entities ?
>>>
>>> And when we use an entity like the way I have mentioned above, Does it
>>> mean
>>> that the entity is downloaded and installed (service is brought up) ?
>>>
>>> Thanks,
>>>
>>>
>>> On Tue, Apr 21, 2015 at 2:33 PM, Aled Sage <al...@gmail.com> wrote:
>>>
>>>   Hi,
>>>> When you say "I cannot see Tomcat running", do you mean that it fails to
>>>> connect (e.g. host or port not reachable), or gives a 404, or the page
>>>> looks blank?
>>>>
>>>> I believe the page can look blank in your browser if no root WAR has been
>>>> deployed. You can check the return code etc with something like:
>>>>       curl -sL -w "%{http_code} %{url_effective}\n"
>>>> http://myhostname:8080
>>>>
>>>> If Tomcat is reachable but with no war, then try adding the line below to
>>>> the config:
>>>> wars.root:
>>>>
>>>> http://search.maven.org/remotecontent?filepath=io/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.6.0/brooklyn-example-hello-world-sql-webapp-0.6.0.war
>>>>
>>>> e.g.
>>>>
>>>>      name: Tomcat3
>>>>      location: jclouds:....
>>>>      services:
>>>>      - type: brooklyn.entity.webapp.tomcat.TomcatServer
>>>>      name: tomcat
>>>>         wars.root:
>>>>
>>>>
>>>> http://search.maven.org/remotecontent?filepath=io/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.6.0/brooklyn-example-hello-world-sql-webapp-0.6.0.war
>>>>         provisioning.properties:
>>>>           minRam: 1024mb
>>>>           minCores: 2
>>>>           minDisk: 1024
>>>>         extraSshPublicKeyUrls:
>>>>         - https://.............../file.pub
>>>>
>>>> Aled
>>>>
>>>>
>>>>
>>>> On 21/04/2015 04:42, Gowri LN wrote:
>>>>
>>>>   HI,
>>>>> I am trying to create an application from available entities from Apache
>>>>> Brooklyn. My blueprint is :
>>>>>
>>>>> name: Tomcat3 location: jclouds:.... services: - type:
>>>>> brooklyn.entity.webapp.tomcat.TomcatServer name: tomcat
>>>>> provisioning.properties: minRam: 1024mb minCores: 2 minDisk: 1024
>>>>> extraSshPublicKeyUrls: - https://.............../file.pub
>>>>>
>>>>> This creates an instance with Tomcat and the status shows as 'Running'
>>>>> and
>>>>> the service status is up . But when I connect to the URL of the tomcat
>>>>> application I cannot see Tomcat running there . What am I missing here ?
>>>>>
>>>>> Can anybody help me with this ?
>>>>>
>>>>> Thanks,
>>>>>
>>>>>
>>>>>


Re: how to create Apache brooklyn blueprint using entity

Posted by Gowri LN <go...@gmail.com>.
Hi,

Thanks for the references. I

 I tried a similar blueprint for RabbitMQ entity . The deployment is
successful and the service status says 'running' but when I ssh into the
instance and try to check status of rabbitmq-server , it says '
rabbitmq-server not installed '. I can find that rabbitmq-broker is
downloaded into install.dir .

In cases like this , should we explicitly mention a command to install the
service  ?  if not then how do I check the rabbitmq installation ?
(Assuming that the management plugin is not part of entity and hence
management UI will not be accessible )

In short , my question is , what are the mandatory 'config keys' that needs
to be provided for a entity to launch successfully ?

Thanks,


On Tue, Apr 21, 2015 at 7:38 PM, Aled Sage <al...@gmail.com> wrote:

> Hi,
>
> The configuration options are listed at [1].
>
> You can create a dependency on another entity by setting a config value
> using the "attributeWhenReady" approach, see [2].
>
> Entity install: correct, the machine where Tomcat is being set up will
> download and install it.
>
> Aled
>
> [1] https://brooklyn.incubator.apache.org/learnmore/catalog/index.html
> [2]
> https://brooklyn.incubator.apache.org/v/latest/yaml/multiple-services.html
>
>
>
> On 21/04/2015 11:22, Gowri LN wrote:
>
>> Hi ,
>>
>> Thanks for your time  .
>>
>> Yes, I was able to reach tomcat after adding the wars.root. I was assuming
>> that without the war file , I should have access to tomcat's home page but
>> that was not the case.
>>
>> How do we know the dependencies/ configurations for other entities ? Can
>> you suggest me link to the documentation/sample blueprints created using
>> entities ?
>>
>> And when we use an entity like the way I have mentioned above, Does it
>> mean
>> that the entity is downloaded and installed (service is brought up) ?
>>
>> Thanks,
>>
>>
>> On Tue, Apr 21, 2015 at 2:33 PM, Aled Sage <al...@gmail.com> wrote:
>>
>>  Hi,
>>>
>>> When you say "I cannot see Tomcat running", do you mean that it fails to
>>> connect (e.g. host or port not reachable), or gives a 404, or the page
>>> looks blank?
>>>
>>> I believe the page can look blank in your browser if no root WAR has been
>>> deployed. You can check the return code etc with something like:
>>>      curl -sL -w "%{http_code} %{url_effective}\n"
>>> http://myhostname:8080
>>>
>>> If Tomcat is reachable but with no war, then try adding the line below to
>>> the config:
>>> wars.root:
>>>
>>> http://search.maven.org/remotecontent?filepath=io/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.6.0/brooklyn-example-hello-world-sql-webapp-0.6.0.war
>>>
>>> e.g.
>>>
>>>     name: Tomcat3
>>>     location: jclouds:....
>>>     services:
>>>     - type: brooklyn.entity.webapp.tomcat.TomcatServer
>>>     name: tomcat
>>>        wars.root:
>>>
>>>
>>> http://search.maven.org/remotecontent?filepath=io/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.6.0/brooklyn-example-hello-world-sql-webapp-0.6.0.war
>>>        provisioning.properties:
>>>          minRam: 1024mb
>>>          minCores: 2
>>>          minDisk: 1024
>>>        extraSshPublicKeyUrls:
>>>        - https://.............../file.pub
>>>
>>> Aled
>>>
>>>
>>>
>>> On 21/04/2015 04:42, Gowri LN wrote:
>>>
>>>  HI,
>>>>
>>>> I am trying to create an application from available entities from Apache
>>>> Brooklyn. My blueprint is :
>>>>
>>>> name: Tomcat3 location: jclouds:.... services: - type:
>>>> brooklyn.entity.webapp.tomcat.TomcatServer name: tomcat
>>>> provisioning.properties: minRam: 1024mb minCores: 2 minDisk: 1024
>>>> extraSshPublicKeyUrls: - https://.............../file.pub
>>>>
>>>> This creates an instance with Tomcat and the status shows as 'Running'
>>>> and
>>>> the service status is up . But when I connect to the URL of the tomcat
>>>> application I cannot see Tomcat running there . What am I missing here ?
>>>>
>>>> Can anybody help me with this ?
>>>>
>>>> Thanks,
>>>>
>>>>
>>>>
>

Re: how to create Apache brooklyn blueprint using entity

Posted by Aled Sage <al...@gmail.com>.
Hi,

The configuration options are listed at [1].

You can create a dependency on another entity by setting a config value 
using the "attributeWhenReady" approach, see [2].

Entity install: correct, the machine where Tomcat is being set up will 
download and install it.

Aled

[1] https://brooklyn.incubator.apache.org/learnmore/catalog/index.html
[2] 
https://brooklyn.incubator.apache.org/v/latest/yaml/multiple-services.html


On 21/04/2015 11:22, Gowri LN wrote:
> Hi ,
>
> Thanks for your time  .
>
> Yes, I was able to reach tomcat after adding the wars.root. I was assuming
> that without the war file , I should have access to tomcat's home page but
> that was not the case.
>
> How do we know the dependencies/ configurations for other entities ? Can
> you suggest me link to the documentation/sample blueprints created using
> entities ?
>
> And when we use an entity like the way I have mentioned above, Does it mean
> that the entity is downloaded and installed (service is brought up) ?
>
> Thanks,
>
>
> On Tue, Apr 21, 2015 at 2:33 PM, Aled Sage <al...@gmail.com> wrote:
>
>> Hi,
>>
>> When you say "I cannot see Tomcat running", do you mean that it fails to
>> connect (e.g. host or port not reachable), or gives a 404, or the page
>> looks blank?
>>
>> I believe the page can look blank in your browser if no root WAR has been
>> deployed. You can check the return code etc with something like:
>>      curl -sL -w "%{http_code} %{url_effective}\n" http://myhostname:8080
>>
>> If Tomcat is reachable but with no war, then try adding the line below to
>> the config:
>> wars.root:
>> http://search.maven.org/remotecontent?filepath=io/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.6.0/brooklyn-example-hello-world-sql-webapp-0.6.0.war
>>
>> e.g.
>>
>>     name: Tomcat3
>>     location: jclouds:....
>>     services:
>>     - type: brooklyn.entity.webapp.tomcat.TomcatServer
>>     name: tomcat
>>        wars.root:
>>
>> http://search.maven.org/remotecontent?filepath=io/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.6.0/brooklyn-example-hello-world-sql-webapp-0.6.0.war
>>        provisioning.properties:
>>          minRam: 1024mb
>>          minCores: 2
>>          minDisk: 1024
>>        extraSshPublicKeyUrls:
>>        - https://.............../file.pub
>>
>> Aled
>>
>>
>>
>> On 21/04/2015 04:42, Gowri LN wrote:
>>
>>> HI,
>>>
>>> I am trying to create an application from available entities from Apache
>>> Brooklyn. My blueprint is :
>>>
>>> name: Tomcat3 location: jclouds:.... services: - type:
>>> brooklyn.entity.webapp.tomcat.TomcatServer name: tomcat
>>> provisioning.properties: minRam: 1024mb minCores: 2 minDisk: 1024
>>> extraSshPublicKeyUrls: - https://.............../file.pub
>>>
>>> This creates an instance with Tomcat and the status shows as 'Running' and
>>> the service status is up . But when I connect to the URL of the tomcat
>>> application I cannot see Tomcat running there . What am I missing here ?
>>>
>>> Can anybody help me with this ?
>>>
>>> Thanks,
>>>
>>>


Re: how to create Apache brooklyn blueprint using entity

Posted by Gowri LN <go...@gmail.com>.
Hi ,

Thanks for your time  .

Yes, I was able to reach tomcat after adding the wars.root. I was assuming
that without the war file , I should have access to tomcat's home page but
that was not the case.

How do we know the dependencies/ configurations for other entities ? Can
you suggest me link to the documentation/sample blueprints created using
entities ?

And when we use an entity like the way I have mentioned above, Does it mean
that the entity is downloaded and installed (service is brought up) ?

Thanks,


On Tue, Apr 21, 2015 at 2:33 PM, Aled Sage <al...@gmail.com> wrote:

> Hi,
>
> When you say "I cannot see Tomcat running", do you mean that it fails to
> connect (e.g. host or port not reachable), or gives a 404, or the page
> looks blank?
>
> I believe the page can look blank in your browser if no root WAR has been
> deployed. You can check the return code etc with something like:
>     curl -sL -w "%{http_code} %{url_effective}\n" http://myhostname:8080
>
> If Tomcat is reachable but with no war, then try adding the line below to
> the config:
> wars.root:
> http://search.maven.org/remotecontent?filepath=io/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.6.0/brooklyn-example-hello-world-sql-webapp-0.6.0.war
>
> e.g.
>
>    name: Tomcat3
>    location: jclouds:....
>    services:
>    - type: brooklyn.entity.webapp.tomcat.TomcatServer
>    name: tomcat
>       wars.root:
>
> http://search.maven.org/remotecontent?filepath=io/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.6.0/brooklyn-example-hello-world-sql-webapp-0.6.0.war
>       provisioning.properties:
>         minRam: 1024mb
>         minCores: 2
>         minDisk: 1024
>       extraSshPublicKeyUrls:
>       - https://.............../file.pub
>
> Aled
>
>
>
> On 21/04/2015 04:42, Gowri LN wrote:
>
>> HI,
>>
>> I am trying to create an application from available entities from Apache
>> Brooklyn. My blueprint is :
>>
>> name: Tomcat3 location: jclouds:.... services: - type:
>> brooklyn.entity.webapp.tomcat.TomcatServer name: tomcat
>> provisioning.properties: minRam: 1024mb minCores: 2 minDisk: 1024
>> extraSshPublicKeyUrls: - https://.............../file.pub
>>
>> This creates an instance with Tomcat and the status shows as 'Running' and
>> the service status is up . But when I connect to the URL of the tomcat
>> application I cannot see Tomcat running there . What am I missing here ?
>>
>> Can anybody help me with this ?
>>
>> Thanks,
>>
>>
>

Re: how to create Apache brooklyn blueprint using entity

Posted by Aled Sage <al...@gmail.com>.
Hi,

When you say "I cannot see Tomcat running", do you mean that it fails to 
connect (e.g. host or port not reachable), or gives a 404, or the page 
looks blank?

I believe the page can look blank in your browser if no root WAR has 
been deployed. You can check the return code etc with something like:
     curl -sL -w "%{http_code} %{url_effective}\n" http://myhostname:8080

If Tomcat is reachable but with no war, then try adding the line below 
to the config:
wars.root: 
http://search.maven.org/remotecontent?filepath=io/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.6.0/brooklyn-example-hello-world-sql-webapp-0.6.0.war

e.g.

    name: Tomcat3
    location: jclouds:....
    services:
    - type: brooklyn.entity.webapp.tomcat.TomcatServer
    name: tomcat
       wars.root:
    http://search.maven.org/remotecontent?filepath=io/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.6.0/brooklyn-example-hello-world-sql-webapp-0.6.0.war
       provisioning.properties:
         minRam: 1024mb
         minCores: 2
         minDisk: 1024
       extraSshPublicKeyUrls:
       - https://.............../file.pub

Aled


On 21/04/2015 04:42, Gowri LN wrote:
> HI,
>
> I am trying to create an application from available entities from Apache
> Brooklyn. My blueprint is :
>
> name: Tomcat3 location: jclouds:.... services: - type:
> brooklyn.entity.webapp.tomcat.TomcatServer name: tomcat
> provisioning.properties: minRam: 1024mb minCores: 2 minDisk: 1024
> extraSshPublicKeyUrls: - https://.............../file.pub
>
> This creates an instance with Tomcat and the status shows as 'Running' and
> the service status is up . But when I connect to the URL of the tomcat
> application I cannot see Tomcat running there . What am I missing here ?
>
> Can anybody help me with this ?
>
> Thanks,
>