[openstack-dev] [heat] computed package names?

Clint Byrum clint at fewbar.com
Tue Apr 15 21:17:21 UTC 2014


Excerpts from Zane Bitter's message of 2014-04-15 13:32:30 -0700:
> On 15/04/14 15:57, Mike Spreitzer wrote:
> > Zane Bitter <zbitter at redhat.com> wrote on 04/15/2014 03:29:03 PM:
> >
> >  > On 15/04/14 14:31, Mike Spreitzer wrote:
> >  > > It appears that in Fedora 19 and 20 the Wordpress examples need to
> >  > > install different packages than in every other release (see my
> > debugging
> >  > > in https://review.openstack.org/#/c/87065/).  I just got a complaint
> >  > > from Heat validation that I can't do this:
> >  > >
> >  > >          "AWS::CloudFormation::Init" : {
> >  > >            "config" : {
> >  > >              "packages" : {
> >  > >                "yum" : {
> >  > > { "Fn::FindInMap" : [ "Pkgset2Pkgs", { "Fn::FindInMap" : [
> >  > > "Distro2Pkgset", { "Ref" : "LinuxDistribution" }, "db" ] },
> > "client" ] }
> >  > > : [],
> >  > > { "Fn::FindInMap" : [ "Pkgset2Pkgs", { "Fn::FindInMap" : [
> >  > > "Distro2Pkgset", { "Ref" : "LinuxDistribution" }, "db" ] },
> > "server" ] }
> >  > > : [],
> >  > >
> >  >
> >  > .. in
> >  > JSON a property name cannot be an object ...
> >
> > Ah, right.  So what would be the simplest way to enable this use case?
> >   Perhaps a generalization of AWS::CloudFormation::Init that allows the
> > package names to be objects (that evaluate to strings, of course)?
> >   Maybe allow, e.g., "yum" to be associated with not a map but rather a
> > list of pairs (2-element lists)?
> 
> Yes, that _kind_ of thing. But I don't see much point in having an 
> AWS::CloudFormation::Init section that isn't compatible with 
> CloudFormation's definition of it. We already have some native 
> in-instance tools (e.g. os-apply-config) that can probably handle this 
> better.
> 

os-apply-config wouldn't really be what you want. It is specifically
only intended for translating communication values into configuration.
Package installation is not handled.

We don't have a native declarative post-boot package installation
tool that can be expressed this way. If you must do vanilla images +
customization, I think cfn-init is generally fine. This particular case,
however, shows a place where they abused the mapping json type pretty
badly. I think it would make sense to have a native OS::Heat::Init
section that takes the package name as a value or something.

> FWIW, in the short term I'm not aware of any issue with installing 
> mariadb in Fedora 17/18, provided that mysql is not installed first. And 
> in fact they're both EOL anyway, so we should probably migrate all the 
> templates to Fedora 20 and mariadb.

+1 for that.



More information about the OpenStack-dev mailing list