Skip to content

Added ssh2 extension #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 98 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
02f4193
Sandbox autoconf213 to prevent conflicts
mattheath Apr 16, 2014
00b9e63
Set pecl to be the default on darwin
mattheath Jul 9, 2014
dc1c5b7
Merge pull request #36 from boxen/fix-sandboxing
mattheath Jul 10, 2014
97d572b
[BUGFIX] pm.max_children too small for some (XHR-heavy) projects
Jul 30, 2014
4b0ed43
Merge pull request #47 from castiron/gb/max-children
mattheath Aug 2, 2014
16d0af4
Merge pull request #45 from boxen/fixproviders
mattheath Aug 2, 2014
f4e1eb5
Use autoconfig213 from module resources
webflo Sep 18, 2014
720498e
Added ssh2 extension
typhonius Oct 16, 2014
e627227
Merge pull request #49 from webflo/patch-2
mattheath Oct 26, 2014
43cbfb4
Merge pull request #51 from typhonius/master
mattheath Oct 26, 2014
1ea201d
Remove autoconf213 sandboxing which breaks new installs
mattheath Nov 5, 2014
cc0940b
Create 5_5_18.pp
Nov 7, 2014
cdc180f
Create 5_5_18.pp
Nov 7, 2014
f37fd57
Create php_5_5_18_spec.rb
Nov 7, 2014
e0eb7b4
Create php_fpm_5_5_18_spec.rb
Nov 7, 2014
df11db8
Allow configure params on PHP builds.
Nov 7, 2014
1c26c20
Merge pull request #52 from boxen/fixautoconf
mattheath Nov 7, 2014
fca0cfb
Move config to Hiera, allow additional configure flags per PHP versio…
Nov 8, 2014
c317530
Make config the reciever of config vars from Hiera.
Nov 10, 2014
cbd9e6b
Add validate_hash back into config class.
Nov 10, 2014
fdf813e
Fully revert init PHP class.
Nov 10, 2014
f236664
Tidy up instructions in PThreads extension.
Nov 10, 2014
d459d4d
Update cardboard to 2.1.0, switch out deprecated specs causing errors…
Nov 10, 2014
d4382ff
Fix error in php 5.5 manifst
Nov 10, 2014
78b1437
Add better version checking to php source compilation. Remove libeven…
Nov 10, 2014
e4458b8
Add PHP 5.6.X and specs, also add spec for pthreads extension.
Nov 10, 2014
5fd2557
Put Version class into it's own file.
Nov 10, 2014
3ff4ebd
Use Gem::Version
Nov 10, 2014
4700a98
Merge pull request #1 from boxen/master
Nov 27, 2014
345c549
boxen::config is included in php::config
Nov 27, 2014
3d04ed0
Update to newer spec methods.
Nov 27, 2014
4a914e2
Add newer versions of PHP and notify when user installs insecure vers…
Nov 27, 2014
aff395c
Warn when PHP version is insecure
Dec 8, 2014
2880d6d
Create stats.pp
Sep 5, 2014
5096899
Add spec for stats extension
Dec 22, 2014
3d383e0
Add PHP 5.4.36, 5.5.20, 5.6.4
Dec 23, 2014
e8cf857
Merge branch 'master' of github.com:sambauers/puppet-php
Dec 23, 2014
4a77b09
Merge pull request #48 from farnoux/master
mattheath Dec 23, 2014
6639ee1
Pull in updates from 'mattheath/master'
mattheath Jan 6, 2015
19744e1
Create 5_5_18.pp
Nov 7, 2014
e551f92
Create 5_5_18.pp
Nov 7, 2014
f3b56f3
Create php_5_5_18_spec.rb
Nov 7, 2014
0870c22
Create php_fpm_5_5_18_spec.rb
Nov 7, 2014
b737a4f
Allow configure params on PHP builds.
Nov 7, 2014
4147bb5
Move config to Hiera, allow additional configure flags per PHP versio…
Nov 8, 2014
ebf0bec
Make config the reciever of config vars from Hiera.
Nov 10, 2014
e2c9c43
Add validate_hash back into config class.
Nov 10, 2014
16ba028
Fully revert init PHP class.
Nov 10, 2014
f59ec6c
Tidy up instructions in PThreads extension.
Nov 10, 2014
7e3bac4
Update cardboard to 2.1.0, switch out deprecated specs causing errors…
Nov 10, 2014
9edb58f
Fix error in php 5.5 manifst
Nov 10, 2014
f596ceb
Add better version checking to php source compilation. Remove libeven…
Nov 10, 2014
229a547
Add PHP 5.6.X and specs, also add spec for pthreads extension.
Nov 10, 2014
42e4680
Put Version class into it's own file.
Nov 10, 2014
4567a8f
Use Gem::Version
Nov 10, 2014
aa22d1a
boxen::config is included in php::config
Nov 27, 2014
73b4035
Update to newer spec methods.
Nov 27, 2014
e85ef2c
Add newer versions of PHP and notify when user installs insecure vers…
Nov 27, 2014
f14565b
Warn when PHP version is insecure
Dec 8, 2014
c1c75fd
Add PHP 5.4.36, 5.5.20, 5.6.4
Dec 23, 2014
1b268ca
Merge branch 'master' of github.com:sambauers/puppet-php
Jan 8, 2015
5e07387
Fix tests for stats extension.
Jan 8, 2015
84612e7
Make Composer version and checksum configurable. Bump to 1.0.0-alpha9…
Jan 8, 2015
584d6f2
Move phpenv revision to Hiera config.
Jan 8, 2015
476a6b4
Merge pull request #56 from sambauers/master
mattheath Jan 12, 2015
3b1f7a4
Dry up PHP require actions into a custom Puppet function.
Jan 13, 2015
7bc8c52
Move to ensure_resource instead of include.
Jan 13, 2015
43c1477
Remove PHP and PHP::FPM static classes.
Jan 13, 2015
ff55f33
Patch version, not minor version.
Jan 13, 2015
5de6327
Add secure version support to PHP::FPM
Jan 13, 2015
1839f54
Bump secure version of 5.6 to 5.6.5
Jan 23, 2015
9f38acc
Merge pull request #57 from sambauers/master
mattheath Jan 23, 2015
3c203d4
Update CHANGELOG, bump secure PHP versions.
Jan 26, 2015
e05ad11
Add toggle to PHP insecure version warnings, add upgrade instructions
Jan 27, 2015
823afb9
Update test hiera config
Jan 27, 2015
1c2ed61
Bump safe PHP versions.
Feb 20, 2015
f6a8d6e
Bump secure PHP versions
Mar 21, 2015
a071083
Bump secure PHP version numbers.
Apr 22, 2015
f779b85
Merge pull request #58 from sambauers/master
mattheath Apr 22, 2015
cc5a2fe
Merge pull request #61 from boxen/v2
mattheath Apr 27, 2015
fce9859
Bump PHP secure versions,
May 15, 2015
a092b88
Bump PHP secure versions in tests,
May 15, 2015
39c5db6
Updating composer to alpha10
May 29, 2015
34a4077
Merge pull request #73 from namesco/update-composer
mattheath May 30, 2015
43b91d3
Added tests for the pspell extension
alexmace May 27, 2015
55d79ea
A manifest for pspell that passes the tests
alexmace May 27, 2015
dedd6a3
Added aspell as a dependency, because it is needed
May 29, 2015
907a86f
Merge pull request #72 from namesco/add-pspell-extension
mattheath May 31, 2015
36d3212
Bump PHP secure versions,
May 15, 2015
6c6b307
Bump PHP secure versions in tests,
May 15, 2015
4fe2a53
Merge branch 'master' of github.com:sambauers/puppet-php
Jun 4, 2015
5d32a85
Properly ensure PHP is present with php_require
Jun 4, 2015
ef429db
Update Changelog to add 2.0.1 release note
Jun 4, 2015
7a423c9
More info for changelog
Jun 4, 2015
cedd6ad
Merge pull request #69 from sambauers/master
mattheath Jun 4, 2015
3f34227
Fix the usage of libssh2 in ssh2 extension
rolfvandekrol Aug 11, 2015
0c66e4c
Update spec
rolfvandekrol Aug 12, 2015
79c4233
Merge pull request #80 from rolfvandekrol/feature/ssh2
mattheath Aug 12, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
73 changes: 73 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,76 @@
## 2.0.1 ##

