I'm looking to automate my cloud environment fairly soon using Chef so it can automatically scale instances and add them to HAProxy. One issue I'm having is with the concept of managing multiple virtualhosts and the users created with them to use in PHP-FPM pools.
What I'd like to do is:
I'm a little new to Chef so I'm a puzzled when it comes to using one configuration to influence others. Can this be done?
Thanks
Chef work with recipes and cookbooks and have some resources.
Create a new user: for this, you can use user. Look that use a hash for password.
Create a new virtualhost with domain information and aliases, define log * locations etc: Here, you can use template and attributes.
Create public virtualhost directories, log file location: Here, you can use the resurce directory with correct user, group and permission.
Update PHP-FPM cgi file so it executes PHP files as that user in it's own pool: To edit PHP-FPM, you can use a bash.
OPSCODE have a coobook to install and config PHP. For example, see the recipes, templates and attributes and I have a little cookbook. For use any cookbook as dependencies, you can use the berkshelf to manage.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With