Thank you for the response! First off, normally I would agree with Vladimir’s suggestion – creating a database manually is indeed the easiest way to handle this specific situation. Another easy solution would be to simply keep the database on the same server. But I was looking for a more generic solution, because I have run into similar types of coordination issue on several other occasions before (and usually resolved them manually) As for your suggestion, Seth, I am not quite sure I follow how this should work. Step 1 is easy enough. Step 2 is the problem: the owncloud recipe would not be running on the database server, but on the owncloud server which, in my scenario, doesn’t even have permission to create databases. Yes, of course I know that it is possible to create a database remotely with the right permissions, but for a number of reasons, I don’t want to do it that way. The main reason is that this is really just an example for the more generic scenario. The other reason is that I prefer to keep root access to MySQL limited to the database server. So the more generic problem is: Chef recipe runs on server 1, but the final state, and thus the success or failure of the recipe, also depends on something being done on server 2. I’m sure that this is a fairly common scenario; I’m just wondering how others handle it. From: Seth Thomas [mailto:
Coordination as such isn't required - all you need to make sure of is that MySQL is installed on the DB server and has the user setup before initializing owncloud. There are several ways to do this but here is one possible way: 1. Run the mysql::server recipe [1] on the DB server (if mysql is not already installed) and have it create your user 2. Have the owncloud recipe include a "mysql_database" resource block that creates the owncloud DB using the user creds 3. Let the owncloud recipe do the rest There is prior work here so I'd give this repo [2] a look but note that it assumes that the database is on localhost. It should be easy enough to fork or create your own cookbook. As for protecting secrets one could use encrypted databags/chef-vault/citadel but that is easily it's own discussion [3]. Cheers, Seth Thomas On Tue, Aug 19, 2014 at 4:35 AM, <
" target="_blank">
> wrote:
|
Archive powered by MHonArc 2.6.16.