Pergunta

I have a WordPress website up and running with many plugins installed on it and a huge database, I need to use chef-solo in order to create an environment in which can install the same website with all its plugins and and also importing its database. I need it to be like, using chef to install the same website on a different server, exactly the same

Now here are my questions:

  1. I know we can use chef to install WordPress but can we set it in a way that we don't need to configure the the WordPress and everything is already set once its running?

  2. What to do with the plugins? can we install them using the chef or now that should be done manually?

  3. How about importing the database, that can be done with chef-solo as well?

  4. The whole website is on git, can I somehow import the whole thing?

  5. is there any other issue I may possibly face? if I want do that?

Foi útil?

Solução

  1. There is a wordpress cookbook openly available for chef. When you mean configure, I take it you mean setup data in the database. Assuming that you've separated the database instance from the server instance, and you're attempting to scale up the number of servers then you should be able to skip data setup. You should be configuring the new server instance (node) to point to the same database via Chef.

  2. I stumbled into this question looking for the answer to this question. From what I can tell the start may be here. Kind of hand-wavy, but this should enable you to do some wordpress stuff via the command line with Chef, rather than the point and click it prefers.

  3. As per #1, you should not need to import the database. If the database goes down, you'll want to focus on that as a separate but connected recipe, since then you'll want to be taking snapshots and uploading them somewhere like S3 via a cron job. I believe there are plugins that can enable this.

  4. You'll have to be a little more clear by "import". If it's in a code base you may be able to short-cut your cookbook path by pulling down the git repo onto the host. You may want to look at git-archive.

  5. Other issues that I'm looking at are images. We're migrating from a hosted solution to AWS, and it appears that instead of storing the images in the database, word-press pulls them into a local directory. This means that if we scale to > 1 host, we'll have issues with images. Something to think about, there's a wealth of plugins that can probably solve this.

Hope this is helpful, Ben

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top