These are chat archives for cloudsoft/brooklyn-tosca

10th
Dec 2015
Andrea Turli
@andreaturli
Dec 10 2015 09:08 UTC
can you summarize the context of #40 ?
why you need that? I think @sjcorbett already asked in the PR but your answer is not clear
@kiuby88 ^^
Jose
@kiuby88
Dec 10 2015 09:11 UTC
Of course, let me explain
I tried to deploy this template

tosca_definitions_version: tosca_simple_yaml_1_0_0_wd03

imports:
  - tosca-normative-types:1.0.0.wd06-SNAPSHOT

template_name: brooklyn.a4c.sample.script1
template_version: 1.0.0-SNAPSHOT

description: Sample TOSCA plan referencing scripts to create a web server
topology_template:
  description: Web Server Sample with Script

  node_templates:
    script_hello:
      type: tosca.nodes.SoftwareComponent
      requirements:
      - host: a_server

    a_server:
      type: tosca.nodes.Compute

  # if you want to tell brooklyn to assign a location at deploy time, as part of the template, this is the current way.
  # it can also be done with camp, referencing this topology template.
  groups:
    add_brooklyn_location:
      members: [ a_server ]
      policies:
      - brooklyn.location: localhost
but a_server’s child (script_hello) wasn’t started
Captura de pantalla 2015-12-10 a la(s) 10.13.55.png
Jose
@kiuby88
Dec 10 2015 09:21 UTC
I remembered that I did not find this behaviour in any brooklyn-transformer previous version where script_hello was started. So, I supposed that this should be the brooklyn-transformer behavior (parents have to start children entities). I review a previous version where script_hello was started and I found that SoftwareProcess.CHILDREN_STARTABLE_MODE was configured.
Really, I do not know if I am wrong in this point
Jose
@kiuby88
Dec 10 2015 09:30 UTC
(Sorry, @sjcorbett for my unclear response in #40 )
Andrea Turli
@andreaturli
Dec 10 2015 09:37 UTC
@sjcorbett any thoughts?
Thomas Bouron
@tbouron
Dec 10 2015 09:42 UTC
@kiuby88 @sjcorbett @andreaturli The SoftwareProcess.CHILDREN_STARTABLE_MODE was there before the code change that introduced the DependencyTree
Andrea Turli
@andreaturli
Dec 10 2015 09:42 UTC
hi @tbouron not completely aware of that change
can you point us to that or explain why that changed the way children are managed?
Thomas Bouron
@tbouron
Dec 10 2015 09:43 UTC
Nor I am, I just wanted to point it out :)
Andrea Turli
@andreaturli
Dec 10 2015 09:43 UTC
ahah
Ghost
@ghost~54aa7954db8155e6700e5ead
Dec 10 2015 09:44 UTC
I implemented that - If it was there before and I left it out, it was by mistake
Andrea Turli
@andreaturli
Dec 10 2015 09:46 UTC
sure @robertgmoss np. where it was specified before DependencyTree ?
Jose
@kiuby88
Dec 10 2015 09:47 UTC
I think it was managed in ToscaPlanToSpecTransformer
Thomas Bouron
@tbouron
Dec 10 2015 09:48 UTC
@andreaturli This is the change where I introduced the ToscaNodeToEntityConverter (cloudsoft/brooklyn-tosca@4e5bee0) and here is the line: https://github.com/cloudsoft/brooklyn-tosca/commit/4e5bee05fc5750f0773e40012268136d609c0535#diff-0cd532eb21787576a4870ec63206f523R212
Thomas Bouron
@tbouron
Dec 10 2015 09:49 UTC
From my understanding, my tree implementation have been replaced by @robertgmoss afterward with the DependencyTree
Andrea Turli
@andreaturli
Dec 10 2015 09:51 UTC
@tbouron do you think we should move the ChildStartableMode.BACKGROUND_LATE to DependencyTree ?
Which is exactly what @kiuby88 did in his PR :D
Andrea Turli
@andreaturli
Dec 10 2015 09:54 UTC
agreed!
let’s merge it then! :D
Jose
@kiuby88
Dec 10 2015 09:54 UTC
:)
Thomas Bouron
@tbouron
Dec 10 2015 09:54 UTC
:+1:
Andrea Turli
@andreaturli
Dec 10 2015 10:02 UTC
thanks guys! forced travis again
@sjcorbett said that we can ignore the build error, so I merged #40
thanks @kiuby88 !
Jose
@kiuby88
Dec 10 2015 10:03 UTC
you’re welcome ^^
Could we take a look to #41?
Andrea Turli
@andreaturli
Dec 10 2015 10:05 UTC
context? what problem are you solving?
Jose
@kiuby88
Dec 10 2015 10:06 UTC
I opened this PR because I tried to deploy this template

