brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elvinas Piliponis <Elvinas.Pilipo...@virtustream.com>
Subject RE: Does Brooklyn ignore provisioning properties in YAML?
Date Wed, 03 Dec 2014 08:20:40 GMT
Hello, 

Thanks for response. "Invalid result 9" was (again) my misinterpretation
how Brooklyn works. I thought that download.url is processed at Brooklyn
server end so I placed path, pointing to location where Brooklyn java code
runs. Such thought was inspired by running example from command line and 
specifying local files via classpath. 

After I have made .jar file available via HTTP cloudinit scripts downloaded
it. However I failed again to read tar.gz requirement... 


Regarding use cases. There might be a requirement to roll out infrastructure
Within segregated network, without communication to outside. So all deployment
resources should be self-contained. Also I have already experienced
crazy oversecured environments, where "http:", "ftp:", PXE are forbidden or
at least restricted even on the internal networks. So ability to read 
deployment files from local node and then push them over SSH/SCP might 
be one of the requirements. 

At the moment just trying to understand all the possible features without
Attempting to put them to some real actual use. 

Thank you
_________________________________________
Elvinas Piliponis

Studentų  g. 59-B707, LT-51365, Kaunas | Lietuva
Email: elvinas.piliponis@virtustream.com | Mobile: +370 69807947

