Hi,
I'm trying to figure out a concept for provisioning PHP-based vhosts
(apache or nginx), while *not* deploying the PHP application itself.
(instead site owner should have access to install their application).
Probably via a data bag (or not?) I'd like to give only some information
(thinking of the domain name, an SSH key and the node name on which the
site should reside), which then should trigger e.g.
- user "#{domain}" (with corresponding SSH key)
- directory "/var/www/#{domain}"
- php_fpm "#{domain}"
- nginx_site "#{domain}"
- mysql_user "#{domain.gsub(/\./, '')"
- mysql_database "#{domain.gsub(/\./, '')"
- file "/var/www/vhost/#{domain}/mysql-password.txt" do
content mysql.users.domain
end
Has anybody a solution for this or a ruby-like counterpart, at which I
could look at?
All the examples (which are able to deploy more than one vhost) made use
of the application cookbook - which looks like a good way to go. But
what if I - as said - don't want to deploy the PHP code itself?
Should I try to use the application cookbook, or would a custom LWRP
reading the data bags and triggering the resources mentioned above fit
better? However, it feels a bit like reinventing the wheel.
Thanks for your comments!
Steffen
P.S: I'm thinking of ~10-20 vhosts per server.. not thousands of them.
Archive powered by MHonArc 2.6.16.