Hi everybody,
I wanted to give you an update on the ongoing refactoring of the
application cookbook.
TL;DR
it’s not 100% ready yet, but it’s definitely beta quality.
It has all the features of the current cookbook; adds a few new ones;
and it comes with a very cool DSL.
The only thing that is deprecated is the data bag—you will have to
convert to the DSL.
It is totally worth it, trust me.
Moar info
Let me start with a sample recipe showing off the DSL:
That’s what got me excited at the beginning: when Noah (who should be
credited with all the good and tough parts) showed me this I was
hooked.
What may not be immediately apparent in this example is that “django”,
“unicorn”, “celery” and “nginx_load_balancer” are separate
sub-resource LWRP, which do not live in the application cookbook. The
first three are from the application_python (unsurprisingly) while the
last one comes from application_nginx.
This modular approach makes it very easy to only bring in the
dependencies you need.
Also, implementing support for a new framework or stack component is
easier and much much cleaner than it was with the “old” application
cookbook.
I have gone over all the existing issues in Jira and merged what made
sense to merge; addressed a few issues that were still applicable but
needed a different fixed; and closed others that are not relevant
anymore.
Now I need to take some time off so I’m taking this opportunity to ask
you for help making sure this work for your use cases.
Please try it out and let me know whether you encounter any problem.
Caveats:
- there probably are bugs, although I’ve spent a lot of time testing
this. Don’t run this in production just yet; - there a few pre-existing warts that I haven’t addressed yet;
- one of those is the Java support, which is sub-par; you are welcome
to give it a try, but you are pretty much on your own there - some of the dependencies may not be on the community site yet. Make
you sure you read the documentation through.
Where is it
- https://github.com/andreacampi/application/tree/COOK-634
- https://github.com/andreacampi/application_java
- https://github.com/andreacampi/application_nginx
- https://github.com/andreacampi/application_php
- https://github.com/andreacampi/application_python
- https://github.com/andreacampi/application_ruby
More examples:
-
https://github.com/andreacampi/chef-liferay/blob/master/recipes/default.rb
(needs experimental Java branch for Maven support:
https://github.com/andreacampi/application_java/tree/experimental )
And again, I’d love to hear from you guys!
Andrea