Be able to have packages which contribute to an upper-level package

Registered by Peter Banka

(12:06:01) peter.banka@joseywales/956b04c5: I'm thinking about sub-packages
(12:06:26) shawn-jabber: hmm
(12:06:27) peter.banka@joseywales/956b04c5: Sometimes packages step on each other
(12:06:37) peter.banka@joseywales/956b04c5: like... oh, I don't know... apache web sites
(12:06:45) shawn-jabber: commerceguards
(12:06:50) peter.banka@joseywales/956b04c5: yeah.
(12:07:02) shawn-jabber: tomcat webapps at least
(12:07:12) peter.banka@joseywales/956b04c5: So what if there were an UberPackage which gor fed some configuration data from sub-package
(12:07:31) shawn-jabber: a container package or something
(12:07:32) peter.banka@joseywales/956b04c5: Like, I hate the way JoseyWales is, for example
(12:07:33) peter.banka@joseywales/956b04c5: yeah.
(12:07:51) shawn-jabber: we've talked about this before
(12:07:56) peter.banka@joseywales/956b04c5: yep
(12:09:08) peter.banka@joseywales/956b04c5: what if a sub-package has a configure() method that just returned a dictionary? ANd the UberPackage was given the dictionaries by all its sub-packages and woudl Do The Right Thing with them?
(12:10:08) peter.banka@joseywales/956b04c5: Each Website could do whatever it needed to do on the filesystem and return a dictionary. Then when the Apache UberPackage ran, it got the dictionaries and could build the apache configuration accordingly
(12:11:40) peter.banka@joseywales/956b04c5: ContainerPackage is probably more apt than überpackage
(12:11:57) shawn-jabber: easier to type
(12:12:28) shawn-jabber: could also be a service group
(12:12:38) peter.banka@joseywales/956b04c5: hmm...
(12:12:50) peter.banka@joseywales/956b04c5: do you think so?
(12:12:58) shawn-jabber: Maybe it could be solved in the same way
(12:13:24) peter.banka@joseywales/956b04c5: the container package solves a particular installation problem on one machine
(12:13:43) shawn-jabber: yeah, it's group of packages that work together though
(12:13:52) peter.banka@joseywales/956b04c5: I could see container packages or ordinary packages being used within a service group
(12:15:16) shawn-jabber: sure
(12:19:02) peter.banka@joseywales/956b04c5: We could change the return type of a package to return both status / dictionary
(12:19:19) peter.banka@joseywales/956b04c5: then feed the dictionary to all packages that you're dependent on
(12:19:48) peter.banka@joseywales/956b04c5: It would require a change in the signature for SpkgV5, which would make us sad.
(12:20:31) peter.banka@joseywales/956b04c5: it's a little backwards, too.
(12:20:50) peter.banka@joseywales/956b04c5: If foo_app is dependent on tomcat_server, then tomcat_server would have to be installed first...
(12:21:06) peter.banka@joseywales/956b04c5: otherwise tomcat_server would be dependent on foo_app, which is silly
(12:21:36) shawn-jabber: right
(12:22:55) peter.banka@joseywales/956b04c5: We could establish a new package configuration item called sub_package_of: and provide the package name you're underneath then you could call a new method name for those functions which had a different return value.
(12:23:49) peter.banka@joseywales/956b04c5: Although you'd still want to call install() on it... you'd just want it to return some data
(12:24:01) peter.banka@joseywales/956b04c5: You could have it write to some file
(12:25:37) peter.banka@joseywales/956b04c5: You could have an SpkgV5 superclass function like: save_config_data(super_package_name, dictionary) which would just save off the config data for that package... then the container package could have a get_subpackage_configs() method to collect the config data generated by the sub-packages.
(12:26:22) peter.banka@joseywales/956b04c5: That might be the "simplest thing that could work"
(12:26:59) shawn-jabber: I guess it depends on what you try to do
(12:28:09) peter.banka@joseywales/956b04c5: let's say we have a package called foo_app which depends on apache_server, and bar_app which also depends on apache_server ...
(12:28:51) peter.banka@joseywales/956b04c5: apache_server gets installed first, then foo_app... But what we want is apache_server then to reconfigure itself
(12:29:56) peter.banka@joseywales/956b04c5: you could have an apache_server_configuration package which was dependent on the two apps, but that would suck. I think it would be preferable to have the foo_app and bar_app somehow signal that they wanted the apache_server package to reconfigure itself when each one was done installing
(12:31:46) peter.banka@joseywales/956b04c5: What if install() returned a tuple: [status, [list of packages to reconfigure], {configuration dictionary}]
(12:32:55) shawn-jabber: speaking of which, I need to reinstall SiteMedia
(12:33:09) peter.banka@joseywales/956b04c5: yeah, exactly
(12:33:12) shawn-jabber: Since it has that new tarball in it
(12:34:31) peter.banka@joseywales/956b04c5: I think Spkg needs a reconfigure_package(package_name, {config_dict}) method.
(12:34:48) shawn-jabber: that's grossing me out
(12:35:00) peter.banka@joseywales/956b04c5: lol... okay, help me out then
(12:35:37) peter.banka@joseywales/956b04c5: I'm convincing myself that's the easiest and best solution
(12:36:58) shawn-jabber: I'd rather have a package that controlled the apache and the additions to it
(12:37:17) peter.banka@joseywales/956b04c5: at the end of the chain?
(12:37:47) shawn-jabber: something to where those packages aren't doing things to each other
(12:38:24) peter.banka@joseywales/956b04c5: No, I wouldn't say they're doing things to each other. I think it's a suggestion-box kinda deal.
(12:39:27) peter.banka@joseywales/956b04c5: A package calls reconfigure_package(), which drops off some config data and a package name. Bombardier, when it's done running the sub-package sees that the call was made and goes over to the other package and runs some kind of sub_configure() method with the data from the sub_package
(12:39:53) shawn-jabber: I think the config data is already in the cmdb
(12:40:35) peter.banka@joseywales/956b04c5: well, sure, but you can't expect the apache package to know how to confiugure every possible website that needs to be installed under it
(12:41:06) shawn-jabber: That's why it shouldn't be doing so. Something should integrate the two I think
(12:41:39) peter.banka@joseywales/956b04c5: But an apache package could know how to set up a website, given some data about it.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
Pending Approval
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.