Closed mfenner closed 10 years ago
@jure why is the symlinkg and bundling a shell script in the Vagrantfile? We could also put it in a Chef recipe, e.g. with a condition that checks for Rails.env.
I put it there precisely because it's something that's specific to the development environment, which is what Vagrant is used for.
I guess it could also be placed into the Chef recipe, but would the settings.yml
symlink be useful in stage/production environments as well? It's my understanding that you'll use your own way of geting settings.yml
and database.yml
into the config directory in those environments.
Although it's not exactly clear to me how you automatically deploy a repository without settings.yml
and database.yml
to a fresh instance. I usually manually upload the relevant secret files into a shared folder, and then symlink them into the app's config folder, but I guess that's not going to cut it here. What's your preferred strategy, Martin?
What I have almost working is creating and copying database.yml
and settings.yml
via a Chef recipe. I think the process will always be similar, and capistrano is not dealing with creating those files. I'm copying rather than symlinking those files so that they can be opened via a shared folder.
This pull request is getting long ...
Yes, this is long because history was rewritten in this repository, and commits that were previously the same between articlemetrics/alm-report/master and mfenner/alm-report/opscode now suddenly appear as if not. And they actually are not the same! So to solve this the best and recommended way is to get your commits, looks like there are only two:
Martin Fenner small changes to chef install 3cbf7a1
Martin Fenner workaround to install database 01e32e9
Delete your mfenner/alm-report repository, refork it from this one, and reapply the commits to the new fork.
Sorry about this, there really is no other way of removing sensitive information from a repository's history.
You can decline all my pull requests. I have deleted the mfenner/alm-report fork and will create a new pull request with a new forked repo later today or tomorrow.
OK.
I have rewritten the chef cookbook, basically splitting it up into four separate cookbooks, all but one of which can also be used by the alm application. This pull request merges the changes into alm-report.
There is currently one bug in the capistrano cookbook, preventing the creation of the MySQL database with Chef: https://github.com/articlemetrics/capistrano-cookbook/issues/1. The cookbooks have been tested with test-kitchen against Ubuntu 12.04 and 14.04.