* Composer updated to 1.0.0-alpha10 (@alexmace)
* Add pspell extension (@alexmace)
* Fix bug in `php_require` and `php_fpm_require` functions (@sambauers)

## 2.0.0 ##

* Use Hiera for configs
* Allow configure params on PHP builds
* Add PThreads extension
* Update cardboard to 2.1.0 and update tests
* Add support for PHP 5.6+
* Add insecure PHP version warnings
* Make Composer version configurable
* Remove version specific PHP classes allowing arbitrary PHP versions

## 1.2.6 ##

* Fix autoconf 2.13 sandboxing

## 1.2.5 ##

* Sandbox autoconf213 to fix some installation conflicts
* Set the PECL provider to default on darwin for PHP extensions (this can be overridden)
* Increase `pm.max_children` to 10 for PHP-FPM pools (@gblair)

## 1.2.4 ##

* Fixes compilation of PHP versions > 5.4.17 due to a break in Bison compatibility (@webflo!)

## 1.2.3 ##

* Add xhprof extension (@webflo)
* Add latest versions of PHP 5.4 and 5.5 (@webflo)

## 1.2.2 ##

* Change default .ini settings to increase timeouts, memory limits etc.

## 1.2.1 ##

* Bump Composer to latest 1.0.0-alpha8 (@webbj74)

