Posted by pbuyle on March 13, 2014 at 6:08pm
Hi,
I'm planning to configure Nginx to serve a Drupal site. The server uses Ansible for provisioning, and I'm planning to use perusio's config. The logical way to do it would be to create a role based on perusio's config.
Has anyone been working on something similar?
Comments
Hi, i also use ansible. I
Hi, i also use ansible.
I create config for install web servers https://github.com/drupaladmin/ansible-webserver. Using it you can configure webserver or db server in different configurations (apache+mysql+php, nginx+apache+php+mysql, also may configure php-fpm). Now i don't use perusio config, but i want to use it in future.
You can see this config, may be it will be usefull for you.
Roman
https://drupal-admin.com
FYI
I started working on ansible for boa, see https://drupal.org/node/2138145 for discussion, partial code can be found at https://github.com/attiks/boa-ansible
I started working on an
I started working on an ansible role, it currently does the following
Everything is controlled through role's variables. For instance, the PHP handling method (apache proxy, php-cgi or php-fpm) is a variable, and everything it the parametrized configuration files that depends on the PHP handling method use conditional element.
The role does not install Nginx, Drupal, etc. It only manage the Nginx configuration directory. This allow consumer of the role to keep control of NGinx installation (packages, repository, etc.).
The role seems to work, last thing I was struggling with was the actual installation of (a configuration compatible) NGinx. I had to make some feature optional, for instance usage of AIO, that I couldn't get to work.
Code published
The role can now be found at https://github.com/Pheromone/ansible-nginx-drupal, this is still a work in progress.
Thanks for this project. Tell
Thanks for this project. Tell me, please, is this configuration for nginx as reverse proxy for apache or php-fpm?
Roman
https://drupal-admin.com
The configuration is for both proxying apache and php-fpm
The configuration it parametrized to use either one of them. Bits of the configuration depend on the solution, so the
nginx_drupal_php_handling
variable is used as conditions in template. This flexibility is inherited from perusio's configuration.ок, i think i will use your
ок, i think i will use your project in my project.
My ansible configuration i use for complete software installaion on server and configure it.
Roman
https://drupal-admin.com
LAMP stack
I've made a LAMP stack for Drupal development using Ansible for provisioning. I think some of these roles can be useful in the Nginx project.
https://github.com/Chi-teck/vagrant-lamp
Thanks, I'm also aware of
Thanks, I'm also aware of Vlad (https://bitbucket.org/philipnorton42/vlad) which provide a full LAMP based development stack.
The role I published at https://github.com/Pheromone/ansible-nginx-drupal is only for configuration of nginx, not installation of a full stack. It does not even manage the installation of nginx itself.
That said, I've also been working on roles related to the configuration of a full stack Drupal environement (php-cli, drush, php-pear, php-composer). And I also borrow roles found on Ansible Galaxy (php-fpm, mysql, solr, memcache, etc.).
It would be awesome to list Ansible roles related to Drupal in a wiki page. The hard part would be maintaining this page.
FWIW. . . .
A few of us are considering that same "hard part" within the scope of a new initiative. The idea is to focus conversations on a list of Drupal-specific DevOps options, including LAMP/LEMP tooling, to reference and act as a concise resource:
https://groups.drupal.org/node/415828
Please leave feedback there on whether this may help you—the effort just started and is in that phase now, pre-Austin. Thanks.