maoo/chef-alfresco — pull request #3 by psnively (2014-07-09 16:12:08+00:00)
Title: Replace non-functional manual alfresco db create script.

At the version of the scripts used in [alfresco-boxes](https://github.com/maoo/alfresco-boxes), the script to create the alfresco db does not work. There are a few unfortunate issues:

1. Opscode's database recipe's provider_database_mysql.rb action_query silently ignores the query if the database being queried doesn't exist, and "create-detabase-if-not-exists" [sic] assuredly does not exist. :-)
2. action_create already checks to see if the database already exists, so there's no need for the manual query anyway.
3. Opscode's recipes use inconsistent logging levels, e.g. action_grant logs at info level, whereas action_create logs at debug level. This bedeviled me as I saw no log output at the default info level in alfresco-boxes, leading me to believe I'd failed when I hadn't.
4. I tried to figure out how to add info logging to mysql_createdb.rb's create script, but failed to learn how to refer to the appropriate members to avoid hard-coding, so that remains outstanding.
5. We may also want not to hard-code the 'alfresco' database name, but I believe it is hard-coded elsewhere in chef-alfresco, so I have not put any effort into addressing that.

In short, this change strictly fixes the actual database creation issue, leaving open a minor logging gap, in my opinion.

That said: chef-alfresco and alfresco-boxes clearly represent a great deal of hard work, and offer capabilities I already knew I wanted, especially being able to deploy to Vagrant and Docker, with either Alfresco Community or Alfresco Enterprise. Personally, I would also like to see support for PostgreSQL and for auth with OpenLDAP, but perhaps these are things I can contribute at some future date.

Thank you so much!