andytinycat / puppet-omnibus

Omnibus package of Puppet with an embedded Ruby and required gems (Chef-style)
55 stars 34 forks source link

Change how files are organized #11

Closed beddari closed 11 years ago

beddari commented 11 years ago

As I have quite some plans for this project now would be a great time to change how the recipe files are organized.

I'm suggesting something like this

.
├── files
│   ├── debian
│   │   └── etc
│   │       └── init.d
│   │           └── puppet
│   └── redhat
│       └── etc
│           ├── init.d
│           │   └── puppet
│           └── sysconfig
│               └── puppet
├── omnibus
│   └── sub-recipes.rb
├── recipe-aws.rb
├── recipe-mco.rb
└── recipe.rb

recipe.rb is what fpm-cook looks for by default and should be a generic build with no extras.

Preferably we need a way to reference this generic build in the other, more specialized builds like recipe-aws.rb and recipe-mco.rb

I'm going to try this out on the dev branch

randomvariable commented 11 years ago

Makes sense. Just realised I haven't pushed up a lot of local commits, so I'll merge to this branch before pushing it.

Managed to use the scripts in the puppet gem, so can probably get rid of most of the files directory. This has created another dependency on using the charlock_holmes gem to ignore binary files during string replacement (/usr/bin --> /opt/puppet-omnibus etc...). If there's an alternative using core, it'd be good to know.

beddari commented 11 years ago

I changed my mind on this for now because builddir is created relative to the recipe, thus when I move recipes to a subdir builddir is not cleaned on "fpm-cook clean". Could possibly be patched in fpm-cookery but it is not worth it so far.

Might rethink this if I want to be able to have recipes reference each other on a larger scale ...