> -----Original Message-----
> From: Aled Sage [mailto:aled.sage@gmail.com]
> Sent: 2014 m. gruodžio 2 d. 16:29
> To: dev@brooklyn.incubator.apache.org
> Subject: Re: Does Brooklyn ignore provisioning properties in YAML?
> 
> Elvinas,
> 
>  > how to specify local path for application on server, instead of
> picking up from some web repo
> 
> Can you give us more details of your use case please? e.g. are you
> wanting to download the install artifacts from a different location, or
> is the intent that the entity (e.g. JBoss AS 7) will be pre-installed
> on
> a given image?
> 
> ---
> <To give a less rushed description of the download URL...>
> 
> For the download URL for installing an entity, the simplest override is
> to specify it as configuration within the yaml blueprint, such as:
> location: localhost
>    services:
>    - type: brooklyn.entity.webapp.jboss.JBoss7Server
>      brooklyn.config:
>        download.url: http://myserver/jboss-custom.tar.gz
> 
> Note that the install code expects the unpacked .tar.gz to be a folder
> named `jboss-as-${version}`, where ${version} is by default
> `7.1.1.Final`.
> 
> Also be warned that configuration by child entities - for example if
> you
> created a `ControlledDynamicWebAppCluster` (which contains nginx and
> JBoss7 servers), and if you defined:
>    - type: brooklyn.entity.webapp.ControlledDynamicWebAppCluster
>      brooklyn.config:
>        download.url: http://myserver/jboss-custom.tar.gz
> Then this download URL would be used for both the jboss and the nginx
> nodes!
> 
> ---
> The download URL can be in freemarker template format. Things like
> ${version} will be automatically substituted.
> The standard freemarker substitution rules will also call java bean
> based on dot separators. For example, in JBoss7 then
> ${entity.bindAddress} will call the JBoss7ServerImpl.getBindAddress()
> method.
> Freemarker is very powerful, but it can also get quite complicated if
> you're embedding conditionals etc.
> 
> There are a small number of default substitution values included:
> version, type and simpletype, entity and driver. The last two are
> intended for being able to invoke getter methods on them via
> freemarker.
> 
> (note we use freemarker in quite a few places, such as a templated
> configuration files - I'm not suggesting bindAddress would be useful in
> the context of a download URL!)
> 
> ---
> You can also override all sorts of things for download URLs via
> brooklyn.properties.
> 
> This is documented in the javadoc of DownloadProducerFromProperties:
> https://github.com/apache/incubator-
> brooklyn/blob/master/core/src/main/java/brooklyn/entity/drivers/downloa
> ds/DownloadProducerFromProperties.java#L41-108
> (This really needs to be added to the docs proper!)
> 
> Some of the options described there are rarely used, so please do shout
> if you encounter any problems.
> Your feedback on how well it meets your use case would also be much
> appreciated!
> 
> Aled
> 
> 
> On 02/12/2014 12:27, Aled Sage wrote:
> > Hi Elvinas,
> >
> > > Thanks for response and being patient with me. :)
> >
> > No problem; thanks for persevering, and giving your feedback - it
> will
> > help us to improve docs and the user experience.
> >
> > ---
> > For `provisioning.properties`, yes that's what I was thinking. I'll
> > try to find time to give that a go, to see if it works for me or if
> > there is some other config required.
> >
> > Aled
> >
> >
> > On 02/12/2014 12:21, Elvinas Piliponis wrote:
> >> Hello,
> >>
> >> Thanks for response and being patient with me. :)
> >>
> >>> _*
> >>> "*__*silently attempted to install JBoss7*__*"*_
> >>> I'm not sure I follow this comment. Is this because you tried to
> >>> redefine SingleWebServerExample in catalog.xml?
> >>>
> >> You have explained already. I have misunderstood the intend od
> >> SimpleWebvServer.
> >> As running command line did not finish successfully due to default
> >> image have not had "which", I did not see the end result. And I did
> >> not read example page accurately... It tells "The simplest of these,
> >> SingleWebServerExample, starts JBoss on a single machine". :)
> >>
> >> Regarding usage which, I would say this is an open question for
> >> discussion. CentOS does seem to include which to base installation
> >> set as showed by 'yum groupinfo "base"'. Fedora, apparently does
> not.
> >>
> >> As for catalog and download URL, will read slowly and try to digest
> >> before writing any responses. No response is better than false
> alarm.
> >>
> >>> You could try changing the yaml to including
> `provisioning.properties`
> >>> nested inside a `brooklyn.config` section.
> >> Meaning like this?
> >> ------------------
> >> name: xStream-install
> >> location: openstack
> >>
> >> services:
> >> - type: brooklyn.demo.SingleWebServerExample
> >>    brooklyn.config:
> >>      provisioning.properties:
> >>        minRam: 512
> >>        minCores: 1
> >>        minDisk: 10
> >>        autoAssignFloatingIp: true
> >>        imageId: RegionOne/15df41d1-d5e1-4b1e-8427-1ffdd2eb011c
> >>        hardwareId: RegionOne/24b24f68-535a-4c73-a052-52022240a2e3
> >>        networkName: 0869c8a0-47ab-4eb1-a6eb-0072172cd880
> >>        keyPair: brooklyn
> >>        securityGroups: default
> >>        privateKeyFile: /opt/brooklyn/brooklyn.pem
> >>        loginUser: root
> >> ---------------------
> >>
> >>
> >> Thank you
> >> _________________________________________
> >> Elvinas Piliponis
> >>
> >> Studentų  g. 59-B707, LT-51365, Kaunas | Lietuva
> >> Email: elvinas.piliponis@virtustream.com | Mobile: +370 69807947
> >>
> >>> -----Original Message-----
> >>> From: Aled Sage [mailto:aled.sage@gmail.com]
> >>> Sent: 2014 m. gruodžio 2 d. 11:55
> >>> To: dev@brooklyn.incubator.apache.org
> >>> Subject: Re: Does Brooklyn ignore provisioning properties in YAML?
> >>>
> >>> Hi Elvinas,
> >>>
> >>> _*Non-java developers*_
> >>> Brooklyn should be accessible to non-java developers, particularly
> >>> people who are wiring together existing entities into an
> application
> >>> and
> >>> for people configuring the use of Puppet/Chef/etc for the
> individual
> >>> servers.
> >>>
> >>> Saying that, there is certainly room for improvement - feedback
> like
> >>> yours is invaluable for that.
> >>>
> >>> Where an entity has been written in Java, if there are problems
> with it
> >>> then it does lead the person debugging into that Java code. We are
> >>> looking to have a clearer separation of the Java from the bash etc,
> so
> >>> it's easier to debug and customize for non-java developers.
> >>>
> >>>
> >>> _*No which*_
> >>> Interesting - we'll look at how we can re-write the bash utilities
> to
> >>> not rely on `which` being available!
> >>>
> >>> Do you want to create an issue on
> >>> https://issues.apache.org/jira/browse/BROOKLYN?
> >>>
> >>>
> >>> _*Download URLs*_
> >>> You can override the download url (e.g. for JBoss AS 7 install) by
> >>> setting in yaml brooklyn.config the `download.url` configuration
> >>> option.
> >>>
> >>> It is also possible to configure Brooklyn to point at a different
> repo,
> >>> either for everything or for specific entities, in
> brooklyn.properties.
> >>> e.g. something like:
> >>>
> >>> brooklyn.downloads.entity.JBoss7Server.url=http://myserver/jboss-
> as-
> >>> ${version}.tar.gz
> >>>
> >>> _*catalog.xml*_
> >>> Note that the catalog.xml is usually not the best way to give
> >>> customizations for entities (such as download URLs or run dir).
> >>>
> >>> You can think of the catalog as just a set of pointers to existing
> >>> blueprints (which could be in Java or moving forwards more in
> yaml).
> >>> The
> >>> catalog specifies things like the Java class (or YAML) that defines
> the
> >>> application, the catalog version, icons, descriptions, etc.
> >>>
> >>>
> >>> _*Use of SingleWebServerExample*_
> >>> All the SingleWebServerExample does is to create an application
> with a
> >>> single JBoss 7 server in it. If that's what you want, an
> alternative
> >>> would be to use the yaml below:
> >>>
> >>>      location: localhost
> >>>      services:
> >>>      - type: brooklyn.entity.webapp.jboss.JBoss7Server
> >>>         brooklyn.config:
> >>>           war: classpath://hello-world-webapp.war
> >>>           http.port: 8080+
> >>>           download.url:
> >>>      file://path/on/localhost/to/jboss-as-7.1.1.Final.tar.gz
> >>>
> >>>
> >>> You wrote:
> >>>       "should not it fail instead of silently changing provisioning
> >>> type
> >>> (SimpleWebServer -> JBoss7)?"
> >>>
> >>> Hopefully this clears it up - the SimpleWebServerExample is an app
> that
> >>> just creates a JBoss7Server, hence that being what is created.
> >>>
> >>> _*
> >>> "*__*silently attempted to install JBoss7*__*"*_
> >>> I'm not sure I follow this comment. Is this because you tried to
> >>> redefine SingleWebServerExample in catalog.xml?
> >>>
> >>> The reference to SingleWebServerExample will continue to point at
> that
> >>> Java class.
> >>> See "Use of SingleWebServerExample" above.
> >>>
> >>>
> >>> _*Ignoring PDP attributes on io.brooklyn.camp.spi.pdp.Service*_
> >>> Not sure off hand why it ignored these.
> >>>
> >>> You could try changing the yaml to including
> `provisioning.properties`
> >>> nested inside a `brooklyn.config` section.
> >>>
> >>> I'll try to reproduce this later.
> >>>
> >>> Right now, I have another call I need to jump on!
> >>>
> >>> Aled
> >>>
> >>>
> >>> On 02/12/2014 07:52, Elvinas Piliponis wrote:
> >>>> Hello,
> >>>>
> >>>> Again either I am doing something wrong way (at least logs
> indicate
> >>>> that), either I do not understand Brooklyn. I am no Java
> programmer
> >>>> and most likely not intend to become one. Can this tool be useful
> for
> >>>> me without resorting to rewrite application deployments scenarios
> in
> >>>> Java? I know that we will use Brooklyn and will have some Java
> guys
> >>> to
> >>>> code that that will be separate use case. At the moment I am
> looking
> >>>> at infrastructure deployment orchestration. We already have server
> >>>> deployment defined with Puppet but that covers single server only
> and
> >>>> all interdependencies must be covered manually.
> >>>>
> >>>> I am trying to provision default demo application with custom
> >>>> provisioning properties.
> >>>>
> >>>> Launching Brooklin SimpleWebserver  app from command line works:
> >>>>
> >>>> % ${BROOKLYN_HOME}/bin/brooklyn launch --app
> >>>> brooklyn.demo.SingleWebServerExample --location localhost
> >>>>
> >>>> However it fails to build and exists as fedora 19 cloud image does
> >>> not
> >>>> have which utility. So I have tried to launch Brooklyn specify it
> in
> >>>> YAML through web page and got two issues:
> >>>>
> >>>> 1.I failed to understand how to specify local path for application
> on
> >>>> server, instead of picking up from some web repo. There might be
> use
> >>>> cases where no internet access will be available and only local
> files
> >>>> should be used. Specifying
> >>>> “<entry>/opt/brooklyn/examples/brooklyn-examples/simple-web-
> >>> cluster/target/classes</entry>”
> >>>> in catalog.xml did not help.
> >>>>
> >>>> I have tried to the following YAML but saw that Brooklyn did not
> bite
> >>>> my attempt and silently attempted to install JBoss7…
> >>>>
> >>>> name: xStream-install
> >>>>
> >>>> location: openstack
> >>>>
> >>>> services:
> >>>>
> >>>> - type: brooklyn.demo.SingleWebServerExample
> >>>>
> >>>> provisioning.properties:
> >>>>
> >>>> minRam: 512
> >>>>
> >>>> minCores: 1
> >>>>
> >>>> minDisk: 10
> >>>>
> >>>> autoAssignFloatingIp: true
> >>>>
> >>>> imageId: RegionOne/15df41d1-d5e1-4b1e-8427-1ffdd2eb011c
> >>>>
> >>>> hardwareId: RegionOne/24b24f68-535a-4c73-a052-52022240a2e3
> >>>>
> >>>> networkName: 0869c8a0-47ab-4eb1-a6eb-0072172cd880
> >>>>
> >>>> keyPair: brooklyn
> >>>>
> >>>> securityGroups: default
> >>>>
> >>>> privateKeyFile: /opt/brooklyn/brooklyn.pem
> >>>>
> >>>> loginUser: root
> >>>>
> >>>> 2.While looking at status I saw that deployment failed to reach
> >>>> contactable state in 2 minutes. Looking at end of logs shoed that
> >>>> installation failed due to lack of “which”. Then I wondered why
as
> I
> >>>> have explicitly specified updated image in YAML with “which”. Upon
> >>> app
> >>>> initialization I saw the following lines:
> >>>>
> >>>> 2014-12-01 14:41:36,159 WARN i.b.c.b.s.c.BrooklynEntityMatcher
> >>>> [brooklyn-jetty-server-8081-qtp1846097386-22]: Ignoring PDP
> >>> attributes
> >>>> on io.brooklyn.camp.spi.pdp
> >>>>
> >>>>
> >>>
> .Service@3a9c60b5[name=<null>,description=<null>,serviceType=brooklyn.d
> >>>
> emo.SingleWebServerExample,characteristics=[],customAttributes={provisi
> >>> oning.properties={mi
> >>>> nRam=512, minCores=1, minDisk=10, autoAssignFloatingIp=true,
> >>>> imageId=RegionOne/15df41d1-d5e1-4b1e-8427-1ffdd2eb011c,
> >>>> hardwareId=RegionOne/24b24f68-535a-4c73-a052-
> >>>>
> >>>> 52022240a2e3, networkName=0869c8a0-47ab-4eb1-a6eb-0072172cd880,
> >>>> keyPair=brooklyn, securityGroups=default,
> >>>> privateKeyFile=/opt/brooklyn/brooklyn.pem, loginUser=roo
> >>>>
> >>>> t}}]: {provisioning.properties={minRam=512, minCores=1,
> minDisk=10,
> >>>> autoAssignFloatingIp=true,
> >>>> imageId=RegionOne/15df41d1-d5e1-4b1e-8427-1ffdd2eb011c,
> hardwareId=
> >>>>
> >>>> RegionOne/24b24f68-535a-4c73-a052-52022240a2e3,
> >>>> networkName=0869c8a0-47ab-4eb1-a6eb-0072172cd880,
> keyPair=brooklyn,
> >>>> securityGroups=default, privateKeyFile=/opt/br
> >>>>
> >>>> ooklyn/brooklyn.pem, loginUser=root}}
> >>>>
> >>>> ….. some lines lower ….
> >>>>
> >>>> 2014-12-01 14:41:36,256 DEBUG b.l.jclouds.JcloudsLocation
> >>>> [brooklyn-execmanager-KFABVyQR-82]: jclouds using templateBuilder
> >>>> PortableTemplateBuilder[ports=[22], im
> >>>>
> >>>> ageId=RegionOne/d5163d69-4b2c-4269-99ad-88506973037f,
> >>>> hardwareId=RegionOne/24b24f68-535a-4c73-a052-52022240a2e3,
> >>>> imageChooserFunction=brooklyn.location.jclouds.Br
> >>>>
> >>>> ooklynImageChooser$3@6f8c09b2] for provisioning in
> >>>> JcloudsLocation[openstack-
> >>> nova:http://10.12.208.5:5000/v2.0:brooklyn:brooklyn/openstack-
> >>> nova:http://10.12.208.5
> >>>> :5000/v2.0@Nv2F1oKb] for
> >>>> openstack-
> >>> nova:http://10.12.208.5:5000/v2.0@JBoss7ServerImpl{id=aQq5sjap}
> >>>> Search for warning message does not reveal anything obvious:
> >>>>
> >>>>            if (!attrs.isEmpty()) {
> >>>>                log.warn("Ignoring PDP attributes on
> >>> "+deploymentPlanItem+": "+attrs);
> >>>> Questions:
> >>>>
> >>>> a)Does Brooklyn ignores provisioning.properties because it failed
> to
> >>>> find right application?
> >>>>
> >>>> b)Should not it fail instead of silently changing provisioning
> type
> >>>> (SimpleWebServer -> JBoss7)?
> >>>>
> >>>> Thank you
> >>>>
> >>>> *_________________________________________*
> >>>>
> >>>> *Elvinas Piliponis*
> >>>>
> >>>> Description: Description: Description: Description: Description:
> >>>> Description: Description: Description: Description:
> >>>> cid:image001.jpg@01CB0F06.7CE11FA0 <http://www.virtustream.com/>
> >>>>
> >>>> Studentų  g. 59-B707, LT-51365, Kaunas *| *Lietuva
> >>>>
> >>>> Email: elvinas.piliponis@virtustream.com
> >>>> <mailto:elvinas.piliponis@virtustream.com> *|*Mobile: +370
> 69807947
> >>>>
> >>>> *The information contained in this electronic mail transmission
> may
> >>> be
> >>>> privileged and confidential, and therefore, protected **from
> >>>> disclosure.*If you have received this communication in error,
> please
> >>>> notify us immediately by replying to this message and deleting the
> >>>> email and its attachments from all computers without copying or
> >>>> disclosing it.
> >>>>
> >> The information contained in this electronic mail transmission may
> be
> >> privileged and confidential, and therefore, protected from
> >> disclosure. If you have received this communication in error, please
> >> notify us immediately by replying to this message and deleting the
> >> email and its attachments from all computers without copying or
> >> disclosing it.
> >

The information contained in this electronic mail transmission may be privileged and confidential,
and therefore, protected from disclosure. If you have received this communication in error,
please notify us immediately by replying to this message and deleting the email and its attachments
from all computers without copying or disclosing it.
Mime
View raw message