tosca_definitions_version: tosca_simple_yaml_1_0_0_wd03

imports:
  - tosca-normative-types:1.0.0.wd06-SNAPSHOT

template_name: brooklyn.a4c.sample.script1
template_version: 1.0.0-SNAPSHOT

description: Sample TOSCA plan referencing scripts to create a web server

topology_template:
  description: Web Server Sample with Script

  node_templates:
    script_hello:
      type: tosca.nodes.SoftwareComponent
      requirements:
      - host: a_server
      interfaces:
        Standard:
           create: https://raw.githubusercontent.com/ahgittin/tosca-demo/master/script1/scripts/create.sh
           configure: https://raw.githubusercontent.com/ahgittin/tosca-demo/master/script1/scripts/configure.sh
           start: https://raw.githubusercontent.com/ahgittin/tosca-demo/master/script1/scripts/start.sh
           stop: https://raw.githubusercontent.com/ahgittin/tosca-demo/master/script1/scripts/stop.sh

    a_server:
      type: tosca.nodes.Compute

  # if you want to tell brooklyn to assign a location at deploy time, as part of the template, this is the current way.
  # it can also be done with camp, referencing this topology template.
  groups:
    add_brooklyn_location:
      members: [ a_server ]
      policies:
      - brooklyn.location: localhost
interface operation files can not be described from the topology, they only can be described from a CSAR (I think).
so, script_hello does can load the files content because, the required files are pointed from a URL
Andrea Turli
@andreaturli
Dec 10 2015 10:10 UTC
in other words, things like create: https://raw.githubusercontent.com/ahgittin/tosca-demo/master/script1/scripts/create.sh are not valid?
Jose
@kiuby88
Dec 10 2015 10:10 UTC
yes
Andrea Turli
@andreaturli
Dec 10 2015 10:11 UTC
mmm @tbouron, @robertgmoss any ideas?
So, I did not know if it was a problem for you
Thomas Bouron
@tbouron
Dec 10 2015 10:15 UTC
@kiuby88 @andreaturli From my understanding of the specs, interfaces can be either defined in a template or topology
Jose
@kiuby88
Dec 10 2015 10:15 UTC
so I opened a PR.
This PR allows to user to overwirte a operation file. For example, you can define a default file from the CSAR. But any user could want to customize any operation from topology. Take a look to kiuby88/brooklyn-tosca@fa69044 where an interface operation is overwrite.
Thomas Bouron
@tbouron
Dec 10 2015 10:15 UTC
So the above yaml is, for me, valid
Jose
@kiuby88
Dec 10 2015 10:16 UTC
I agree @tbouron
But, I tried to deploy that topology and the operation files content was not load into INSTALL_COMMAND, CUSTOMIZE_COMMAND, LAUNCH_COMMAND or STOP_COMMAND configkeys
I found that operation artifacts were found from CsarFileRepository
Of course it works correctly on this example
Jose
@kiuby88
Dec 10 2015 10:22 UTC
but for the topology that I pasted above, the operation artifacts did not be find on CsarFileRepository because this files are stored on a external server.
I am starting to think I should ask you about this issues before opening this kind of PR
Thomas Bouron
@tbouron
Dec 10 2015 10:27 UTC
@andreaturli @robertgmoss I agree with the functional feature that @kiuby88’s PR brings but the code changed so much since I last looked at it that I can’t really tell about the current implementation
Andrea Turli
@andreaturli
Dec 10 2015 13:36 UTC
@ahgittin any suggestions? ^^
Alex Heneveld
@ahgittin
Dec 10 2015 13:58 UTC
the addition of ResourceUtils.getResourceAsString(…) is reasonable and makes sense
it looks like most of the code is dealing with something being overwritten but not being respected; it looks reasonable but could do w a closer review
minor other comments for @kiuby88 but feels like a step in the right direction
a couple of major thoughts, i’ll add to the issue
Jose
@kiuby88
Dec 10 2015 14:01 UTC
Of course @ahgittin. I look forward your comments