## 1.2.0 ##

* Adds PHP 5.5 support! This requires a later version of Bison to compile, which is installed as a sandboxed package.
* Adds additional minor versions of PHP for 5.3 and 5.4
* Use ensure_packages from the stdlib to improve module compatibility (thanks @jameydeorio)
* Fixes specs, and added Github API token to travis so builds actually work again

## 1.1.5 ##

* Add OAuth extension (@dbtlr)
* Fix HTTP extension bug including zookeeper (@dbtlr)
* Add Mongo extension (@eebs)
* Fix compilation bug caused by Freetype and GD incompatibilities (@eebs!)

## 1.1.4 ##

* Add memcache PHP extension (@poppen)
* Add pdo_pgsql PHP extension (@poppen)

## 1.1.3 ##

* Added support for Composer see the readme for usage.
* Module now has test specs (hooray!), please run script/cibuild before making a pull request.
* Fixes to bugs the specs caught

## 1.1.2 ##

* Increase xdebug `max_nesting_level`

## 1.1.1 ##

* Remove `libpng` package, add dependency on `libpng` module
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source "https://rubygems.org"

gem "cardboard", "~> 1.0"
gem "cardboard", "~> 2.1"
111 changes: 58 additions & 53 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,75 +1,80 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.3.5)
CFPropertyList (2.2.8)
addressable (2.3.6)
ansi (1.4.3)
boxen (1.5.2)
boxen (2.7.0)
ansi (~> 1.4)
hiera (~> 1.0)
highline (~> 1.6)
json_pure (>= 1.7.7, < 2.0)
librarian-puppet (~> 0.9.9)
octokit (~> 1.15)
puppet (~> 3.0)
cardboard (1.0.4)
boxen (~> 1.0)
librarian-puppet (~> 1.0.0)
octokit (~> 2.7, >= 2.7.1)
puppet (~> 3.7)
cardboard (2.1.0)
boxen (~> 2.1)
puppet-lint (~> 0.3)
puppetlabs_spec_helper (~> 0.4)
rspec-puppet (~> 0.1)
diff-lcs (1.2.4)
facter (1.7.2)
faraday (0.8.8)
multipart-post (~> 1.2.0)
faraday_middleware (0.9.0)
faraday (>= 0.7.4, < 0.9)
hashie (2.0.5)
hiera (1.2.1)
rspec-puppet (~> 1.0)
diff-lcs (1.2.5)
facter (2.3.0)
CFPropertyList (~> 2.2.6)
faraday (0.9.0)
multipart-post (>= 1.2, < 3)
hiera (1.3.4)
json_pure
highline (1.6.19)
json (1.8.0)
json_pure (1.8.0)
librarian-puppet (0.9.10)
json
highline (1.6.21)
json (1.8.1)
json_pure (1.8.1)
librarian (0.1.2)
highline
thor (~> 0.15)
metaclass (0.0.1)
mocha (0.14.0)
librarian-puppet (1.0.9)
json
librarian (>= 0.1.2)
metaclass (0.0.4)
mocha (1.1.0)
metaclass (~> 0.0.1)
multi_json (1.7.9)
multipart-post (1.2.0)
netrc (0.7.7)
octokit (1.25.0)
addressable (~> 2.2)
faraday (~> 0.8)
faraday_middleware (~> 0.9)
hashie (~> 2.0)
multi_json (~> 1.3)
netrc (~> 0.7.7)
puppet (3.2.4)
facter (~> 1.6)
multipart-post (2.0.0)
octokit (2.7.2)
sawyer (~> 0.5.2)
puppet (3.7.3)
facter (> 1.6, < 3)
hiera (~> 1.0)
rgen (~> 0.6.5)
json_pure
puppet-lint (0.3.2)
puppetlabs_spec_helper (0.4.1)
mocha (>= 0.10.5)
puppet-syntax (1.3.0)
rake
rspec (>= 2.9.0)
rspec-puppet (>= 0.1.1)
rake (10.1.0)
rgen (0.6.5)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.5)
rspec-expectations (2.14.2)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.3)
rspec-puppet (0.1.6)
puppetlabs_spec_helper (0.8.2)
mocha
puppet-lint
puppet-syntax
rake
rspec
rspec-puppet
rake (10.3.2)
rspec (3.1.0)
rspec-core (~> 3.1.0)
rspec-expectations (~> 3.1.0)
rspec-mocks (~> 3.1.0)
rspec-core (3.1.7)
rspec-support (~> 3.1.0)
rspec-expectations (3.1.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.1.0)
rspec-mocks (3.1.3)
rspec-support (~> 3.1.0)
rspec-puppet (1.0.1)
rspec
thor (0.18.1)
rspec-support (3.1.2)
sawyer (0.5.5)
addressable (~> 2.3.5)
faraday (~> 0.8, < 0.10)
thor (0.19.1)

