├── .gitignore ├── README.md ├── Vagrantfile ├── ansible ├── dev ├── roles │ ├── apache │ │ ├── handlers │ │ │ └── main.yml │ │ ├── tasks │ │ │ └── main.yml │ │ └── templates │ │ │ └── vhost.conf.tpl │ ├── init │ │ ├── tasks │ │ │ └── main.yml │ │ └── templates │ │ │ └── timezone.tpl │ ├── magento │ │ └── tasks │ │ │ └── main.yml │ ├── mailcatcher │ │ ├── tasks │ │ │ └── main.yml │ │ └── templates │ │ │ ├── mailcatcher.conf.tpl │ │ │ └── mailcatcher.ini.tpl │ ├── mysql │ │ ├── handlers │ │ │ └── main.yml │ │ ├── tasks │ │ │ └── main.yml │ │ └── templates │ │ │ ├── system-my.cnf.tpl │ │ │ └── vagrant-my.cnf.tpl │ ├── n98-magerun │ │ ├── tasks │ │ │ └── main.yml │ │ └── templates │ │ │ └── n98-magerun.yaml.tpl │ ├── php │ │ ├── handlers │ │ │ └── main.yml │ │ └── tasks │ │ │ └── main.yml │ ├── xdebug │ │ ├── tasks │ │ │ └── main.yml │ │ └── templates │ │ │ └── xdebug.ini.tpl │ └── xhprof │ │ ├── tasks │ │ └── main.yml │ │ └── templates │ │ ├── footer.php.tpl │ │ ├── header.php.tpl │ │ ├── xhprof-ui.conf.tpl │ │ └── xhprof.ini.tpl └── site.yml ├── profiler-runs ├── xdebug │ └── .gitkeep └── xhprof │ └── .gitkeep └── public └── .gitkeep /.gitignore: -------------------------------------------------------------------------------- 1 | /.vagrant 2 | /public/* 3 | /profiler-runs/xdebug/* 4 | /profiler-runs/xhprof/* 5 | !**/.gitkeep 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Magento Ansible Vagrant Box 2 | 3 | An [idempotent][8] Ubuntu 12.04 LTS / Apache 2.4 / PHP 5.4 / APC / PHP-FPM / 4 | MySQL 5.5 / XDebug/ XHProf / Mailcatcher Vagrant box, built via Ansible, 5 | set up with Magento in mind. 6 | 7 | Currently only tested on OS X (Yosemite), would very much appreciate 8 | feedback of people using this succesfully (or not) on other OS's. 9 | 10 | 11 | ## OS X Quick Start 12 | 13 | Make sure you have these things (you've already got [brew][12], right?!): 14 | 15 | brew install vagrant 16 | vagrant plugin install vagrant-bindfs 17 | brew install ansible 18 | 19 | Then run: 20 | 21 | vagrant up 22 | 23 | The MySQL username is `root` with no password, you can simply SSH in and 24 | type `mysql`. If you're not sure where to go next, see the section 25 | [Install Magento](#install-magento) for more info. 26 | 27 | 28 | ## URLs 29 | 30 | * [http://192.168.56.101][1] - Web Root 31 | * [http://192.168.56.101:81][2] - XHProfUI 32 | * [http://192.168.56.101:82][3] - Mailcatcher 33 | 34 | 35 | ## How To 36 | 37 | ### Install Magento 38 | 39 | Point a DNS label at the box: 40 | 41 | echo "192.168.56.101 magento.dev" | sudo tee -a /etc/hosts 42 | 43 | Create a DB and install Magento 44 | 45 | vagrant ssh 46 | mysqladmin create magento 47 | sudo n98-magerun install --installationFolder=/vagrant/public 48 | 49 | Done, just visit [magento.dev](magento.dev)! 50 | 51 | ### Set Up a Cron Job 52 | 53 | SSH in to the box and add a cron job to the `www-data` user by using 54 | `sudo crontab -e -u www-data` 55 | 56 | 57 | ## Features 58 | 59 | ### XDebug 60 | 61 | Set to allow remote debugging, profiling and tracing. Install the 62 | [XDebug Helper][4] chrome extension to trigger these things. Calls back 63 | to the default port of 9000 for debugging, profiles and traces get spat 64 | out in the `profiler-runs/xdebug` directory in order to allow easy usage 65 | of apps like kcachegrind / qcachegrind, or online tools like [Blackfire] 66 | [6]. 67 | 68 | ### XHProf 69 | 70 | As per Xdebug, XHProf spits out profile runs to `profiler-runs/xhprof` 71 | to allow you to use to use Blackfire or whatever. Also exposes the runs 72 | via XHProfUI at [http://192.168.56.101:81][2], and has graphvix for 73 | showing call graphs. Use the [XHProf Helper][5] for chrome to make it 74 | easier 75 | 76 | ### Mailcatcher 77 | 78 | Stops e-mails going to their intended recipients,a nd instead shows them 79 | in a web interface, which is at [http://192.168.56.101:82][3], which 80 | allows you to see the e-mails that have been sent. 81 | 82 | 83 | ## Notes 84 | 85 | ### Why Ubuntu 12 / Apache 2.4 / PHP 5.4 / etc 86 | 87 | I choose Ubuntu 12.04 LTS because it allows easy installation of PHP 88 | 5.4. 89 | 90 | I chose Apache mainly because I didn't see a need for nginx - Apache 2.4 91 | with PHP-FPM is performant and familiar. Also, Apache can read Magento's 92 | .htaccess files, the only part it doesn't read are the `mod_php` settings, 93 | which don't change between versions and I have replicated in the Apache 94 | config. 95 | 96 | I chose PHP5.4 because it is the most supported version through the 97 | Magento versions (1.9+ supports it natively, and 1.6 - 1.8 can be patched 98 | to support it). 99 | 100 | ### BindFS 101 | 102 | [BindFS][9] allows you to rebind a directory with different permissions, 103 | which is ideal for Vagrant environments, as the default NFS permissions 104 | map to the `501:20` in the guest, using BindFS lets you remap the 105 | permissions so that the files are user:group of `www-data`, which just 106 | makes things easier. 107 | 108 | You'll get a yellow message (see below) on vagrant up saying "Bindfs 109 | seems to not be installed on the virtual machine", please note this isn't 110 | an error, it's just the vagrant BindFS plugin installing BindFS on the 111 | guest. 112 | 113 | ![BindFS Warning](https://monosnap.com/file/46mEbnGBDj2ojoO7bwdWqFJA9wKMYU.png) 114 | 115 | ### Apache Setup 116 | 117 | The port 80 vhost purposefully doesn't have a `ServerName`, which means 118 | you can point whatever the hell you want at it and it will dutifully 119 | serve up the web root. 120 | 121 | ### Vagrant Port Mapping 122 | 123 | I haven't added any, if you want to expose your VM to external hosts you 124 | can add some if you like, but I prefer to use [ngrok][10]. You could 125 | also look in to [Vagrant share][11]. 126 | 127 | ### Variables 128 | 129 | I purposefully didn't bother with extracting things in to variables in 130 | order to make the Ansible roles easier to read, and I don't yet envisage 131 | using this template on multiple servers where variables might get 132 | overridden. Basically, I just wanted to keep things simple. 133 | 134 | 135 | [1]: http://192.168.56.101 "Web root" 136 | [2]: http://192.168.56.101:81 "XHProf" 137 | [3]: http://192.168.56.101:82 "Mailcatcher" 138 | [4]: https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?hl=en "Chrome XDebug Helper" 139 | [5]: https://chrome.google.com/webstore/detail/xhprof-helper/adnlhmmjijeflmbmlpmhilkicpnodphi?hl=en "Chrome XHProf Helper" 140 | [6]: https://blackfire.io/ "Blackfire Profiler" 141 | [8]: http://en.wikipedia.org/wiki/Idempotence "Idempotence" 142 | [9]: http://bindfs.org/ "BindFS" 143 | [10]: https://ngrok.com/ "Introspected tunnels to localhost" 144 | [11]: http://docs.vagrantup.com/v2/share/ "Vagrant share" 145 | [12]: http://brew.sh/ "Homebrew" 146 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | Vagrant.require_version ">= 1.5" 2 | 3 | Vagrant.configure("2") do |config| 4 | 5 | config.vm.provider :virtualbox do |v| 6 | v.name = "Magento Ansible" 7 | v.customize [ 8 | "modifyvm", :id, 9 | "--name", "Magento Ansible", 10 | "--memory", 2048, 11 | "--natdnshostresolver1", "on", 12 | "--cpus", 1, 13 | ] 14 | end 15 | 16 | config.vm.box = "ubuntu/precise64" 17 | 18 | config.vm.network :private_network, ip: "192.168.56.101" 19 | config.ssh.forward_agent = true 20 | 21 | config.vm.provision "ansible" do |ansible| 22 | ansible.playbook = "ansible/site.yml" 23 | ansible.inventory_path = "ansible/dev" 24 | ansible.limit = 'all' 25 | ansible.extra_vars = { 26 | private_interface: "192.168.56.101", 27 | hostname: "magento-ansible" 28 | } 29 | end 30 | 31 | if Vagrant.has_plugin?('vagrant-bindfs') 32 | config.vm.synced_folder ".", "/mnt/bindfs", type: "nfs" 33 | config.bindfs.bind_folder "/mnt/bindfs", "/vagrant", 34 | user: 'www-data', 35 | group: 'www-data', 36 | perms: "ug=rwX:o=rD" 37 | else 38 | config.vm.synced_folder ".", "/vagrant", type: "nfs" 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /ansible/dev: -------------------------------------------------------------------------------- 1 | [dev] 2 | 192.168.56.101 3 | -------------------------------------------------------------------------------- /ansible/roles/apache/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: restart apache 3 | service: name=apache2 enabled=yes state=restarted 4 | -------------------------------------------------------------------------------- /ansible/roles/apache/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Add ondrej ppa repository for Apache 2.4 3 | apt_repository: repo=ppa:ondrej/apache2 update_cache=yes 4 | 5 | - name: Install Apache 6 | apt: pkg={{ item }} state=latest 7 | with_items: 8 | - apache2 9 | - libapache2-mod-fastcgi 10 | 11 | - name: Enable Apache Modules 12 | apache2_module: state=present name={{ item }} 13 | with_items: 14 | - rewrite 15 | - vhost_alias 16 | - proxy_fcgi 17 | notify: restart apache 18 | 19 | - name: Disable default site 20 | command: a2dissite 000-default.conf removes=/etc/apache2/sites-enabled/000-default.conf 21 | notify: restart apache 22 | 23 | - name: Add vagrant site 24 | template: src=vhost.conf.tpl dest=/etc/apache2/sites-available/000-vagrant.conf 25 | notify: restart apache 26 | 27 | - name: Enable vagrant site 28 | command: a2ensite 000-vagrant.conf creates=/etc/apache2/sites-enabled/000-vagrant.conf 29 | notify: restart apache 30 | -------------------------------------------------------------------------------- /ansible/roles/apache/templates/vhost.conf.tpl: -------------------------------------------------------------------------------- 1 | ServerName {{ ansible_eth1['ipv4']['address'] }} 2 | 3 | ServerAdmin webmaster@localhost 4 | DocumentRoot {{ vagrant_root }}/public 5 | ErrorLog ${APACHE_LOG_DIR}/vagrant-error.log 6 | CustomLog ${APACHE_LOG_DIR}/vagrant-access.log combined 7 | SetEnv MAGE_IS_DEVELOPER_MODE true 8 | ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000{{ vagrant_root }}/public/$1 9 | 10 | Options All 11 | AllowOverride All 12 | Require all granted 13 | 14 | 15 | -------------------------------------------------------------------------------- /ansible/roles/init/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Update apt 3 | apt: update_cache=yes 4 | 5 | - name: Install basic system packages 6 | apt: pkg={{ item }} state=latest 7 | with_items: 8 | - curl 9 | - wget 10 | - python-software-properties 11 | - vim 12 | - git 13 | 14 | - name: Set the timezone 15 | template: src=timezone.tpl dest=/etc/timezone 16 | register: timezoneset 17 | 18 | - name: Run dpkg-reconfigure for timezone change 19 | command: dpkg-reconfigure --frontend noninteractive tzdata 20 | when: timezoneset|changed 21 | 22 | - name: Set the hostname 23 | shell: hostname {{ hostname }} 24 | when: ansible_hostname != hostname 25 | register: hostnameset 26 | 27 | - name: Update /etc/hostname 28 | shell: echo {{ hostname }} > /etc/hostname 29 | when: hostnameset|changed 30 | 31 | - name: Update /etc/hosts 32 | lineinfile: dest=/etc/hosts 33 | regexp='^127\.0\.0\.1' 34 | line='127.0.0.1 localhost {{ hostname }}' 35 | when: hostnameset|changed 36 | 37 | - name: Add the vagrant user to the www-data group 38 | user: name=vagrant groups=www-data append=yes -------------------------------------------------------------------------------- /ansible/roles/init/templates/timezone.tpl: -------------------------------------------------------------------------------- 1 | {{ timezone }} 2 | -------------------------------------------------------------------------------- /ansible/roles/magento/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install PHP packages required for Magento 3 | apt: pkg={{ item }} state=latest 4 | with_items: 5 | - php5-curl 6 | - php5-gd 7 | - php5-mcrypt 8 | - php5-mysql 9 | - php5-intl 10 | notify: restart apache 11 | -------------------------------------------------------------------------------- /ansible/roles/mailcatcher/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Add brightbox ppa repository for Ruby 1.9 3 | apt_repository: repo=ppa:brightbox/ruby-ng update_cache=yes 4 | 5 | - name: Install Mailcatcher dependencies 6 | apt: pkg={{ item }} state=latest 7 | with_items: 8 | - ruby1.9.3 9 | - libsqlite3-dev 10 | 11 | # it takes a while to gem install, and I'm not bothered about upgrading 12 | - name: Check if mailcatcher is already installed 13 | command: gem list 14 | register: gem_list 15 | changed_when: False 16 | 17 | - name: Install Mailcatcher 18 | # we need to have a login shell to use 1.9 gem, so we can't use ansible gem 19 | command: bash -lc "gem install mailcatcher" 20 | when: '"mailcatcher" not in gem_list.stdout' 21 | 22 | - name: Install Mailcatcher service definition 23 | template: src=mailcatcher.conf.tpl dest=/etc/init/mailcatcher.conf 24 | 25 | - name: Start Mailcatcher 26 | service: name=mailcatcher state=started 27 | 28 | - name: Add Mailcatcher PHP config 29 | template: src=mailcatcher.ini.tpl dest=/etc/php5/mods-available/mailcatcher.ini 30 | notify: restart php5-fpm 31 | 32 | - name: Enable Mailcatcher PHP config 33 | command: php5enmod mailcatcher creates=/etc/php5/conf.d/20-mailcatcher.ini 34 | notify: restart php5-fpm 35 | -------------------------------------------------------------------------------- /ansible/roles/mailcatcher/templates/mailcatcher.conf.tpl: -------------------------------------------------------------------------------- 1 | description "Mailcatcher" 2 | 3 | start on runlevel [2345] 4 | stop on runlevel [!2345] 5 | 6 | respawn 7 | 8 | exec /usr/bin/env mailcatcher --foreground --http-ip={{ ansible_eth1['ipv4']['address'] }} --http-port 82 9 | -------------------------------------------------------------------------------- /ansible/roles/mailcatcher/templates/mailcatcher.ini.tpl: -------------------------------------------------------------------------------- 1 | sendmail_path = /usr/bin/env /usr/local/bin/catchmail 2 | -------------------------------------------------------------------------------- /ansible/roles/mysql/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: restart mysql 3 | service: name=mysql enabled=yes state=restarted 4 | -------------------------------------------------------------------------------- /ansible/roles/mysql/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install MySQL 3 | apt: pkg={{ item }} state=latest 4 | with_items: 5 | - mysql-server 6 | - mysql-client 7 | - python-mysqldb 8 | 9 | - name: Set MySQL settings 10 | template: src=system-my.cnf.tpl dest=/etc/mysql/conf.d/vagrant.cnf 11 | notify: restart mysql 12 | 13 | - name: Allow root access from anywhere 14 | mysql_user: name=root password= host=% priv=*.*:ALL state=present 15 | 16 | - name: Set credentials in vagrant .my.cnf 17 | sudo: no 18 | template: src=vagrant-my.cnf.tpl dest=~/.my.cnf 19 | -------------------------------------------------------------------------------- /ansible/roles/mysql/templates/system-my.cnf.tpl: -------------------------------------------------------------------------------- 1 | [mysqld] 2 | bind-address = 0.0.0.0 3 | -------------------------------------------------------------------------------- /ansible/roles/mysql/templates/vagrant-my.cnf.tpl: -------------------------------------------------------------------------------- 1 | [client] 2 | user=root 3 | -------------------------------------------------------------------------------- /ansible/roles/n98-magerun/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install N98 Magerun 3 | command: curl -o /usr/local/bin/n98-magerun https://raw.githubusercontent.com/netz98/n98-magerun/master/n98-magerun.phar creates=/usr/local/bin/n98-magerun 4 | 5 | - name: Make N98 executable 6 | file: path=/usr/local/bin/n98-magerun mode="755" 7 | 8 | - name: Add N98 config 9 | template: src=n98-magerun.yaml.tpl dest=/etc/n98-magerun.yaml -------------------------------------------------------------------------------- /ansible/roles/n98-magerun/templates/n98-magerun.yaml.tpl: -------------------------------------------------------------------------------- 1 | commands: 2 | N98\Magento\Command\Installer\InstallCommand: 3 | installation: 4 | defaults: 5 | currency: GBP 6 | locale: en_GB 7 | timezone: Europe/London 8 | use_secure: no 9 | use_rewrites: yes 10 | session_save: files 11 | admin_username: admin 12 | admin_firstname: John 13 | admin_lastname: Doe 14 | admin_password: password123 15 | admin_frontname: admin 16 | admin_email: john.doe@example.com -------------------------------------------------------------------------------- /ansible/roles/php/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: restart php5-fpm 3 | service: name=php5-fpm enabled=yes state=restarted 4 | -------------------------------------------------------------------------------- /ansible/roles/php/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Add ondrej ppa repository for PHP 5.4 3 | apt_repository: repo=ppa:ondrej/php5-oldstable update_cache=yes 4 | 5 | - name: Install PHP 6 | apt: pkg={{ item }} state=latest 7 | with_items: 8 | - php5 9 | - php5-cli 10 | - php-apc 11 | - php5-fpm 12 | - php5-dev 13 | - php-pear 14 | notify: restart php5-fpm 15 | 16 | - name: Make php-fpm listen on 127.0.0.1:9000 17 | lineinfile: dest=/etc/php5/fpm/pool.d/www.conf 18 | regexp='listen =' 19 | line='listen = 127.0.0.1:9000' 20 | notify: restart php5-fpm 21 | 22 | - name: Set PHP settings 23 | lineinfile: dest=/etc/php5/{{ item.file }}/php.ini 24 | regexp='{{ item.key }} =' 25 | line='{{ item.key }} = {{ item.value }}' 26 | with_items: 27 | - { file: 'fpm', key: 'date.timezone', value: '{{ timezone }}' } 28 | - { file: 'cli', key: 'date.timezone', value: '{{ timezone }}' } 29 | - { file: 'fpm', key: 'memory_limit', value: '256M' } 30 | - { file: 'cli', key: 'memory_limit', value: '256M' } 31 | - { file: 'fpm', key: 'max_execution_time', value: '18000' } 32 | - { file: 'cli', key: 'max_execution_time', value: '18000' } 33 | - { file: 'fpm', key: 'error_reporting', value: '-1' } 34 | - { file: 'cli', key: 'error_reporting', value: '-1' } 35 | - { file: 'fpm', key: 'display_errors', value: '1' } 36 | - { file: 'cli', key: 'display_errors', value: '1' } 37 | - { file: 'fpm', key: 'display_startup_errors', value: '1' } 38 | - { file: 'cli', key: 'display_startup_errors', value: '1' } 39 | notify: restart php5-fpm 40 | -------------------------------------------------------------------------------- /ansible/roles/xdebug/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install XDebug 3 | command: pecl install xdebug 4 | register: xdebug_result 5 | changed_when: "'already installed' not in xdebug_result.stdout" 6 | failed_when: "xdebug_result.stderr or ('ERROR' in xdebug_result.stdout)" 7 | 8 | - name: Add XDebug config 9 | template: src=xdebug.ini.tpl dest=/etc/php5/conf.d/30-xdebug-config.ini 10 | notify: restart php5-fpm 11 | -------------------------------------------------------------------------------- /ansible/roles/xdebug/templates/xdebug.ini.tpl: -------------------------------------------------------------------------------- 1 | zend_extension=/usr/lib/php5/20100525/xdebug.so 2 | xdebug.remote_enable=On 3 | xdebug.remote_connect_back=On 4 | xdebug.collect_params=2 5 | xdebug.profiler_enable_trigger=1 6 | xdebug.profiler_output_dir={{ vagrant_root }}/profiler-runs/xdebug 7 | xdebug.trace_enable_trigger=1 8 | xdebug.trace_output_dir={{ vagrant_root }}/profiler-runs/xdebug 9 | xdebug.max_nesting_level=1000 10 | -------------------------------------------------------------------------------- /ansible/roles/xhprof/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Install XHProf 3 | command: pecl install channel://pecl.php.net/xhprof-0.9.4 4 | register: xhprof 5 | changed_when: "'already installed' not in xhprof.stdout" 6 | failed_when: "xhprof.stderr or ('ERROR' in xhprof.stdout)" 7 | 8 | - name: Create header and footer directory 9 | file: path=/usr/share/php/xhprof_includes/ state=directory 10 | 11 | - name: Create header and footer files 12 | template: src={{ item }}.php.tpl dest=/usr/share/php/xhprof_includes/{{ item }}.php 13 | with_items: 14 | - header 15 | - footer 16 | 17 | - name: Add XHProf PHP config 18 | template: src=xhprof.ini.tpl dest=/etc/php5/mods-available/xhprof.ini 19 | notify: restart php5-fpm 20 | 21 | - name: Enable XHProf PHP config 22 | command: php5enmod xhprof creates=/etc/php5/conf.d/20-xhprof.ini 23 | notify: restart php5-fpm 24 | 25 | - name: Add XHProf site 26 | template: src=xhprof-ui.conf.tpl dest=/etc/apache2/sites-available/000-xhprof-ui.conf 27 | notify: restart apache 28 | 29 | - name: Enable XHProf site 30 | command: a2ensite 000-xhprof-ui.conf creates=/etc/apache2/sites-enabled/000-xhprof-ui.conf 31 | notify: restart apache 32 | -------------------------------------------------------------------------------- /ansible/roles/xhprof/templates/footer.php.tpl: -------------------------------------------------------------------------------- 1 | save_run($data, "xhprof"); 9 | } 10 | ?> 11 | -------------------------------------------------------------------------------- /ansible/roles/xhprof/templates/header.php.tpl: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /ansible/roles/xhprof/templates/xhprof-ui.conf.tpl: -------------------------------------------------------------------------------- 1 | Listen 81 2 | 3 | ServerAdmin webmaster@localhost 4 | DocumentRoot /usr/share/php/xhprof_html 5 | ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/usr/share/php/xhprof_html/$1 6 | 7 | Options All 8 | AllowOverride All 9 | Require all granted 10 | 11 | 12 | -------------------------------------------------------------------------------- /ansible/roles/xhprof/templates/xhprof.ini.tpl: -------------------------------------------------------------------------------- 1 | extension=xhprof.so 2 | auto_prepend_file=/usr/share/php/xhprof_includes/header.php 3 | auto_append_file=/usr/share/php/xhprof_includes/footer.php 4 | xhprof.output_dir={{ vagrant_root }}/profiler-runs/xhprof 5 | -------------------------------------------------------------------------------- /ansible/site.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | sudo: yes 4 | vars: 5 | timezone: Europe/London 6 | vagrant_root: /vagrant 7 | roles: 8 | - init 9 | - apache 10 | - php 11 | - xdebug 12 | - xhprof 13 | - mysql 14 | - mailcatcher 15 | - magento 16 | - n98-magerun 17 | -------------------------------------------------------------------------------- /profiler-runs/xdebug/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikewhitby/magento-ansible/f2dbb688b70cf53c4e21e5049adabd54076fa262/profiler-runs/xdebug/.gitkeep -------------------------------------------------------------------------------- /profiler-runs/xhprof/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikewhitby/magento-ansible/f2dbb688b70cf53c4e21e5049adabd54076fa262/profiler-runs/xhprof/.gitkeep -------------------------------------------------------------------------------- /public/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikewhitby/magento-ansible/f2dbb688b70cf53c4e21e5049adabd54076fa262/public/.gitkeep --------------------------------------------------------------------------------