replace puphpet with plain shell provisioning
authorCornelius Weiß <mail@corneliusweiss.de>
Wed, 30 Apr 2014 11:31:36 +0000 (13:31 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 30 Apr 2014 15:09:41 +0000 (17:09 +0200)
puphpet turnded out to be very unstable as it
always fetches modules from their git masters

Change-Id: I83f8e9d72d12141de56a359b85557f40a436b751
Reviewed-on: http://gerrit.tine20.com/customers/587
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
18 files changed:
.gitignore
scripts/vagrant/Vagrantfile
scripts/vagrant/bootstrap_vagrant.sh [new file with mode: 0644]
scripts/vagrant/puphpet/config.yaml [deleted file]
scripts/vagrant/puphpet/files/dot/.bash_aliases [deleted file]
scripts/vagrant/puphpet/files/dot/.vimrc [deleted file]
scripts/vagrant/puphpet/files/dot/apache.conf [deleted file]
scripts/vagrant/puphpet/puppet/Puppetfile [deleted file]
scripts/vagrant/puphpet/puppet/hiera.yaml [deleted file]
scripts/vagrant/puphpet/puppet/manifests/default.pp [deleted file]
scripts/vagrant/puphpet/shell/execute-files.sh [deleted file]
scripts/vagrant/puphpet/shell/initial-setup.sh [deleted file]
scripts/vagrant/puphpet/shell/librarian-puppet-vagrant.sh [deleted file]
scripts/vagrant/puphpet/shell/os-detect.sh [deleted file]
scripts/vagrant/puphpet/shell/self-promotion.txt [deleted file]
scripts/vagrant/puphpet/shell/update-puppet.sh [deleted file]
scripts/vagrant/puphpet/tine20.yaml [deleted file]
scripts/vagrant/setup-tine20.sh [new file with mode: 0755]

index eb5bab0..4d02f88 100644 (file)
@@ -14,6 +14,11 @@ tine20/*/js/*-lang-*
 tine20/Tinebase/js/Locale/build/*.js
 scripts/packaging/tine20build/
 .vagrant
+scripts/vagrant/tmp
+scripts/vagrant/cache
+scripts/vagrant/files
+scripts/vagrant/logs
+scripts/vagrant/conf
 tine20/build
 scripts/weeklyevents
 scripts/custom
index ae09d5e..107815d 100644 (file)
@@ -1,44 +1,40 @@
-Vagrant.configure("2") do |config|
-  config.vm.box = "debian-wheezy72-x64-vbox43"
-  config.vm.box_url = "http://box.puphpet.com/debian-wheezy72-x64-vbox43.box"
-
-  config.vm.network "private_network", ip: "192.168.56.101"
-
-
-  config.vm.synced_folder "../..", "/usr/local/share/tine20.git", id: "vagrant-root", :nfs => false
-  #config.vm.synced_folder "../packaging/debian/etc", "/etc/tine20", id: "vagrant-root", :nfs => false
-  
-  config.vm.usable_port_range = (2200..2250)
-  config.vm.provider :virtualbox do |virtualbox|
-    virtualbox.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
-    virtualbox.customize ["modifyvm", :id, "--memory", "512"]
-    virtualbox.customize ["setextradata", :id, "--VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
-  end
-
-  config.vm.provision :shell, :path => "puphpet/shell/initial-setup.sh"
-  config.vm.provision :shell, :path => "puphpet/shell/update-puppet.sh"
-  config.vm.provision :shell, :path => "puphpet/shell/librarian-puppet-vagrant.sh"
-  config.vm.provision :puppet do |puppet|
-    puppet.facter = {
-      "ssh_username" => "vagrant"
-    }
-
-    puppet.manifests_path = "puphpet/puppet/manifests"
-    puppet.options = ["--verbose", "--hiera_config /vagrant/puphpet/puppet/hiera.yaml", "--parser future"]
-  end
-
-  config.vm.provision :shell, :path => "puphpet/shell/execute-files.sh"
-
-
-
-
-  config.ssh.username = "vagrant"
-
-  config.ssh.shell = "bash -l"
-
-  config.ssh.keep_alive = true
-  config.ssh.forward_agent = false
-  config.ssh.forward_x11 = false
-  config.vagrant.host = :detect
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
+VAGRANTFILE_API_VERSION = "2"
+
+Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+       # Name
+       config.vm.box = "precise32"
+
+       # vagrant-cachier caches packages for your vm local
+       if Vagrant.has_plugin?("vagrant-cachier")
+               config.cache.scope = :box
+
+               config.cache.synced_folder_opts = {
+                       type: :nfs,
+                       mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
+               }
+       end
+
+       # cookies special provisioning
+       config.vm.provision :shell, :path => "bootstrap_vagrant.sh"
+
+       # Configure NFS shared folder
+       config.vm.synced_folder "../../", "/vagrant/tine20.git", type: "nfs"
+
+       # Create a private network, which allows host-only access to the machine
+       # using a specific IP.
+       # Hope it's free - yey!
+       config.vm.network :private_network, ip: "10.10.10.10"
+
+       # Provider-specific configuration so you can fine-tune various
+       # backing providers for Vagrant. These expose provider-specific options.
+       # Example for VirtualBox:
+       config.vm.provider :virtualbox do |vb|
+               vb.customize ["modifyvm", :id, "--memory", "1024"]
+               vb.customize ["modifyvm", :id, "--cpus", "2"]
+               vb.customize ["modifyvm", :id, "--ioapic", "on"]
+       end
 end
-
diff --git a/scripts/vagrant/bootstrap_vagrant.sh b/scripts/vagrant/bootstrap_vagrant.sh
new file mode 100644 (file)
index 0000000..20d5899
--- /dev/null
@@ -0,0 +1,104 @@
+#!/usr/bin/env bash
+
+# Mysql server setup
+echo mysql-server mysql-server/root_password select vagrant | debconf-set-selections
+echo mysql-server mysql-server/root_password_again select vagrant | debconf-set-selections
+
+# phpMyAdmin setup
+echo phpmyadmin phpmyadmin/dbconfig-install boolean true | debconf-set-selections
+echo phpmyadmin phpmyadmin/app-password-confirm password vagrant | debconf-set-selections
+echo phpmyadmin phpmyadmin/mysql/admin-pass password vagrant | debconf-set-selections
+echo phpmyadmin phpmyadmin/mysql/app-pass password vagrant | debconf-set-selections
+echo phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2 | debconf-set-selections
+
+################### INSTALL AND UPDATE ######################
+
+# Remove backports
+sed -i 's/.*backports.*//g' /etc/apt/sources.list
+
+# Update package lists
+apt-get update
+
+# Install lamp stack
+apt-get install -y mysql-server apache2 php5 libapache2-mod-php5 php5-mysql php5-gd php5-curl php-pear php5-xsl phpmyadmin
+
+# run apache as vagrant to ease things
+service apache2 stop
+sed -i 's/www-data/vagrant/g' /etc/apache2/envvars
+chown -R vagrant /var/lock/apache2
+service apache2 start
+
+# Install dev tools
+apt-get install -y  vim git subversion curl make wget nfs-common portmap
+
+# Additional stuff
+apt-get install -y zsh language-pack-de
+
+# Setup composer or if allready installed it would update
+curl -sS https://getcomposer.org/installer | php
+mv composer.phar /usr/local/bin/composer
+
+# Install jslint
+#svn co https://svn.code.sf.net/p/javascriptlint/code/trunk jsl 
+#cd jsl/
+#python setup.py install
+
+#################### USER CONFIG ##########################
+
+# Get grml-zsh
+#wget -O /home/vagrant/.zshrc http://git.grml.org/f/grml-etc-core/etc/zsh/zshrc
+
+# Set zsh as default shell
+#chsh vagrant -s /usr/bin/zsh
+
+# Create www link to /vagrant
+ln -s /vagrant /home/vagrant/www
+
+################# MYSQL AND WEBSERVER #####################
+
+# Allow unsecured remote access to MySQL.
+mysql -u root -p"vagrant" -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '' WITH GRANT OPTION; FLUSH PRIVILEGES;"
+
+# Fix mysql bug
+sed -e 's/127.0.0.1/0.0.0.0/g' -i '/etc/mysql/my.cnf'
+
+# Allow modules for Apache.
+a2enmod rewrite
+
+# Disable apache default sites
+a2dissite default 000-default
+
+# phpmyadmin vhost
+phpmyadmin_vhost="
+<VirtualHost *:80>\n
+       DocumentRoot    \"/usr/share/phpmyadmin\"\n
+       ServerName      pma.local\n
+       ServerAlias     www.pma.local\n
+</VirtualHost>\n"
+
+echo -e $phpmyadmin_vhost > /etc/apache2/sites-available/pma-local
+
+
+# Enable pma-local for apache
+a2ensite pma-local
+
+# Allow override for default site
+sed -i '/AllowOverride None/c AllowOverride All' /etc/apache2/sites-available/default
+
+# Remove phpmyadmin alias to enforce own vhost
+sed -i 's/^Alias.*$//' /etc/apache2/conf.d/phpmyadmin.conf
+
+###################### INSTALL TINE20 ######################
+if [ -d /vagrant/tine20.git/tine20 ]; then
+    source /vagrant/setup-tine20.sh
+fi
+
+###################### FINALS ###########################
+
+# Restart / Start services and clean up
+service apache2 restart
+service mysql restart
+apt-get clean
+
+# Add apache2 to autostart
+update-rc.d apache2 enable
diff --git a/scripts/vagrant/puphpet/config.yaml b/scripts/vagrant/puphpet/config.yaml
deleted file mode 100644 (file)
index 8e3511f..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
----
-vagrantfile-local:
-    vm:
-        box: debian-wheezy72-x64-vbox43
-        box_url: 'http://box.puphpet.com/debian-wheezy72-x64-vbox43.box'
-        hostname: null
-        network:
-            private_network: 192.168.56.101
-            forwarded_port: {  }
-        provider:
-            virtualbox:
-                modifyvm:
-                    natdnshostresolver1: on
-                    memory: '512'
-                setextradata:
-                    VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root: 1
-        provision:
-            puppet:
-                manifests_path: puphpet/puppet/manifests
-                options:
-                    - '--verbose'
-                    - '--hiera_config /vagrant/puphpet/puppet/hiera.yaml'
-                    - '--parser future'
-        synced_folder:
-            LZhss9UMsFXn:
-                id: vagrant-root
-                source: ./
-                target: /var/www
-                nfs: 'false'
-        usable_port_range: 2200..2250
-    ssh:
-        host: null
-        port: null
-        private_key_path: null
-        username: vagrant
-        guest_port: null
-        keep_alive: true
-        forward_agent: false
-        forward_x11: false
-        shell: 'bash -l'
-    vagrant:
-        host: ':detect'
-server:
-    packages: {  }
-    dot_files:
-        -
-            bash_aliases: null
-    _prevent_empty: ''
-apache:
-    modules:
-        - php
-        - rewrite
-    vhosts:
-        dYDR07tVlxGd:
-            servername: tine.vagrant
-            serveraliases:
-                - tine.vagrant
-            docroot: /www/tine.vagrant/htdocs
-            port: '80'
-            setenv:
-                - 'APP_ENV dev'
-            additional_includes:
-                - /vagrant/puphpet/files/dot/apache.conf
-    user: www-data
-    group: www-data
-    default_vhost: true
-    mpm_module: prefork
-    mod_pagespeed: 0
-    mod_spdy: 0
-php:
-    version: '55'
-    composer: '1'
-    modules:
-        php:
-            - cli
-            - intl
-            - mcrypt
-            - xsl
-            - ldap
-        pear: {  }
-        pecl:
-            - pecl_http
-    ini:
-        display_errors: On
-        error_reporting: '-1'
-        session.save_path: /var/lib/php/session
-    timezone: America/Chicago
-xdebug:
-    install: '1'
-    settings:
-        xdebug.default_enable: '1'
-        xdebug.remote_autostart: '0'
-        xdebug.remote_connect_back: '1'
-        xdebug.remote_enable: '1'
-        xdebug.remote_handler: dbgp
-        xdebug.remote_port: '9000'
-xhprof:
-    install: '1'
-drush:
-    install: 0
-    settings:
-        drush.tag_branch: 6.x
-mysql:
-    root_password: '1234'
-    phpmyadmin: '1'
-    adminer: 0
-    databases: {  }
-beanstalkd:
-    install: 0
-    listenaddress: 0.0.0.0
-    listenport: '13000'
-    maxjobsize: '65535'
-    maxconnections: '1024'
-    binlogdir: /var/lib/beanstalkd/binlog
-    binlogfsync: null
-    binlogsize: '10485760'
-
diff --git a/scripts/vagrant/puphpet/files/dot/.bash_aliases b/scripts/vagrant/puphpet/files/dot/.bash_aliases
deleted file mode 100644 (file)
index b1ab498..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-if [ -f /etc/bash_completion ]; then
-    source /etc/bash_completion
-fi
-
-__has_parent_dir () {
-    # Utility function so we can test for things like .git/.hg without firing up a
-    # separate process
-    test -d "$1" && return 0;
-
-    current="."
-    while [ ! "$current" -ef "$current/.." ]; do
-        if [ -d "$current/$1" ]; then
-            return 0;
-        fi
-        current="$current/..";
-    done
-
-    return 1;
-}
-
-__vcs_name() {
-    if [ -d .svn ]; then
-        echo "-[svn]";
-    elif __has_parent_dir ".git"; then
-        echo "-[$(__git_ps1 'git %s')]";
-    elif __has_parent_dir ".hg"; then
-        echo "-[hg $(hg branch)]"
-    fi
-}
-
-black=$(tput -Txterm setaf 0)
-red=$(tput -Txterm setaf 1)
-green=$(tput -Txterm setaf 2)
-yellow=$(tput -Txterm setaf 3)
-dk_blue=$(tput -Txterm setaf 4)
-pink=$(tput -Txterm setaf 5)
-lt_blue=$(tput -Txterm setaf 6)
-
-bold=$(tput -Txterm bold)
-reset=$(tput -Txterm sgr0)
-
-# Nicely formatted terminal prompt
-export PS1='\n\[$bold\]\[$black\][\[$dk_blue\]\@\[$black\]]-[\[$green\]\u\[$yellow\]@\[$green\]\h\[$black\]]-[\[$pink\]\w\[$black\]]\[\033[0;33m\]$(__vcs_name) \[\033[00m\]\[$reset\]\n\[$reset\]\$ '
-
-alias ls='ls -F --color=always'
-alias dir='dir -F --color=always'
-alias ll='ls -l'
-alias cp='cp -iv'
-alias rm='rm -i'
-alias mv='mv -iv'
-alias grep='grep --color=auto -in'
-alias ..='cd ..'
diff --git a/scripts/vagrant/puphpet/files/dot/.vimrc b/scripts/vagrant/puphpet/files/dot/.vimrc
deleted file mode 100644 (file)
index 2ff1aa6..0000000
+++ /dev/null
@@ -1,414 +0,0 @@
-set rtp+=$GOROOT/misc/vim
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Maintainer:
-"       Amir Salihefendic
-"       http://amix.dk - amix@amix.dk
-"
-" Version:
-"       5.0 - 29/05/12 15:43:36
-"
-" Blog_post:
-"       http://amix.dk/blog/post/19691#The-ultimate-Vim-configuration-on-Github
-"
-" Awesome_version:
-"       Get this config, nice color schemes and lots of plugins!
-"
-"       Install the awesome version from:
-"
-"           https://github.com/amix/vimrc
-"
-" Syntax_highlighted:
-"       http://amix.dk/vim/vimrc.html
-"
-" Raw_version:
-"       http://amix.dk/vim/vimrc.txt
-"
-" Sections:
-"    -> General
-"    -> VIM user interface
-"    -> Colors and Fonts
-"    -> Files and backups
-"    -> Text, tab and indent related
-"    -> Visual mode related
-"    -> Moving around, tabs and buffers
-"    -> Status line
-"    -> Editing mappings
-"    -> vimgrep searching and cope displaying
-"    -> Spell checking
-"    -> Misc
-"    -> Helper functions
-"
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => General
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Sets how many lines of history VIM has to remember
-set history=700
-
-" Enable filetype plugins
-filetype plugin on
-filetype indent on
-
-" Set to auto read when a file is changed from the outside
-set autoread
-
-" With a map leader it's possible to do extra key combinations
-" like <leader>w saves the current file
-let mapleader = ","
-let g:mapleader = ","
-
-" Fast saving
-nmap <leader>w :w!<cr>
-
-" :W sudo saves the file
-" (useful for handling the permission-denied error)
-command W w !sudo tee % > /dev/null
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => VIM user interface
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Set 7 lines to the cursor - when moving vertically using j/k
-set so=7
-
-" Turn on the WiLd menu
-set wildmenu
-
-" Ignore compiled files
-set wildignore=*.o,*~,*.pyc
-if has("win16") || has("win32")
-    set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
-else
-    set wildignore+=.git\*,.hg\*,.svn\*
-endif
-
-"Always show current position
-set ruler
-
-" Height of the command bar
-set cmdheight=2
-
-" A buffer becomes hidden when it is abandoned
-set hid
-
-" Configure backspace so it acts as it should act
-set backspace=eol,start,indent
-set whichwrap+=<,>,h,l
-
-" Ignore case when searching
-set ignorecase
-
-" When searching try to be smart about cases
-set smartcase
-
-" Highlight search results
-set hlsearch
-
-" Makes search act like search in modern browsers
-set incsearch
-
-" Don't redraw while executing macros (good performance config)
-set lazyredraw
-
-" For regular expressions turn magic on
-set magic
-
-" Show matching brackets when text indicator is over them
-set showmatch
-" How many tenths of a second to blink when matching brackets
-set mat=2
-
-" No annoying sound on errors
-set noerrorbells
-set novisualbell
-set t_vb=
-set tm=500
-
-" Add a bit extra margin to the left
-set foldcolumn=1
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Colors and Fonts
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Enable syntax highlighting
-syntax enable
-
-try
-    colorscheme desert
-catch
-endtry
-
-set background=dark
-
-" Set extra options when running in GUI mode
-if has("gui_running")
-    set guioptions-=T
-    set guioptions-=e
-    set t_Co=256
-    set guitablabel=%M\ %t
-endif
-
-" Set utf8 as standard encoding and en_US as the standard language
-set encoding=utf8
-
-" Use Unix as the standard file type
-set ffs=unix,dos,mac
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Files, backups and undo
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Turn backup off, since most stuff is in SVN, git et.c anyway...
-set nobackup
-set nowb
-set noswapfile
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Text, tab and indent related
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Use spaces instead of tabs
-set expandtab
-
-" Be smart when using tabs ;)
-set smarttab
-
-" 1 tab == 4 spaces
-set shiftwidth=4
-set tabstop=4
-
-" Linebreak on 500 characters
-set lbr
-set tw=500
-
-set ai "Auto indent
-set si "Smart indent
-set wrap "Wrap lines
-
-
-""""""""""""""""""""""""""""""
-" => Visual mode related
-""""""""""""""""""""""""""""""
-" Visual mode pressing * or # searches for the current selection
-" Super useful! From an idea by Michael Naumann
-vnoremap <silent> * :call VisualSelection('f', '')<CR>
-vnoremap <silent> # :call VisualSelection('b', '')<CR>
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Moving around, tabs, windows and buffers
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Treat long lines as break lines (useful when moving around in them)
-map j gj
-map k gk
-
-" Map <Space> to / (search) and Ctrl-<Space> to ? (backwards search)
-map <space> /
-map <c-space> ?
-
-" Disable highlight when <leader><cr> is pressed
-map <silent> <leader><cr> :noh<cr>
-
-" Smart way to move between windows
-map <C-j> <C-W>j
-map <C-k> <C-W>k
-map <C-h> <C-W>h
-map <C-l> <C-W>l
-
-" Close the current buffer
-map <leader>bd :Bclose<cr>
-
-" Close all the buffers
-map <leader>ba :1,1000 bd!<cr>
-
-" Useful mappings for managing tabs
-map <leader>tn :tabnew<cr>
-map <leader>to :tabonly<cr>
-map <leader>tc :tabclose<cr>
-map <leader>tm :tabmove
-map <leader>t<leader> :tabnext
-
-" Opens a new tab with the current buffer's path
-" Super useful when editing files in the same directory
-map <leader>te :tabedit <c-r>=expand("%:p:h")<cr>/
-
-" Switch CWD to the directory of the open buffer
-map <leader>cd :cd %:p:h<cr>:pwd<cr>
-
-" Specify the behavior when switching between buffers
-try
-  set switchbuf=useopen,usetab,newtab
-  set stal=2
-catch
-endtry
-
-" Return to last edit position when opening files (You want this!)
-autocmd BufReadPost *
-     \ if line("'\"") > 0 && line("'\"") <= line("$") |
-     \   exe "normal! g`\"" |
-     \ endif
-" Remember info about open buffers on close
-set viminfo^=%
-
-
-""""""""""""""""""""""""""""""
-" => Status line
-""""""""""""""""""""""""""""""
-" Always show the status line
-set laststatus=2
-
-" Format the status line
-set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Editing mappings
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Remap VIM 0 to first non-blank character
-map 0 ^
-
-" Move a line of text using ALT+[jk] or Comamnd+[jk] on mac
-nmap <M-j> mz:m+<cr>`z
-nmap <M-k> mz:m-2<cr>`z
-vmap <M-j> :m'>+<cr>`<my`>mzgv`yo`z
-vmap <M-k> :m'<-2<cr>`>my`<mzgv`yo`z
-
-if has("mac") || has("macunix")
-  nmap <D-j> <M-j>
-  nmap <D-k> <M-k>
-  vmap <D-j> <M-j>
-  vmap <D-k> <M-k>
-endif
-
-" Delete trailing white space on save, useful for Python and CoffeeScript ;)
-func! DeleteTrailingWS()
-  exe "normal mz"
-  %s/\s\+$//ge
-  exe "normal `z"
-endfunc
-autocmd BufWrite *.py :call DeleteTrailingWS()
-autocmd BufWrite *.coffee :call DeleteTrailingWS()
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => vimgrep searching and cope displaying
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" When you press gv you vimgrep after the selected text
-vnoremap <silent> gv :call VisualSelection('gv', '')<CR>
-
-" Open vimgrep and put the cursor in the right position
-map <leader>g :vimgrep // **/*.<left><left><left><left><left><left><left>
-
-" Vimgreps in the current file
-map <leader><space> :vimgrep // <C-R>%<C-A><right><right><right><right><right><right><right><right><right>
-
-" When you press <leader>r you can search and replace the selected text
-vnoremap <silent> <leader>r :call VisualSelection('replace', '')<CR>
-
-" Do :help cope if you are unsure what cope is. It's super useful!
-"
-" When you search with vimgrep, display your results in cope by doing:
-"   <leader>cc
-"
-" To go to the next search result do:
-"   <leader>n
-"
-" To go to the previous search results do:
-"   <leader>p
-"
-map <leader>cc :botright cope<cr>
-map <leader>co ggVGy:tabnew<cr>:set syntax=qf<cr>pgg
-map <leader>n :cn<cr>
-map <leader>p :cp<cr>
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Spell checking
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Pressing ,ss will toggle and untoggle spell checking
-map <leader>ss :setlocal spell!<cr>
-
-" Shortcuts using <leader>
-map <leader>sn ]s
-map <leader>sp [s
-map <leader>sa zg
-map <leader>s? z=
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Misc
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Remove the Windows ^M - when the encodings gets messed up
-noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm
-
-" Quickly open a buffer for scripbble
-map <leader>q :e ~/buffer<cr>
-
-" Toggle paste mode on and off
-map <leader>pp :setlocal paste!<cr>
-
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Helper functions
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-function! CmdLine(str)
-    exe "menu Foo.Bar :" . a:str
-    emenu Foo.Bar
-    unmenu Foo
-endfunction
-
-function! VisualSelection(direction, extra_filter) range
-    let l:saved_reg = @"
-    execute "normal! vgvy"
-
-    let l:pattern = escape(@", '\\/.*$^~[]')
-    let l:pattern = substitute(l:pattern, "\n$", "", "")
-
-    if a:direction == 'b'
-        execute "normal ?" . l:pattern . "^M"
-    elseif a:direction == 'gv'
-        call CmdLine("vimgrep " . '/'. l:pattern . '/' . ' **/*.' . a:extra_filter)
-    elseif a:direction == 'replace'
-        call CmdLine("%s" . '/'. l:pattern . '/')
-    elseif a:direction == 'f'
-        execute "normal /" . l:pattern . "^M"
-    endif
-
-    let @/ = l:pattern
-    let @" = l:saved_reg
-endfunction
-
-
-" Returns true if paste mode is enabled
-function! HasPaste()
-    if &paste
-        return 'PASTE MODE  '
-    en
-    return ''
-endfunction
-
-" Don't close window, when deleting a buffer
-command! Bclose call <SID>BufcloseCloseIt()
-function! <SID>BufcloseCloseIt()
-   let l:currentBufNum = bufnr("%")
-   let l:alternateBufNum = bufnr("#")
-
-   if buflisted(l:alternateBufNum)
-     buffer #
-   else
-     bnext
-   endif
-
-   if bufnr("%") == l:currentBufNum
-     new
-   endif
-
-   if buflisted(l:currentBufNum)
-     execute("bdelete! ".l:currentBufNum)
-   endif
-endfunction
diff --git a/scripts/vagrant/puphpet/files/dot/apache.conf b/scripts/vagrant/puphpet/files/dot/apache.conf
deleted file mode 100644 (file)
index 00aebd6..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-# Apache and PHP configuration for Tine 2.0
-#
-
-Alias /tine20                      /www/tine.vagrant/htdocs
-Alias /Microsoft-Server-ActiveSync /www/tine.vagrant/htdocs/Microsoft-Server-ActiveSync
-
-# some people prefer a simple URL like http://tine20.example.org
-# in this case you also have to disable to Alias lines above
-#<VirtualHost 1.2.3.4:80>
-#  DocumentRoot /www/tine.vagrant/htdocs
-#  ServerName   tine20.example.org
-#</VirtualHost>
-
-<Directory /www/tine.vagrant/htdocs>
-    Order Allow,Deny
-    Allow from all
-
-    DirectoryIndex index.php
-
-    Options +ExecCGI
-
-    <IfModule mod_php5.c>
-        php_admin_value max_input_time          120
-        php_admin_value include_path            .:/www/tine.vagrant/htdocs:/www/tine.vagrant/htdocs/library:/www/tine.vagrant/conf
-        #php_admin_value open_basedir            /www/tine.vagrant/htdocs:/var/lib/tine20:/tmp:/usr/share/php:/etc/tine20:/var/log/tine20
-        php_admin_value session.gc_maxlifetime  86400
-        php_admin_value memory_limit            128M
-        php_admin_value upload_max_filesize     20M
-        php_admin_value post_max_size           20M
-        
-        php_admin_value safe_mode               off
-        php_admin_flag  display_errors          off
-        php_admin_flag  log_errors              on
-        php_admin_flag  magic_quotes_gpc        off
-        php_admin_flag  magic_quotes_runtime    off
-        php_admin_flag  register_globals        off
-        php_admin_flag  zlib.output_compression on
-        
-        php_value       max_execution_time      90
-    </IfModule>
-    
-    <IfModule mod_rewrite.c>
-        RewriteEngine on
-
-        RewriteBase /tine20
-
-        # ActiveSync
-        RewriteRule ^Microsoft-Server-ActiveSync index.php?frontend=activesync         [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
-
-        # OpenID
-        RewriteRule ^users/(.*)                  index.php?frontend=openid&username=$1 [L,QSA]
-
-        # WebDAV / CalDAV / CardDAV
-        RewriteCond %{REQUEST_METHOD} !^(GET|POST)$
-        RewriteRule ^$                           index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
-
-        RewriteRule ^addressbooks                index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
-        RewriteRule ^calendars                   index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
-        RewriteRule ^webdav                      index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
-        RewriteRule ^principals                  index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
-        RewriteRule ^remote.php                  index.php?frontend=webdav             [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
-    </IfModule>
-
-    <IfModule mod_expires.c>
-        ExpiresActive on
-
-        ExpiresByType image/gif  "access plus 1 month 1 days"
-        ExpiresByType image/jpeg "access plus 1 month 1 days"
-        ExpiresByType image/png  "access plus 1 month 1 days"
-    </IfModule>
-    
-    <IfModule mod_deflate.c>
-        AddOutputFilterByType DEFLATE text/plain
-        AddOutputFilterByType DEFLATE text/html
-        AddOutputFilterByType DEFLATE text/css
-        AddOutputFilterByType DEFLATE application/javascript
-        AddOutputFilterByType DEFLATE application/json
-
-        <IfModule mod_headers.c>
-            # properly handle requests coming from behind proxies
-            Header append Vary User-Agent env=!dont-vary
-        </IfModule>
-    </IfModule>
-
-</Directory>
-
-
diff --git a/scripts/vagrant/puphpet/puppet/Puppetfile b/scripts/vagrant/puphpet/puppet/Puppetfile
deleted file mode 100644 (file)
index 3ba8743..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-forge "http://forge.puppetlabs.com"
-mod 'stdlib', :git => 'https://github.com/puphpet/puppetlabs-stdlib.git'
-mod 'concat', :git => 'https://github.com/puphpet/puppetlabs-concat.git'
-mod 'apt', :git => 'https://github.com/puphpet/puppetlabs-apt.git'
-mod 'yum', :git => 'https://github.com/puphpet/puppet-yum.git'
-mod 'vcsrepo', :git => 'https://github.com/puphpet/puppetlabs-vcsrepo.git'
-mod 'ntp', :git => 'https://github.com/puphpet/puppetlabs-ntp.git'
-mod 'iptables', :git => 'https://github.com/puphpet/puppet-iptables.git'
-mod 'apache', :git => 'https://github.com/puphpet/puppetlabs-apache.git'
-mod 'php', :git => 'https://github.com/puphpet/puppet-php.git'
-mod 'composer', :git => 'https://github.com/puphpet/puppet-composer.git'
-mod 'puphpet', :git => 'https://github.com/puphpet/puppet-puphpet.git'
-mod 'drush', :git => 'https://github.com/puphpet/puppet-drush.git', :ref => 'new'
-mod 'mysql', :git => 'https://github.com/puphpet/puppetlabs-mysql.git'
-mod 'beanstalkd', :git => 'https://github.com/puphpet/puppet-beanstalkd.git'
diff --git a/scripts/vagrant/puphpet/puppet/hiera.yaml b/scripts/vagrant/puphpet/puppet/hiera.yaml
deleted file mode 100644 (file)
index 0cde1f6..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
----
-:backends: yaml
-:yaml:
-    :datadir: '/vagrant/puphpet'
-:hierarchy:
-    - config
-:logger: console
diff --git a/scripts/vagrant/puphpet/puppet/manifests/default.pp b/scripts/vagrant/puphpet/puppet/manifests/default.pp
deleted file mode 100644 (file)
index 7ed2e19..0000000
+++ /dev/null
@@ -1,843 +0,0 @@
-## Begin Server manifest
-
-if $server_values == undef {
-  $server_values = hiera('server', false)
-}
-
-# Ensure the time is accurate, reducing the possibilities of apt repositories
-# failing for invalid certificates
-include '::ntp'
-
-Exec { path => [ '/bin/', '/sbin/', '/usr/bin/', '/usr/sbin/' ] }
-File { owner => 0, group => 0, mode => 0644 }
-
-group { 'puppet': ensure => present }
-group { 'www-data': ensure => present }
-
-user { $::ssh_username:
-  shell  => '/bin/bash',
-  home   => "/home/${::ssh_username}",
-  ensure => present
-}
-
-user { ['apache', 'nginx', 'httpd', 'www-data']:
-  shell  => '/bin/bash',
-  ensure => present,
-  groups => 'www-data',
-  require => Group['www-data']
-}
-
-file { "/home/${::ssh_username}":
-    ensure => directory,
-    owner  => $::ssh_username,
-}
-
-# copy dot files to ssh user's home directory
-exec { 'dotfiles':
-  cwd     => "/home/${::ssh_username}",
-  command => "cp -r /vagrant/puphpet/files/dot/.[a-zA-Z0-9]* /home/${::ssh_username}/ \
-              && chown -R ${::ssh_username} /home/${::ssh_username}/.[a-zA-Z0-9]* \
-              && cp -r /vagrant/puphpet/files/dot/.[a-zA-Z0-9]* /root/",
-  onlyif  => 'test -d /vagrant/puphpet/files/dot',
-  returns => [0, 1],
-  require => User[$::ssh_username]
-}
-
-case $::osfamily {
-  # debian, ubuntu
-  'debian': {
-    class { 'apt': }
-
-    Class['::apt::update'] -> Package <|
-        title != 'python-software-properties'
-    and title != 'software-properties-common'
-    |>
-
-    ensure_packages( ['augeas-tools'] )
-  }
-  # redhat, centos
-  'redhat': {
-    class { 'yum': extrarepo => ['epel'] }
-
-    class { 'yum::repo::rpmforge': }
-    class { 'yum::repo::repoforgeextras': }
-
-    Class['::yum'] -> Yum::Managed_yumrepo <| |> -> Package <| |>
-
-    if defined(Package['git']) == false {
-      package { 'git':
-        ensure  => latest,
-        require => Class['yum::repo::repoforgeextras']
-      }
-    }
-
-    exec { 'bash_git':
-      cwd     => "/home/${::ssh_username}",
-      command => "curl https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh > /home/${::ssh_username}/.bash_git",
-      creates => "/home/${::ssh_username}/.bash_git"
-    }
-
-    exec { 'bash_git for root':
-      cwd     => '/root',
-      command => "cp /home/${::ssh_username}/.bash_git /root/.bash_git",
-      creates => '/root/.bash_git',
-      require => Exec['bash_git']
-    }
-
-    file_line { 'link ~/.bash_git':
-      ensure  => present,
-      line    => 'if [ -f ~/.bash_git ] ; then source ~/.bash_git; fi',
-      path    => "/home/${::ssh_username}/.bash_profile",
-      require => [
-        Exec['dotfiles'],
-        Exec['bash_git'],
-      ]
-    }
-
-    file_line { 'link ~/.bash_git for root':
-      ensure  => present,
-      line    => 'if [ -f ~/.bash_git ] ; then source ~/.bash_git; fi',
-      path    => '/root/.bashrc',
-      require => [
-        Exec['dotfiles'],
-        Exec['bash_git'],
-      ]
-    }
-
-    file_line { 'link ~/.bash_aliases':
-      ensure  => present,
-      line    => 'if [ -f ~/.bash_aliases ] ; then source ~/.bash_aliases; fi',
-      path    => "/home/${::ssh_username}/.bash_profile",
-      require => File_line['link ~/.bash_git']
-    }
-
-    file_line { 'link ~/.bash_aliases for root':
-      ensure  => present,
-      line    => 'if [ -f ~/.bash_aliases ] ; then source ~/.bash_aliases; fi',
-      path    => '/root/.bashrc',
-      require => File_line['link ~/.bash_git for root']
-    }
-
-    ensure_packages( ['augeas'] )
-  }
-}
-
-if $php_values == undef {
-  $php_values = hiera('php', false)
-}
-
-case $::operatingsystem {
-  'debian': {
-    include apt::backports
-
-    add_dotdeb { 'packages.dotdeb.org': release => $lsbdistcodename }
-
-    if is_hash($php_values) {
-      # Debian Squeeze 6.0 can do PHP 5.3 (default) and 5.4
-      if $lsbdistcodename == 'squeeze' and $php_values['version'] == '54' {
-        add_dotdeb { 'packages.dotdeb.org-php54': release => 'squeeze-php54' }
-      }
-      # Debian Wheezy 7.0 can do PHP 5.4 (default) and 5.5
-      elsif $lsbdistcodename == 'wheezy' and $php_values['version'] == '55' {
-        add_dotdeb { 'packages.dotdeb.org-php55': release => 'wheezy-php55' }
-      }
-    }
-
-    $server_lsbdistcodename = downcase($lsbdistcodename)
-
-    apt::force { 'git':
-      release => "${server_lsbdistcodename}-backports",
-      timeout => 60
-    }
-  }
-  'ubuntu': {
-    apt::key { '4F4EA0AAE5267A6C':
-      key_server => 'hkp://keyserver.ubuntu.com:80'
-    }
-    apt::key { '4CBEDD5A':
-      key_server => 'hkp://keyserver.ubuntu.com:80'
-    }
-
-    apt::ppa { 'ppa:pdoes/ppa': require => Apt::Key['4CBEDD5A'] }
-
-    if is_hash($php_values) {
-      # Ubuntu Lucid 10.04, Precise 12.04, Quantal 12.10 and Raring 13.04 can do PHP 5.3 (default <= 12.10) and 5.4 (default <= 13.04)
-      if $lsbdistcodename in ['lucid', 'precise', 'quantal', 'raring'] and $php_values['version'] == '54' {
-        if $lsbdistcodename == 'lucid' {
-          apt::ppa { 'ppa:ondrej/php5-oldstable': require => Apt::Key['4F4EA0AAE5267A6C'], options => '' }
-        } else {
-          apt::ppa { 'ppa:ondrej/php5-oldstable': require => Apt::Key['4F4EA0AAE5267A6C'] }
-        }
-      }
-      # Ubuntu Precise 12.04, Quantal 12.10 and Raring 13.04 can do PHP 5.5
-      elsif $lsbdistcodename in ['precise', 'quantal', 'raring'] and $php_values['version'] == '55' {
-        apt::ppa { 'ppa:ondrej/php5': require => Apt::Key['4F4EA0AAE5267A6C'] }
-      }
-      elsif $lsbdistcodename in ['lucid'] and $php_values['version'] == '55' {
-        err('You have chosen to install PHP 5.5 on Ubuntu 10.04 Lucid. This will probably not work!')
-      }
-    }
-  }
-  'redhat', 'centos': {
-    if is_hash($php_values) {
-      if $php_values['version'] == '54' {
-        class { 'yum::repo::remi': }
-      }
-      # remi_php55 requires the remi repo as well
-      elsif $php_values['version'] == '55' {
-        class { 'yum::repo::remi': }
-        class { 'yum::repo::remi_php55': }
-      }
-    }
-  }
-}
-
-if !empty($server_values['packages']) {
-  ensure_packages( $server_values['packages'] )
-}
-
-define add_dotdeb ($release){
-   apt::source { $name:
-    location          => 'http://packages.dotdeb.org',
-    release           => $release,
-    repos             => 'all',
-    required_packages => 'debian-keyring debian-archive-keyring',
-    key               => '89DF5277',
-    key_server        => 'keys.gnupg.net',
-    include_src       => true
-  }
-}
-
-## Begin Apache manifest
-
-if $yaml_values == undef {
-  $yaml_values = loadyaml('/vagrant/puphpet/config.yaml')
-}
-
-if $apache_values == undef {
-  $apache_values = $yaml_values['apache']
-}
-
-include puphpet::params
-
-$webroot_location = $puphpet::params::apache_webroot_location
-
-exec { "exec mkdir -p ${webroot_location}":
-  command => "mkdir -p ${webroot_location}",
-  creates => $webroot_location,
-}
-
-if ! defined(File[$webroot_location]) {
-  file { $webroot_location:
-    ensure  => directory,
-    group   => 'www-data',
-    mode    => 0775,
-    require => [
-      Exec["exec mkdir -p ${webroot_location}"],
-      Group['www-data']
-    ]
-  }
-}
-
-class { 'apache':
-  user          => $apache_values['user'],
-  group         => $apache_values['group'],
-  default_vhost => $apache_values['default_vhost'],
-  mpm_module    => $apache_values['mpm_module'],
-  manage_user   => false,
-  manage_group  => false
-}
-
-if $::osfamily == 'debian' {
-  case $apache_values['mpm_module'] {
-    'prefork': { ensure_packages( ['apache2-mpm-prefork'] ) }
-    'worker':  { ensure_packages( ['apache2-mpm-worker'] ) }
-    'event':   { ensure_packages( ['apache2-mpm-event'] ) }
-  }
-} elsif $::osfamily == 'redhat' and ! defined(Iptables::Allow['tcp/80']) {
-  iptables::allow { 'tcp/80':
-    port     => '80',
-    protocol => 'tcp'
-  }
-}
-
-if has_key($apache_values, 'mod_pagespeed') and $apache_values['mod_pagespeed'] == 1 {
-  class { 'puphpet::apache::modpagespeed': }
-}
-
-if has_key($apache_values, 'mod_spdy') and $apache_values['mod_spdy'] == 1 {
-  class { 'puphpet::apache::modspdy': }
-}
-
-create_resources(apache::vhost, $apache_values['vhosts'])
-
-define apache_mod {
-  if ! defined(Class["apache::mod::${name}"]) {
-    class { "apache::mod::${name}": }
-  }
-}
-
-if count($apache_values['modules']) > 0 {
-  apache_mod { $apache_values['modules']: }
-}
-
-## Begin PHP manifest
-
-if $php_values == undef {
-  $php_values = hiera('php', false)
-}
-
-if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-}
-
-if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-}
-
-Class['Php'] -> Class['Php::Devel'] -> Php::Module <| |> -> Php::Pear::Module <| |> -> Php::Pecl::Module <| |>
-
-if $php_prefix == undef {
-  $php_prefix = $::operatingsystem ? {
-    /(?i:Ubuntu|Debian|Mint|SLES|OpenSuSE)/ => 'php5-',
-    default                                 => 'php-',
-  }
-}
-
-if $php_fpm_ini == undef {
-  $php_fpm_ini = $::operatingsystem ? {
-    /(?i:Ubuntu|Debian|Mint|SLES|OpenSuSE)/ => '/etc/php5/fpm/php.ini',
-    default                                 => '/etc/php.ini',
-  }
-}
-
-if is_hash($apache_values) {
-  include apache::params
-
-  if has_key($apache_values, 'mod_spdy') and $apache_values['mod_spdy'] == 1 {
-    $php_webserver_service_ini = 'cgi'
-  } else {
-    $php_webserver_service_ini = 'httpd'
-  }
-
-  $php_webserver_service = 'httpd'
-  $php_webserver_user    = $apache::params::user
-  $php_webserver_restart = true
-
-  class { 'php':
-    service => $php_webserver_service
-  }
-} elsif is_hash($nginx_values) {
-  include nginx::params
-
-  $php_webserver_service     = "${php_prefix}fpm"
-  $php_webserver_service_ini = $php_webserver_service
-  $php_webserver_user        = $nginx::params::nx_daemon_user
-  $php_webserver_restart     = true
-
-  class { 'php':
-    package             => $php_webserver_service,
-    service             => $php_webserver_service,
-    service_autorestart => false,
-    config_file         => $php_fpm_ini,
-  }
-
-  service { $php_webserver_service:
-    ensure     => running,
-    enable     => true,
-    hasrestart => true,
-    hasstatus  => true,
-    require    => Package[$php_webserver_service]
-  }
-} else {
-  $php_webserver_service     = undef
-  $php_webserver_service_ini = undef
-  $php_webserver_restart     = false
-
-  class { 'php':
-    package             => "${php_prefix}cli",
-    service             => $php_webserver_service,
-    service_autorestart => false,
-  }
-}
-
-class { 'php::devel': }
-
-if count($php_values['modules']['php']) > 0 {
-  php_mod { $php_values['modules']['php']:; }
-}
-if count($php_values['modules']['pear']) > 0 {
-  php_pear_mod { $php_values['modules']['pear']:; }
-}
-if count($php_values['modules']['pecl']) > 0 {
-  php_pecl_mod { $php_values['modules']['pecl']:; }
-}
-if count($php_values['ini']) > 0 {
-  each( $php_values['ini'] ) |$key, $value| {
-    if is_array($value) {
-      each( $php_values['ini'][$key] ) |$innerkey, $innervalue| {
-        puphpet::ini { "${key}_${innerkey}":
-          entry       => "CUSTOM_${innerkey}/${key}",
-          value       => $innervalue,
-          php_version => $php_values['version'],
-          webserver   => $php_webserver_service_ini
-        }
-      }
-    } else {
-      puphpet::ini { $key:
-        entry       => "CUSTOM/${key}",
-        value       => $value,
-        php_version => $php_values['version'],
-        webserver   => $php_webserver_service_ini
-      }
-    }
-  }
-
-  if $php_values['ini']['session.save_path'] != undef {
-    exec {"mkdir -p ${php_values['ini']['session.save_path']}":
-      onlyif  => "test ! -d ${php_values['ini']['session.save_path']}",
-    }
-
-    file { $php_values['ini']['session.save_path']:
-      ensure  => directory,
-      group   => 'www-data',
-      mode    => 0775,
-      require => Exec["mkdir -p ${php_values['ini']['session.save_path']}"]
-    }
-  }
-}
-
-puphpet::ini { $key:
-  entry       => 'CUSTOM/date.timezone',
-  value       => $php_values['timezone'],
-  php_version => $php_values['version'],
-  webserver   => $php_webserver_service_ini
-}
-
-define php_mod {
-  php::module { $name:
-    service_autorestart => $php_webserver_restart,
-  }
-}
-define php_pear_mod {
-  php::pear::module { $name:
-    use_package         => false,
-    service_autorestart => $php_webserver_restart,
-  }
-}
-define php_pecl_mod {
-  php::pecl::module { $name:
-    use_package         => false,
-    service_autorestart => $php_webserver_restart,
-  }
-}
-
-if $php_values['composer'] == 1 {
-  class { 'composer':
-    target_dir      => '/usr/local/bin',
-    composer_file   => 'composer',
-    download_method => 'curl',
-    logoutput       => false,
-    tmp_path        => '/tmp',
-    php_package     => "${php::params::module_prefix}cli",
-    curl_package    => 'curl',
-    suhosin_enabled => false,
-  }
-}
-
-## Begin Xdebug manifest
-
-if $xdebug_values == undef {
-  $xdebug_values = hiera('xdebug', false)
-}
-
-if is_hash($apache_values) {
-  $xdebug_webserver_service = 'httpd'
-} elsif is_hash($nginx_values) {
-  $xdebug_webserver_service = 'nginx'
-} else {
-  $xdebug_webserver_service = undef
-}
-
-if $xdebug_values['install'] != undef and $xdebug_values['install'] == 1 {
-  class { 'puphpet::xdebug':
-    webserver => $xdebug_webserver_service
-  }
-
-  if is_hash($xdebug_values['settings']) and count($xdebug_values['settings']) > 0 {
-    each( $xdebug_values['settings'] ) |$key, $value| {
-      puphpet::ini { $key:
-        entry       => "XDEBUG/${key}",
-        value       => $value,
-        php_version => $php_values['version'],
-        webserver   => $xdebug_webserver_service
-      }
-    }
-  }
-}
-
-## Begin Xhprof manifest
-
-if $xhprof_values == undef {
-  $xhprof_values = hiera('xhprof', false)
-}
-
-if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-}
-
-if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-}
-
-if is_hash($apache_values) or is_hash($nginx_values) {
-  $xhprof_webserver_restart = true
-} else  {
-  $xhprof_webserver_restart = false
-}
-
-if is_hash($xhprof_values) and $xhprof_values['install'] == 1 {
-  if $::operatingsystem == 'ubuntu' {
-    apt::key { '8D0DC64F':
-      key_server => 'hkp://keyserver.ubuntu.com:80'
-    }
-
-    apt::ppa { 'ppa:brianmercer/php5-xhprof': require => Apt::Key['8D0DC64F'] }
-  }
-
-  $xhprof_package = $puphpet::params::xhprof_package
-
-  if is_hash($apache_values) {
-    $xhprof_webroot_location = $puphpet::params::apache_webroot_location
-    $xhprof_webserver_service = Service['httpd']
-  } elsif is_hash($nginx_values) {
-    $xhprof_webroot_location = $puphpet::params::nginx_webroot_location
-    $xhprof_webserver_service = Service['nginx']
-  } else {
-    $xhprof_webroot_location = $xhprof_values['location']
-    $xhprof_webserver_service = undef
-  }
-
-  if defined(Package[$xhprof_package]) == false {
-    package { $xhprof_package:
-      ensure  => installed,
-      require => Package['php'],
-      notify  => $xhprof_webserver_service,
-    }
-  }
-
-  ensure_packages( ['graphviz'] )
-
-  exec { 'delete-xhprof-path-if-not-git-repo':
-    command => "rm -rf ${xhprofPath}",
-    onlyif  => "test ! -d ${xhprofPath}/.git"
-  }
-
-  vcsrepo { "${xhprof_webroot_location}/xhprof":
-    ensure   => present,
-    provider => git,
-    source   => 'https://github.com/facebook/xhprof.git',
-    require  => Exec['delete-xhprof-path-if-not-git-repo']
-  }
-
-  file { "${xhprofPath}/xhprof_html":
-    ensure  => directory,
-    mode    => 0775,
-    require => Vcsrepo["${xhprof_webroot_location}/xhprof"]
-  }
-
-  composer::exec { 'xhprof-composer-run':
-    cmd     => 'install',
-    cwd     => "${xhprof_webroot_location}/xhprof",
-    require => [
-      Class['composer'],
-      File["${xhprofPath}/xhprof_html"]
-    ]
-  }
-}
-
-## Begin Drush manifest
-
-if $drush_values == undef {
-  $drush_values = hiera('drush', false)
-}
-
-if $drush_values['install'] != undef and $drush_values['install'] == 1 {
-  if ($drush_values['settings']['drush.tag_branch'] != undef) {
-    $drush_tag_branch = $drush_values['settings']['drush.tag_branch']
-  } else {
-    $drush_tag_branch = ''
-  }
-
-  ## @see https://drupal.org/node/2165015
-  include drush::git::drush
-
-  ## class { 'drush::git::drush':
-  ##   git_branch => $drush_tag_branch,
-  ##   update     => true,
-  ## }
-}
-
-## End Drush manifest
-
-## Begin MySQL manifest
-
-if $mysql_values == undef {
-  $mysql_values = hiera('mysql', false)
-}
-
-if $php_values == undef {
-  $php_values = hiera('php', false)
-}
-
-if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-}
-
-if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-}
-
-if is_hash($apache_values) or is_hash($nginx_values) {
-  $mysql_webserver_restart = true
-} else {
-  $mysql_webserver_restart = false
-}
-
-if $mysql_values['root_password'] {
-  class { 'mysql::server':
-    root_password => $mysql_values['root_password'],
-  }
-
-  if is_hash($mysql_values['databases']) and count($mysql_values['databases']) > 0 {
-    create_resources(mysql_db, $mysql_values['databases'])
-  }
-
-  if is_hash($php_values) {
-    if $::osfamily == 'redhat' and $php_values['version'] == '53' and ! defined(Php::Module['mysql']) {
-      php::module { 'mysql':
-        service_autorestart => $mysql_webserver_restart,
-      }
-    } elsif ! defined(Php::Module['mysqlnd']) {
-      php::module { 'mysqlnd':
-        service_autorestart => $mysql_webserver_restart,
-      }
-    }
-  }
-}
-
-define mysql_db (
-  $user,
-  $password,
-  $host,
-  $grant    = [],
-  $sql_file = false
-) {
-  if $name == '' or $password == '' or $host == '' {
-    fail( 'MySQL DB requires that name, password and host be set. Please check your settings!' )
-  }
-
-  mysql::db { $name:
-    user     => $user,
-    password => $password,
-    host     => $host,
-    grant    => $grant,
-    sql      => $sql_file,
-  }
-}
-
-if has_key($mysql_values, 'phpmyadmin') and $mysql_values['phpmyadmin'] == 1 and is_hash($php_values) {
-  if $::osfamily == 'debian' {
-    if $::operatingsystem == 'ubuntu' {
-      apt::key { '80E7349A06ED541C': }
-      apt::ppa { 'ppa:nijel/phpmyadmin': require => Apt::Key['80E7349A06ED541C'] }
-    }
-
-    $phpMyAdmin_package = 'phpmyadmin'
-    $phpMyAdmin_folder = 'phpmyadmin'
-  } elsif $::osfamily == 'redhat' {
-    $phpMyAdmin_package = 'phpMyAdmin.noarch'
-    $phpMyAdmin_folder = 'phpMyAdmin'
-  }
-
-  if ! defined(Package[$phpMyAdmin_package]) {
-    package { $phpMyAdmin_package:
-      require => Class['mysql::server']
-    }
-  }
-
-  include puphpet::params
-
-  if is_hash($apache_values) {
-    $mysql_pma_webroot_location = $puphpet::params::apache_webroot_location
-  } elsif is_hash($nginx_values) {
-    $mysql_pma_webroot_location = $puphpet::params::nginx_webroot_location
-
-    mysql_nginx_default_conf { 'override_default_conf':
-      webroot => $mysql_pma_webroot_location
-    }
-  }
-
-  exec { 'move phpmyadmin to webroot':
-    command => "mv /usr/share/${phpMyAdmin_folder} ${mysql_pma_webroot_location}/phpmyadmin",
-    onlyif  => "test ! -d ${mysql_pma_webroot_location}/phpmyadmin",
-    require => [
-      Package[$phpMyAdmin_package],
-      File[$mysql_pma_webroot_location]
-    ]
-  }
-
-  file { "/usr/share/${phpMyAdmin_folder}":
-    target  => "${mysql_pma_webroot_location}/phpmyadmin",
-    ensure  => link,
-    replace => 'no',
-    require => Exec['move phpmyadmin to webroot']
-  }
-}
-
-if has_key($mysql_values, 'adminer') and $mysql_values['adminer'] == 1 and is_hash($php_values) {
-  if is_hash($apache_values) {
-    $mysql_adminer_webroot_location = $puphpet::params::apache_webroot_location
-  } elsif is_hash($nginx_values) {
-    $mysql_adminer_webroot_location = $puphpet::params::nginx_webroot_location
-  } else {
-    $mysql_adminer_webroot_location = $puphpet::params::apache_webroot_location
-  }
-
-  class { 'puphpet::adminer':
-    location => "${mysql_adminer_webroot_location}/adminer",
-    owner    => 'www-data'
-  }
-}
-
-define mysql_nginx_default_conf (
-  $webroot
-) {
-  if $php5_fpm_sock == undef {
-    $php5_fpm_sock = '/var/run/php5-fpm.sock'
-  }
-
-  if $fastcgi_pass == undef {
-    $fastcgi_pass = $php_values['version'] ? {
-      undef   => null,
-      '53'    => '127.0.0.1:9000',
-      default => "unix:${php5_fpm_sock}"
-    }
-  }
-
-  class { 'puphpet::nginx':
-    fastcgi_pass => $fastcgi_pass,
-    notify       => Class['nginx::service'],
-  }
-}
-
-# Begin beanstalkd
-
-if $beanstalkd_values == undef {
-  $beanstalkd_values = hiera('beanstalkd', false)
-}
-
-if has_key($beanstalkd_values, 'install') and $beanstalkd_values['install'] == 1 {
-  beanstalkd::config { $beanstalkd_values: }
-}
-
-# tine20 manifest
-
-# /www/tine.vagrant logs userdata files htdocs
-file { ["/www", "/www/tine.vagrant", "/www/tine.vagrant/conf"]:
-    ensure => directory,
-    owner  => $::ssh_username,
-    mode    => 0775,
-}
-
-file { ["/www/tine.vagrant/logs", "/www/tine.vagrant/cache", "/www/tine.vagrant/files", "/www/tine.vagrant/temp"]:
-    ensure => directory,
-    owner  => 'www-data',
-    mode    => 0775,
-}
-
-file { "/www/tine.vagrant/htdocs":
-    ensure => 'link',
-    target => '/usr/local/share/tine20.git/tine20',
-}
-
-
-# vhost config with logs rewrites config
-
-if $tine20_values == undef {
-  $tine20_values = loadyaml('/vagrant/puphpet/tine20.yaml')
-}
-
-mysql::db { $tine20_values['database']['name']:
-    user     => $tine20_values['database']['user'],
-    password => $tine20_values['database']['password'],
-    host     => $tine20_values['database']['host'],
-    grant    => ['ALL'],
-#    sql      => $sql_file,
-}
-  
-file { "config.inc.php":
-  path    => "/www/tine.vagrant/conf/config.inc.php",
-  ensure  => present,
-  owner   => 'root',
-  group   => 'root',
-  mode    => '0644',
-  content => "<?php return array(
-    'database' => array(
-        'host'          => '${tine20_values['database']['host']}',
-        'dbname'        => '${tine20_values['database']['name']}',
-        'username'      => '${tine20_values['database']['user']}',
-        'password'      => '${tine20_values['database']['password']}',
-        'adapter'       => 'pdo_mysql',
-        'tableprefix'   => 'tine20_',
-    ),
-    'setupuser' => array(
-        'username'      => '${tine20_values['setupuser']['user']}',
-        'password'      => '${tine20_values['setupuser']['password']}' 
-    ),
-    
-    'caching' => array (
-        'active' => true,
-        'path' => '/www/tine.vagrant/cache',
-        'lifetime' => 3600,
-    ),
-    
-    'logger' => array (
-        'active' => true,
-        'filename' => '/www/tine.vagrant/logs/tine20.log',
-        'priority' => '7',
-    ),
-  );"
-}
-
-# coposer install
-composer::exec { 'tine20-composer-run':
-  cmd     => 'install',
-  cwd     => '/usr/local/share/tine20.git/tine20/',
-  dev     => true,
-  prefer_source => true
-}
-# phing install
-file { "install.properties":
-  path    => "/www/tine.vagrant/conf/install.properties",
-  ensure  => present,
-  owner   => 'root',
-  group   => 'root',
-  mode    => '0644',
-  content => "adminLoginName=${tine20_values['initialuser']['user']}
-adminPassword=${tine20_values['initialuser']['password']}
-adminEmailAddress=${tine20_values['initialuser']['email']}
-#authentication=
-#accounts=
-#imap=
-#smtp="
-}
-
-exec { 'phing-tine-install':
-  cwd     => "/usr/local/share/tine20.git/tine20/",
-  command => "sudo sudo -u www-data /usr/local/share/tine20.git/tine20/vendor/bin/phing -D configdir=/www/tine.vagrant/conf/ tine-install",
-  require => [
-    File['/www/tine.vagrant/conf/install.properties']
-  ]
-}
diff --git a/scripts/vagrant/puphpet/shell/execute-files.sh b/scripts/vagrant/puphpet/shell/execute-files.sh
deleted file mode 100644 (file)
index 2e4baae..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-
-VAGRANT_CORE_FOLDER=$(cat "/.puphpet-stuff/vagrant-core-folder.txt")
-
-shopt -s nullglob
-files=("${VAGRANT_CORE_FOLDER}"/files/exec-once/*)
-
-if [[ ! -f /.puphpet-stuff/exec-once-ran && (${#files[@]} -gt 0) ]]; then
-    echo 'Running files in files/exec-once'
-    find "${VAGRANT_CORE_FOLDER}/files/exec-once" -maxdepth 1 -type f \( ! -iname ".gitignore" \) -exec chmod +x '{}' \; -exec {} \;
-    echo 'Finished running files in files/exec-once'
-    echo 'To run again, delete file /.puphpet-stuff/exec-once-ran'
-    touch /.puphpet-stuff/exec-once-ran
-fi
-
-echo 'Running files in files/exec-always'
-find "${VAGRANT_CORE_FOLDER}/files/exec-always" -maxdepth 1 -type f \( ! -iname ".gitignore" \) -exec chmod +x '{}' \; -exec {} \;
-echo 'Finished running files in files/exec-always'
diff --git a/scripts/vagrant/puphpet/shell/initial-setup.sh b/scripts/vagrant/puphpet/shell/initial-setup.sh
deleted file mode 100644 (file)
index 6482104..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-
-VAGRANT_CORE_FOLDER="/vagrant/puphpet"
-
-OS=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" ID)
-CODENAME=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" CODENAME)
-
-if [[ ! -d /.puphpet-stuff ]]; then
-    mkdir /.puphpet-stuff
-
-    echo "${VAGRANT_CORE_FOLDER}" > "/.puphpet-stuff/vagrant-core-folder.txt"
-
-    cat "${VAGRANT_CORE_FOLDER}/shell/self-promotion.txt"
-    echo "Created directory /.puphpet-stuff"
-fi
-
-if [[ ! -f /.puphpet-stuff/initial-setup-repo-update ]]; then
-    if [ "${OS}" == 'debian' ] || [ "${OS}" == 'ubuntu' ]; then
-        echo "Running initial-setup apt-get update"
-        apt-get update >/dev/null
-        touch /.puphpet-stuff/initial-setup-repo-update
-        echo "Finished running initial-setup apt-get update"
-    elif [[ "${OS}" == 'centos' ]]; then
-        echo "Running initial-setup yum update"
-        yum update -y >/dev/null
-        echo "Finished running initial-setup yum update"
-
-        echo "Installing basic development tools (CentOS)"
-        yum -y groupinstall "Development Tools" >/dev/null
-        echo "Finished installing basic development tools (CentOS)"
-        touch /.puphpet-stuff/initial-setup-repo-update
-    fi
-fi
-
-if [[ "${OS}" == 'ubuntu' && ("${CODENAME}" == 'lucid' || "${CODENAME}" == 'precise') && ! -f /.puphpet-stuff/ubuntu-required-libraries ]]; then
-    echo 'Installing basic curl packages (Ubuntu only)'
-    apt-get install -y libcurl3 libcurl4-gnutls-dev >/dev/null
-    echo 'Finished installing basic curl packages (Ubuntu only)'
-
-    touch /.puphpet-stuff/ubuntu-required-libraries
-fi
diff --git a/scripts/vagrant/puphpet/shell/librarian-puppet-vagrant.sh b/scripts/vagrant/puphpet/shell/librarian-puppet-vagrant.sh
deleted file mode 100644 (file)
index 39c67fd..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/bin/bash
-
-VAGRANT_CORE_FOLDER=$(cat "/.puphpet-stuff/vagrant-core-folder.txt")
-
-OS=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" ID)
-CODENAME=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" CODENAME)
-
-# Directory in which librarian-puppet should manage its modules directory
-PUPPET_DIR=/etc/puppet/
-
-$(which git > /dev/null 2>&1)
-FOUND_GIT=$?
-
-if [ "${FOUND_GIT}" -ne '0' ] && [ ! -f /.puphpet-stuff/librarian-puppet-installed ]; then
-    $(which apt-get > /dev/null 2>&1)
-    FOUND_APT=$?
-    $(which yum > /dev/null 2>&1)
-    FOUND_YUM=$?
-
-    echo 'Installing git'
-
-    if [ "${FOUND_YUM}" -eq '0' ]; then
-        yum -q -y makecache
-        yum -q -y install git
-    else
-        apt-get -q -y install git-core >/dev/null
-    fi
-
-    echo 'Finished installing git'
-fi
-
-if [[ ! -d "${PUPPET_DIR}" ]]; then
-    mkdir -p "${PUPPET_DIR}"
-    echo "Created directory ${PUPPET_DIR}"
-fi
-
-cp "${VAGRANT_CORE_FOLDER}/puppet/Puppetfile" "${PUPPET_DIR}"
-echo "Copied Puppetfile"
-
-if [ "${OS}" == 'debian' ] || [ "${OS}" == 'ubuntu' ]; then
-    if [[ ! -f /.puphpet-stuff/librarian-base-packages ]]; then
-        echo 'Installing base packages for librarian'
-        apt-get install -y build-essential ruby-dev >/dev/null
-        echo 'Finished installing base packages for librarian'
-
-        touch /.puphpet-stuff/librarian-base-packages
-    fi
-fi
-
-if [ "${OS}" == 'ubuntu' ]; then
-    if [[ ! -f /.puphpet-stuff/librarian-libgemplugin-ruby ]]; then
-        echo 'Updating libgemplugin-ruby (Ubuntu only)'
-        apt-get install -y libgemplugin-ruby >/dev/null
-        echo 'Finished updating libgemplugin-ruby (Ubuntu only)'
-
-        touch /.puphpet-stuff/librarian-libgemplugin-ruby
-    fi
-
-    if [ "${CODENAME}" == 'lucid' ] && [ ! -f /.puphpet-stuff/librarian-rubygems-update ]; then
-        echo 'Updating rubygems (Ubuntu Lucid only)'
-        echo 'Ignore all "conflicting chdir" errors!'
-        gem install rubygems-update >/dev/null
-        /var/lib/gems/1.8/bin/update_rubygems >/dev/null
-        echo 'Finished updating rubygems (Ubuntu Lucid only)'
-
-        touch /.puphpet-stuff/librarian-rubygems-update
-    fi
-fi
-
-if [[ ! -f /.puphpet-stuff/librarian-puppet-installed ]]; then
-    echo 'Installing librarian-puppet'
-    gem install librarian-puppet >/dev/null
-    echo 'Finished installing librarian-puppet'
-
-    echo 'Running initial librarian-puppet'
-    cd "${PUPPET_DIR}" && librarian-puppet install --clean >/dev/null
-    echo 'Finished running initial librarian-puppet'
-
-    touch /.puphpet-stuff/librarian-puppet-installed
-else
-    echo 'Running update librarian-puppet'
-    cd "${PUPPET_DIR}" && librarian-puppet update >/dev/null
-    echo 'Finished running update librarian-puppet'
-fi
-
-if [[ "${OS}" == 'centos' ]]; then
-    echo "Replacing puppetlabs-git module with custom"
-    rm -rf /etc/puppet/modules/git
-    git clone https://github.com/puphpet/puppetlabs-git.git /etc/puppet/modules/git
-    echo "Finished replacing puppetlabs-git module with custom"
-fi
diff --git a/scripts/vagrant/puphpet/shell/os-detect.sh b/scripts/vagrant/puphpet/shell/os-detect.sh
deleted file mode 100644 (file)
index a521f44..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-# Try and get debian operating system
-# id, codename, and release
-
-TYPE=$(echo "$1" | tr '[A-Z]' '[a-z]')
-OS=$(uname)
-ID="unknown"
-CODENAME="unknown"
-RELEASE="unknown"
-
-if [ "${OS}" == "Linux" ]; then
-    # detect centos
-    grep "centos" /etc/issue -i -q
-    if [ $? = '0' ]; then
-        ID="centos"
-        RELEASE=$(cat /etc/redhat-release | grep -o 'release [0-9]' | cut -d " " -f2)
-    # could be debian or ubuntu
-    elif [ $(which lsb_release) ]; then
-        ID=$(lsb_release -i | cut -f2)
-        CODENAME=$(lsb_release -c | cut -f2)
-        RELEASE=$(lsb_release -r | cut -f2)
-    elif [ -f "/etc/lsb-release" ]; then
-        ID=$(cat /etc/lsb-release | grep DISTRIB_ID | cut -d "=" -f2)
-        CODENAME=$(cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -d "=" -f2)
-        RELEASE=$(cat /etc/lsb-release | grep DISTRIB_RELEASE | cut -d "=" -f2)
-    elif [ -f "/etc/issue" ]; then
-        ID=$(head -1 /etc/issue | cut -d " " -f1)
-        if [ -f "/etc/debian_version" ]; then
-          RELEASE=$(</etc/debian_version)
-        else
-          RELEASE=$(head -1 /etc/issue | cut -d " " -f2)
-        fi
-    fi
-fi
-
-declare -A info
-
-info[id]=$(echo "${ID}" | tr '[A-Z]' '[a-z]')
-info[codename]=$(echo "${CODENAME}" | tr '[A-Z]' '[a-z]')
-info[release]=$(echo "${RELEASE}" | tr '[A-Z]' '[a-z]')
-
-if [ "$TYPE" ] ; then 
-    echo "${info[${TYPE}]}"
-else 
-    echo -e "ID\t${info[id]}"
-    echo -e "CODENAME\t${info[codename]}"
-    echo -e "RELEASE\t${info[release]}"
-fi
diff --git a/scripts/vagrant/puphpet/shell/self-promotion.txt b/scripts/vagrant/puphpet/shell/self-promotion.txt
deleted file mode 100644 (file)
index f474331..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-
- ____        ____  _   _ ____      _      generated using
-|  _ \ _   _|  _ \| | | |  _ \ ___| |_   ___ ___  _ __ ___
-| |_) | | | | |_) | |_| | |_) / _ \ __| / __/ _ \| '_ ` _ \
-|  __/| |_| |  __/|  _  |  __/  __/ |_ | (_| (_) | | | | | |
-|_|    \__,_|_|   |_| |_|_|   \___|\__(_)___\___/|_| |_| |_|
-
diff --git a/scripts/vagrant/puphpet/shell/update-puppet.sh b/scripts/vagrant/puphpet/shell/update-puppet.sh
deleted file mode 100644 (file)
index 55201a1..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-
-VAGRANT_CORE_FOLDER=$(cat "/.puphpet-stuff/vagrant-core-folder.txt")
-
-OS=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" ID)
-RELEASE=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" RELEASE)
-CODENAME=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" CODENAME)
-
-if [[ ! -f /.puphpet-stuff/update-puppet ]]; then
-    if [ "${OS}" == 'debian' ] || [ "${OS}" == 'ubuntu' ]; then
-        echo "Downloading http://apt.puppetlabs.com/puppetlabs-release-${CODENAME}.deb"
-        wget --quiet --tries=5 --timeout=10 -O "/.puphpet-stuff/puppetlabs-release-${CODENAME}.deb" "http://apt.puppetlabs.com/puppetlabs-release-${CODENAME}.deb"
-        echo "Finished downloading http://apt.puppetlabs.com/puppetlabs-release-${CODENAME}.deb"
-
-        dpkg -i "/.puphpet-stuff/puppetlabs-release-${CODENAME}.deb" >/dev/null
-
-        echo "Running update-puppet apt-get update"
-        apt-get update >/dev/null
-        echo "Finished running update-puppet apt-get update"
-
-        echo "Updating Puppet to latest version"
-        apt-get -y install puppet >/dev/null
-        PUPPET_VERSION=$(puppet help | grep 'Puppet v')
-        echo "Finished updating puppet to latest version: ${PUPPET_VERSION}"
-
-        touch /.puphpet-stuff/update-puppet
-        echo "Created empty file /.puphpet-stuff/update-puppet"
-    elif [ "${OS}" == 'centos' ]; then
-        echo "Downloading http://yum.puppetlabs.com/el/${RELEASE}/products/x86_64/puppetlabs-release-6-7.noarch.rpm"
-        yum -y --nogpgcheck install "http://yum.puppetlabs.com/el/${RELEASE}/products/x86_64/puppetlabs-release-6-7.noarch.rpm" >/dev/null
-        echo "Finished downloading http://yum.puppetlabs.com/el/${RELEASE}/products/x86_64/puppetlabs-release-6-7.noarch.rpm"
-
-        echo "Running update-puppet yum update"
-        yum -y update >/dev/null
-        echo "Finished running update-puppet yum update"
-
-        echo "Installing/Updating Puppet to latest version"
-        yum -y install puppet >/dev/null
-        PUPPET_VERSION=$(puppet help | grep 'Puppet v')
-        echo "Finished installing/updating puppet to latest version: ${PUPPET_VERSION}"
-
-        touch /.puphpet-stuff/update-puppet
-        echo "Created empty file /.puphpet-stuff/update-puppet"
-    fi
-fi
diff --git a/scripts/vagrant/puphpet/tine20.yaml b/scripts/vagrant/puphpet/tine20.yaml
deleted file mode 100644 (file)
index 7a23d9b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
----
-database:
-    name: tine20
-    host: localhost
-    user: tine20
-    password: pass
-setupuser:
-    user: tine20admin
-    password: lars
-initialuser:
-    user: tine20admin
-    password: lars
-    email: admin@eample.org
\ No newline at end of file
diff --git a/scripts/vagrant/setup-tine20.sh b/scripts/vagrant/setup-tine20.sh
new file mode 100755 (executable)
index 0000000..5f51ea4
--- /dev/null
@@ -0,0 +1,101 @@
+# Tine 2.0 Vhost
+tine20_vhost="
+<VirtualHost *:80>\n
+    DocumentRoot   \"/vagrant/tine20.git/tine20/\"\n
+    ServerName      tine20.vagrant\n
+    ServerAlias     www.tine20.vagrant\n
+    \n
+    # Active Sync\n
+    RewriteEngine on\n
+    RewriteRule ^/Microsoft-Server-ActiveSync /index.php?frontend=activesync [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]\n
+    \n
+    # WebDAV / CardDAV / CalDAV API\n
+    RewriteCond %{REQUEST_METHOD} !^(GET|POST)$\n
+    RewriteRule ^/$            /index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]\n
+    \n
+    RewriteRule ^/addressbooks /index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]\n
+    RewriteRule ^/calendars    /index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]\n
+    RewriteRule ^/principals   /index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]\n
+    RewriteRule ^/webdav       /index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]\n
+    RewriteRule ^/remote.php   /index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]\n
+    \n
+    php_value include_path "/vagrant/conf:/vagrant/tine20.git/tine20/"\n
+    \n
+    ErrorLog "/vagrant/logs/error_log"\n
+    CustomLog "/vagrant/logs/access_log" common\n
+    \n
+</VirtualHost>\n"
+
+echo -e $tine20_vhost > /etc/apache2/sites-available/tine20-vagrant
+
+service apache2 restart
+
+# Add database for tine20
+mysql -u root -p"vagrant" -e "CREATE DATABASE tine20;"
+
+# Enable tine20-vagrant for apache
+a2ensite tine20-vagrant
+
+# update dependencies
+cd /vagrant/tine20.git/tine20
+composer install --dev --prefer-source --no-interaction
+
+# setup directories
+mkdir -p /vagrant/logs /vagrant/conf /vagrant/cache /vagrant/files /vagrant/tmp
+chown www-data /vagrant/logs /vagrant/conf /vagrant/cache /vagrant/files /vagrant/tmp
+
+# generate config.inc.php
+tine20_config="
+<?php return array(\n
+    'database' => array(\n
+        'host'          => 'localhost',\n
+        'dbname'        => 'tine20',\n
+        'username'      => 'root',\n
+        'password'      => 'vagrant',\n
+        'adapter'       => 'pdo_mysql',\n
+        'tableprefix'   => 'tine20_',\n
+    ),
+    'setupuser' => array(\n
+        'username'      => 'vagrant',\n
+        'password'      => 'vagrant'\n 
+    ),\n
+   'login' => array(\n
+       'username'      => 'vagrant',\n
+       'password'      => 'vagrant'\n
+    ),\n
+    \n
+    'caching' => array (\n
+        'active' => true,\n
+        'path' => '/vagrant/cache',\n
+        'lifetime' => 3600,\n
+    ),\n
+    \n
+    'logger' => array (\n
+        'active' => true,\n
+        'filename' => '/vagrant/logs/tine20.log',\n
+        'priority' => '7',\n
+    ),\n
+    'filesdir'  => '/vagrant/files',\n
+    'tmpdir' => '/vargrant/tmp',\n
+  );\n"
+
+if [ ! -f /vagrant/conf/config.inc.php ]; then
+  echo -e $tine20_config > /vagrant/conf/config.inc.php
+fi
+
+# generate install.properties
+tine20_installprops="
+adminLoginName=vagrant\n
+adminPassword=vagrant\n
+adminEmailAddress=vagrant@tine20.vagrant\n
+#authentication=\n
+#accounts=\n
+#imap=\n
+#smtp=\n"
+
+if [ ! -f /vagrant/conf/install.properties ]; then
+  echo -e $tine20_installprops > /vagrant/conf/install.properties
+fi
+
+cd /vagrant/tine20.git/tine20
+/vagrant/tine20.git/tine20/vendor/bin/phing -D configdir=/vagrant/conf/ tine-install