PLATFORMS
ruby

DEPENDENCIES
cardboard (~> 1.0)
cardboard (~> 2.1)
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ The following boxen modules are required if optional PHP extensions are used:

```puppet
# Install php 5.4
include php::5_4
php::version { '5.4': }

# Install a couple of specific minor versions
include php::5_3_17
include php::5_4_11
php::version { '5.3.17': }
php::version { '5.4.11': }

# Install Composer globally on your PATH
include php::composer
Expand All @@ -52,11 +52,11 @@ php::extension::apc { "apc for ${version}":
}

# Set up PHP-FPM as a service running a specific version of PHP
include php::fpm::5_3_15
php::fpm { '5.3.15': }

# Run multiple PHP-FPM services
include php::fpm::5_4_11
include php::fpm::5_3_23
php::fpm { '5.4.11': }
php::fpm { '5.3.23': }

# Spin up a PHP-FPM pool for a project
# Ensures:
Expand All @@ -79,7 +79,7 @@ A sample PHP project manifest is provided in `manifests/project.pp` which will r

A simple project manifest example:

````puppet
```puppet
# your-boxen/modules/projects/manifests/trollin.pp

class projects::trollin {
Expand All @@ -93,10 +93,20 @@ class projects::trollin {
php => '5.3.23',
}
}
````
```

With the above, as long as our app is configured to listen to requests at `www/index.php` we can visit [http://trollin.dev/](http://trollin.dev/) to access the app.

In the background this is installing PHP 5.3.23, creating a PHP-FPM service for 5.3.23, and a FPM pool for this project which runs within the FPM service. This then listens on an nginx socket at "#{ENV['BOXEN_SOCKET_DIR']}"/trollin.

The example nginx host template at `templates/nginx/nginx.conf.erb` is also a sample configuration which can be copied to your main boxen module and the nginx template path above altered to match this. This is set up with a basic PHP structure, and Fastcgi params to pass the expected variables from Nginx to PHP-FPM.

## Upgrading to version 2.X.X from version 1.X.X

The old PHP version classes are removed completely in version 2.

You will need to change any code in your manifests like `include PHP::5_X_X` to the version 2 equivalent `php::version { 5.X.X: }`

All other classes remain unchanged in syntax, and should "just work".

This module will now warn you if you are running an insecure version of PHP when you run Boxen.
19 changes: 19 additions & 0 deletions data/common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
php::config::root: "%{::boxen::config::home}/phpenv"
php::config::logdir: "%{::boxen::config::logdir}/php"
php::config::configdir: "%{::boxen::config::configdir}/php"
php::config::datadir: "%{::boxen::config::datadir}/php"
php::config::pluginsdir: "%{php::config::root}/plugins"
php::config::cachedir: "%{php::config::datadir}/cache"
php::config::extensioncachedir: "%{php::config::datadir}/cache/extensions"
php::config::configure_params: {}
php::config::composer:
version: '1.0.0-alpha10'
checksum: 'dea8681b6f54dca9bb3a5b7deb179cca'
php::config::phpenv:
revision: '6499bb6c7b645af3f4e67f7e17708d5ee208453f'
php::config::secure_versions:
'5.6': '5.6.9'
'5.5': '5.5.25'
'5.4': '5.4.41'
php::config::secure_warning: true
3 changes: 3 additions & 0 deletions data/hiera.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
:hierarchy:
- common
4 changes: 2 additions & 2 deletions files/brews/autoconf213.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def install
"--disable-dependency-tracking",
"--program-suffix=213",
"--prefix=#{prefix}",
"--infodir=#{info}",
"--infodir=#{info}/autoconf213",
"--datadir=#{share}/autoconf213"
system "make install"
end
end
end
6 changes: 6 additions & 0 deletions lib/puppet/parser/functions/php_fpm_require.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module Puppet::Parser::Functions
newfunction(:php_fpm_require) do |args|
Puppet::Parser::Functions.function('ensure_resource')
function_ensure_resource( [ 'php::fpm', args[0], {'ensure' => 'present'} ] )
end
end
6 changes: 6 additions & 0 deletions lib/puppet/parser/functions/php_require.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module Puppet::Parser::Functions
newfunction(:php_require) do |args|
Puppet::Parser::Functions.function('ensure_resource')
function_ensure_resource( [ 'php::version', args[0], {'ensure' => 'present'} ] )
end
end
2 changes: 1 addition & 1 deletion lib/puppet/provider/php_extension/pecl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
include Puppet::Util::Execution
desc "Provides PHP extensions compiled from their pecl source code"

defaultfor :source => :pecl
defaultfor :operatingsystem => :darwin

# Build and install our PHP extension
def create
Expand Down
13 changes: 11 additions & 2 deletions lib/puppet/provider/php_version/php_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ def get_configure_args(version, install_path, config_path)
"--with-zlib=#{@resource[:homebrew_path]}/opt/zlibphp",
"--with-snmp=/usr",
"--with-libedit",
"--with-libevent-dir=#{@resource[:homebrew_path]}/opt/libevent",
"--with-mhash",
"--with-curl",
"--with-openssl=/usr",
Expand All @@ -267,7 +266,17 @@ def get_configure_args(version, install_path, config_path)
]

# PHP-FPM isn't available until 5.3.3
args << "--enable-fpm" unless @resource[:version].match(/\A5\.3\.[12]\z/)
if Gem::Version.new(@resource[:version]) > Gem::Version.new('5.3.2')
args << "--enable-fpm"
end

# libevent was removed in 5.3.8
if Gem::Version.new(@resource[:version]) < Gem::Version.new('5.3.8')
args << "--with-libevent-dir=#{@resource[:homebrew_path]}/opt/libevent"
end

# User specified configure params
args << @resource[:configure_params]

args
end
Expand Down
4 changes: 0 additions & 4 deletions lib/puppet/type/php_extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@
defaultto ''
end

newparam(:source) do
defaultto :pecl
end

# Some PECL modules have a different module layout and the php extension
# source in not in the root directory (e.g. xhprof)
newparam(:extension_dir) do
Expand Down
4 changes: 4 additions & 0 deletions lib/puppet/type/php_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,8 @@

newparam(:user_home) do
end

newparam(:configure_params) do
defaultto ''
end
end
16 changes: 0 additions & 16 deletions manifests/5_3.pp

This file was deleted.

Loading