Add all files needed to bring up VM and run agaric.com locally

This commit is contained in:
benjamin melançon 2018-08-20 10:45:20 -04:00
parent 52c8b60bac
commit 4d2bc0ee24
742 changed files with 24037 additions and 0 deletions

View file

@ -0,0 +1,18 @@
---
- name: Ensure PHP configuration directories exist.
file:
path: "{{ item }}"
state: directory
mode: 0755
follow: true
with_items: "{{ php_extension_conf_paths }}"
- name: Copy Tideways INI into various other conf folders.
template:
src: tideways.ini.j2
dest: "{{ item }}/{{ php_tideways_config_filename }}"
owner: root
group: root
mode: 0644
with_items: "{{ php_extension_conf_paths }}"
notify: restart webserver

View file

@ -0,0 +1,62 @@
---
- name: Include OS-specific variables.
include_vars: "{{ ansible_os_family }}.yml"
- name: Define php_tideways_module_path.
set_fact:
php_tideways_module_path: "{{ __php_tideways_module_path }}"
when: php_tideways_module_path is not defined
- name: Define php_tideways_config_filename.
set_fact:
php_tideways_config_filename: "{{ __php_tideways_config_filename }}"
when: php_tideways_config_filename is not defined
# Setup/install tasks.
- name: Ensure dependencies for installing Tideways are present.
package: "name={{ item }} state=installed"
with_items:
- make
- gcc
- unzip
- name: Download and untar Tideways.
unarchive:
src: "{{ tideways_download_url }}"
dest: "{{ workspace }}"
copy: no
creates: "{{ workspace }}/{{ tideways_download_folder_name }}"
- name: Build Tideways.
shell: >
{{ item }}
chdir={{ workspace }}/{{ tideways_download_folder_name }}
creates={{ workspace }}/{{ tideways_download_folder_name }}/modules/tideways.so
with_items:
- phpize
- ./configure
- make
- make install
notify: restart webserver
- name: Ensure Tideways module path exists.
file:
path: "{{ php_tideways_module_path }}"
state: directory
owner: root
group: root
mode: 0755
- name: Move Tideways module into place.
shell: >
cp {{ workspace }}/{{ tideways_download_folder_name }}/modules/tideways.so {{ php_tideways_module_path }}/tideways.so
creates={{ php_tideways_module_path }}/tideways.so
notify: restart webserver
# TODO - Install the Tideways.php file for UI?
# $ php -r 'echo ini_get("extension_dir")."\n";'
# $ cp Tideways.php /path/to/php/lib
- include: configure.yml
- include: xhprof.yml
when: tideways_install_xhprof_ui

View file

@ -0,0 +1,42 @@
- name: Define xhprof_download_url.
set_fact:
xhprof_download_url: "{{ __tideways_xhprof_download_url }}"
when: xhprof_download_url is not defined
- name: Define xhprof_download_folder_name.
set_fact:
xhprof_download_folder_name: "{{ __tideways_xhprof_download_folder_name }}"
when: xhprof_download_folder_name is not defined
- name: Define php_xhprof_lib_dir.
set_fact:
php_xhprof_lib_dir: "{{ __php_xhprof_lib_dir }}"
when: php_xhprof_lib_dir is not defined
- name: Define php_xhprof_html_dir.
set_fact:
php_xhprof_html_dir: "{{ __php_xhprof_html_dir }}"
when: php_xhprof_html_dir is not defined
- name: Ensure dependencies for the XHProf UI are present.
package: "name={{ item }} state=installed"
with_items:
- graphviz
- name: Download and untar XHProf.
unarchive:
src: "{{ xhprof_download_url }}"
dest: "{{ workspace }}"
copy: no
creates: "{{ workspace }}/{{ xhprof_download_folder_name }}"
- name: Move XHProf PHP library into place.
shell: >
cp -r {{ workspace }}/{{ xhprof_download_folder_name }}/xhprof_lib {{ php_xhprof_lib_dir }}
creates={{ php_xhprof_lib_dir }}/utils/xhprof_lib.php
- name: Move XHProf UI into place.
shell: >
cp -r {{ workspace }}/{{ xhprof_download_folder_name }}/xhprof_html {{ php_xhprof_html_dir }}
creates={{ php_xhprof_html_dir }}/index.php
- include: configure.yml