From 4a11293ac57a253b7ba568d5e5c6ae2859394926 Mon Sep 17 00:00:00 2001 From: Nick Schuch Date: Sat, 31 May 2014 19:46:24 +1000 Subject: [PATCH] Composer, bundler, drush for site install and file permissions fix. --- .gitignore | 2 + README.md | 34 +- Vagrantfile | 19 +- build.xml | 112 ++- composer.json | 26 +- composer.lock | 894 +++----------------- puppet/Gemfile | 4 + puppet/Gemfile.lock | 31 + puppet/Puppetfile | 2 +- puppet/Puppetfile.lock | 6 +- puppet/custom/drupal/manifests/webserver.pp | 23 +- puppet/modules/README.md | 1 + puppet/provision.sh | 46 +- 13 files changed, 299 insertions(+), 901 deletions(-) create mode 100644 puppet/Gemfile create mode 100644 puppet/Gemfile.lock create mode 100644 puppet/modules/README.md diff --git a/.gitignore b/.gitignore index 5f62321c5d..8092e5292a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .vagrant +.bundle puppet/modules/* !puppet/modules/README.md puppet/.librarian @@ -6,3 +7,4 @@ puppet/.tmp app patches vendor +bin diff --git a/README.md b/README.md index 19855af783..f78a8e9434 100644 --- a/README.md +++ b/README.md @@ -10,15 +10,15 @@ The VD8 project has been created to make sure developers have an easy method for * Phing targets. * Custom packer image to shorten provision time. -## Install +## Requirements -### Virtualbox +### Virtualbox (4.3.6) Virtualbox can be downloaded and installed from: https://www.virtualbox.org/wiki/Downloads -### Vagrant +### Vagrant (1.3 to 1.5) Vagrant can be downloaded and installed from: @@ -30,6 +30,12 @@ This also required the autonetwork plugin which can be installed by: vagrant plugin install vagrant-auto_network ``` +#### Plugins + +These are software versions we know work: + +* Vagrant Auto-network: 0.2.1 + #### Usage The machine can can be booted by the following command: @@ -38,7 +44,8 @@ The machine can can be booted by the following command: vagrant up ``` -The host will be provisioned with the Puppet manifest by running the following command: +The host will be provisioned automatically on the first `vagrant up`. If you +wish to rerun the provision that can be done with the following command: ``` vagrant provision @@ -50,11 +57,7 @@ http://docs.vagrantup.com/v2 ## Local DNS -There are many options but the easiest method is to add the following line to your /etc/hosts (or Windows equilent): - -``` -127.0.0.1 d8.dev -``` +WE REQUIRE THE "Vagrant Auto-network" PLUGIN AS MENTIONED ABOVE. ## Drupal @@ -70,14 +73,5 @@ To install phing reinstall ``` -Now (in your browser) go to the below URL and install Drupal 8: - -http://d8.dev:8080/core/install.php - -## Versions - -These are software versions we know work: - -* Vagrant: 1.3.5 -* Vagrant Auto-network: 0.2.1 -* Virtualbox: 4.3.6 +The above command can be run as many times as you like. It provides a good +workflow for developing and testing. diff --git a/Vagrantfile b/Vagrantfile index eb01ceef79..a705518cc0 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -16,7 +16,10 @@ ram = '1024' # assigning roles. # eg. "drupal" => "true" could setup a Drupal site. facts = { - "fqdn" => hostname + '.' + domain, + 'fqdn' => hostname + '.' + domain, + # We set these so we can marry up permissions. + 'vagrant_uid' => Process.uid, + 'vagrant_group' => 'dialout' } ## @@ -28,8 +31,12 @@ Vagrant.configure("2") do |config| config.vm.hostname = hostname + '.' + domain config.vm.box_url = url - # Network configured as per bit.ly/1e0ZU1r - config.vm.network :private_network, :ip => "0.0.0.0", :auto_network => true + if Vagrant.has_plugin?('vagrant-auto_network') + # Network configured as per bit.ly/1e0ZU1r + config.vm.network :private_network, :ip => "0.0.0.0", :auto_network => true + else + config.vm.network :private_network, :ip => "192.168.50.10" + end # We want to cater for both Unix and Windows. if RUBY_PLATFORM =~ /linux|darwin/ @@ -59,4 +66,10 @@ Vagrant.configure("2") do |config| # Provisioners. config.vm.provision :shell, :path => "puppet/provision.sh" + config.vm.provision :puppet do |puppet| + puppet.facter = facts + puppet.manifests_path = "puppet" + puppet.manifest_file = "site.pp" + puppet.module_path = "puppet/modules" + end end diff --git a/build.xml b/build.xml index 1da1cf5489..c1ba5729ca 100644 --- a/build.xml +++ b/build.xml @@ -1,71 +1,107 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + - + - - - + + + + + - - - - + - + - - + + - + - + + + + + + + + + + + + + + + + + diff --git a/composer.json b/composer.json index f9d6fe9359..07fa12e1f2 100644 --- a/composer.json +++ b/composer.json @@ -1,25 +1,9 @@ { - "repositories": [ - { - "type":"package", - "package": { - "name": "nickschuch/drupal-install", - "version":"master", - "source": { - "url": "git@github.com:nickschuch/phing-drupal-install.git", - "type": "git", - "reference":"0.0.1" - } - } - } - ], "require": { - "guzzle/http": "3.7.*", - "guzzle/plugin-cookie": "3.7.*", - "zendframework/zend-feed": "2.2.*", - "behat/mink": "1.4@stable", - "behat/mink-goutte-driver": "*", - "nickschuch/drupal-install": "master" + "drush/drush": "dev-master" }, - "minimum-stability": "dev" + "minimum-stability": "dev", + "config": { + "bin-dir": "bin/" + } } diff --git a/composer.lock b/composer.lock index 7f8aa283c5..56903f90ab 100644 --- a/composer.lock +++ b/composer.lock @@ -3,759 +3,187 @@ "This file locks the dependencies of your project to a known state", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" ], - "hash": "0e1f474072b521af792b7e613d242481", + "hash": "dc0ab8552eccc33d1f1d63c977ab0d9f", "packages": [ { - "name": "behat/mink", - "version": "v1.4.0", + "name": "d11wtq/boris", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/Behat/Mink.git", - "reference": "93006b8d30cd6646f76d2ad993c2a3310a54fc61" + "url": "https://github.com/d11wtq/boris.git", + "reference": "295dbe28ee184cc4ed95fbddf6d7d19065bd08cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/Mink/zipball/93006b8d30cd6646f76d2ad993c2a3310a54fc61", - "reference": "93006b8d30cd6646f76d2ad993c2a3310a54fc61", + "url": "https://api.github.com/repos/d11wtq/boris/zipball/295dbe28ee184cc4ed95fbddf6d7d19065bd08cd", + "reference": "295dbe28ee184cc4ed95fbddf6d7d19065bd08cd", "shasum": "" }, "require": { - "php": ">=5.3.1", - "symfony/css-selector": ">=2.0.0,<2.2.0-dev" - }, - "require-dev": { - "behat/mink-goutte-driver": "*", - "behat/mink-sahi-driver": "*", - "behat/mink-selenium-driver": "*", - "behat/mink-selenium2-driver": "*", - "behat/mink-zombie-driver": "*", - "symfony/finder": ">=2.0.0,<2.2.0-dev" + "php": ">=5.3.0" }, "suggest": { - "behat/mink-goutte-driver": "to enable Goutte support", - "behat/mink-sahi-driver": "to enable Sahi.JS support", - "behat/mink-selenium-driver": "to enable Selenium1 support", - "behat/mink-selenium2-driver": "to enable Selenium2 (webdriver support)", - "behat/mink-zombie-driver": "to enable Zombie.js support" - }, - "type": "library", - "autoload": { - "psr-0": { - "Behat\\Mink": "src/" - } + "ext-pcntl": "Optional Process Control extension depencency", + "ext-posix": "Optional POSIX extension", + "ext-readline": "Optional readline extension depencency" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - } + "bin": [ + "bin/boris" ], - "description": "Web acceptance testing framework for PHP 5.3", - "homepage": "http://mink.behat.org/", - "keywords": [ - "browser", - "testing", - "web" - ], - "time": "2012-05-29 22:50:10" - }, - { - "name": "behat/mink-browserkit-driver", - "version": "v1.0.3", - "source": { - "type": "git", - "url": "https://github.com/Behat/MinkBrowserKitDriver.git", - "reference": "c7fb1aea2fabac08f95296e03b8018e84b0b5dd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Behat/MinkBrowserKitDriver/zipball/c7fb1aea2fabac08f95296e03b8018e84b0b5dd2", - "reference": "c7fb1aea2fabac08f95296e03b8018e84b0b5dd2", - "shasum": "" - }, - "require": { - "behat/mink": ">=1.4,<1.5-dev", - "php": ">=5.3.1", - "symfony/browser-kit": ">=2.0,<2.4-dev", - "symfony/dom-crawler": ">=2.0,<2.4-dev" - }, - "require-dev": { - "silex/silex": "@dev" - }, - "type": "mink-driver", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Behat\\Mink\\Driver": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - } - ], - "description": "Symfony2 BrowserKit driver for Mink framework", - "homepage": "http://mink.behat.org/", - "keywords": [ - "Mink", - "Symfony2", - "browser", - "testing" - ], - "time": "2013-03-02 16:08:39" - }, - { - "name": "behat/mink-goutte-driver", - "version": "v1.0.6", - "source": { - "type": "git", - "url": "https://github.com/Behat/MinkGoutteDriver.git", - "reference": "f0a850b9b4e123896a5878b1ed360b40c2c4a768" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Behat/MinkGoutteDriver/zipball/f0a850b9b4e123896a5878b1ed360b40c2c4a768", - "reference": "f0a850b9b4e123896a5878b1ed360b40c2c4a768", - "shasum": "" - }, - "require": { - "behat/mink": ">=1.4,<1.5.0-dev", - "behat/mink-browserkit-driver": "1.0.*", - "fabpot/goutte": "1.0.*@dev", - "php": ">=5.3.1", - "symfony/browser-kit": ">=2.1,<2.4-dev", - "symfony/css-selector": ">=2.1,<2.4-dev", - "symfony/dom-crawler": ">=2.1,<2.4-dev", - "symfony/finder": ">=2.1,<2.4-dev", - "symfony/process": ">=2.1,<2.4-dev" - }, - "type": "mink-driver", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, + "type": "library", "autoload": { "psr-0": { - "Behat\\Mink\\Driver": "src/" + "Boris": "lib" } }, "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - } - ], - "description": "Goutte driver for Mink framework", - "homepage": "http://mink.behat.org/", - "keywords": [ - "browser", - "goutte", - "headless", - "testing" - ], - "time": "2013-03-02 16:09:32" + "time": "2014-04-16 03:31:11" }, { - "name": "fabpot/goutte", + "name": "drush/drush", "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/fabpot/Goutte.git", - "reference": "a30e84e28fbaf14909d2d007249c24cd0ecd425e" + "url": "https://github.com/drush-ops/drush.git", + "reference": "7f30942356c6b8e7bed6d683c8ef551a7295e287" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fabpot/Goutte/zipball/a30e84e28fbaf14909d2d007249c24cd0ecd425e", - "reference": "a30e84e28fbaf14909d2d007249c24cd0ecd425e", + "url": "https://api.github.com/repos/drush-ops/drush/zipball/7f30942356c6b8e7bed6d683c8ef551a7295e287", + "reference": "7f30942356c6b8e7bed6d683c8ef551a7295e287", "shasum": "" }, "require": { - "ext-curl": "*", - "guzzle/http": "~3.1", + "d11wtq/boris": "*", + "pear/console_table": "1.1.5", "php": ">=5.3.0", - "symfony/browser-kit": "~2.1", - "symfony/css-selector": "~2.1", - "symfony/dom-crawler": "~2.1", - "symfony/finder": "~2.1", - "symfony/process": "~2.1" + "symfony/yaml": "2.2.1" }, "require-dev": { - "guzzle/plugin-history": "~3.1", - "guzzle/plugin-mock": "~3.1" - }, - "type": "application", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Goutte": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "A simple PHP Web Scraper", - "homepage": "https://github.com/fabpot/Goutte", - "keywords": [ - "scraper" - ], - "time": "2014-01-31 18:02:50" - }, - { - "name": "guzzle/common", - "version": "dev-master", - "target-dir": "Guzzle/Common", - "source": { - "type": "git", - "url": "https://github.com/guzzle/common.git", - "reference": "67f6c3fd04bae387d47c2a673fa623ed8f4189bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/common/zipball/67f6c3fd04bae387d47c2a673fa623ed8f4189bb", - "reference": "67f6c3fd04bae387d47c2a673fa623ed8f4189bb", - "shasum": "" - }, - "require": { - "php": ">=5.3.2", - "symfony/event-dispatcher": ">=2.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - }, - "autoload": { - "psr-0": { - "Guzzle\\Common": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Common libraries used by Guzzle", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "collection", - "common", - "event", - "exception" - ], - "time": "2014-01-28 22:29:15" - }, - { - "name": "guzzle/http", - "version": "dev-master", - "target-dir": "Guzzle/Http", - "source": { - "type": "git", - "url": "https://github.com/guzzle/http.git", - "reference": "565fd64be16d91c840f497c5de76f86d54a822d8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/http/zipball/565fd64be16d91c840f497c5de76f86d54a822d8", - "reference": "565fd64be16d91c840f497c5de76f86d54a822d8", - "shasum": "" - }, - "require": { - "guzzle/common": "self.version", - "guzzle/parser": "self.version", - "guzzle/stream": "self.version", - "php": ">=5.3.2" + "phpunit/phpunit": ">=3.5" }, "suggest": { - "ext-curl": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - }, - "autoload": { - "psr-0": { - "Guzzle\\Http": "" - } + "youngj/httpserver": "dev-master#41dd2b7 as 1.0.1" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" + "bin": [ + "drush", + "drush.php", + "drush.bat", + "drush.complete.sh" ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "HTTP libraries used by Guzzle", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "Guzzle", - "client", - "curl", - "http", - "http client" - ], - "time": "2014-01-23 18:23:29" - }, - { - "name": "guzzle/parser", - "version": "dev-master", - "target-dir": "Guzzle/Parser", - "source": { - "type": "git", - "url": "https://github.com/guzzle/parser.git", - "reference": "3f52387052f2e4ef083145a0f73c3654aa14e086" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/parser/zipball/3f52387052f2e4ef083145a0f73c3654aa14e086", - "reference": "3f52387052f2e4ef083145a0f73c3654aa14e086", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - }, "autoload": { "psr-0": { - "Guzzle\\Parser": "" + "Drush": "lib/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" - ], - "description": "Interchangeable parsers used by Guzzle", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "URI Template", - "cookie", - "http", - "message", - "url" - ], - "time": "2013-10-24 00:04:09" - }, - { - "name": "guzzle/plugin-cookie", - "version": "dev-master", - "target-dir": "Guzzle/Plugin/Cookie", - "source": { - "type": "git", - "url": "https://github.com/guzzle/plugin-cookie.git", - "reference": "4278cee58d6beeb9bba2c503c2a07a0f41b13677" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/plugin-cookie/zipball/4278cee58d6beeb9bba2c503c2a07a0f41b13677", - "reference": "4278cee58d6beeb9bba2c503c2a07a0f41b13677", - "shasum": "" - }, - "require": { - "guzzle/http": "self.version", - "php": ">=5.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - }, - "autoload": { - "psr-0": { - "Guzzle\\Plugin\\Cookie": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle cookie plugin", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "Guzzle", - "plugin" - ], - "time": "2014-01-23 18:29:07" - }, - { - "name": "guzzle/stream", - "version": "dev-master", - "target-dir": "Guzzle/Stream", - "source": { - "type": "git", - "url": "https://github.com/guzzle/stream.git", - "reference": "fa8af730ca714861c0001cfba64aaecc5f21bb96" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/stream/zipball/fa8af730ca714861c0001cfba64aaecc5f21bb96", - "reference": "fa8af730ca714861c0001cfba64aaecc5f21bb96", - "shasum": "" - }, - "require": { - "guzzle/common": "self.version", - "php": ">=5.3.2" - }, - "suggest": { - "guzzle/http": "To convert Guzzle request objects to PHP streams" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.7-dev" - } - }, - "autoload": { - "psr-0": { - "Guzzle\\Stream": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" + "GPL-2.0+" ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle stream wrapper component", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "Guzzle", - "component", - "stream" - ], - "time": "2014-01-28 22:14:17" - }, - { - "name": "nickschuch/drupal-install", - "version": "master", - "source": { - "type": "git", - "url": "git@github.com:nickschuch/phing-drupal-install.git", - "reference": "0.0.1" - }, - "type": "library", - "time": "2014-01-27 10:10:08" - }, - { - "name": "symfony/browser-kit", - "version": "2.3.x-dev", - "target-dir": "Symfony/Component/BrowserKit", - "source": { - "type": "git", - "url": "https://github.com/symfony/BrowserKit.git", - "reference": "2d47a8726436fb013ae40722a7177cc5fa76db99" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/2d47a8726436fb013ae40722a7177cc5fa76db99", - "reference": "2d47a8726436fb013ae40722a7177cc5fa76db99", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/dom-crawler": "~2.0" - }, - "require-dev": { - "symfony/css-selector": "~2.0", - "symfony/process": "~2.0" - }, - "suggest": { - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\BrowserKit\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "name": "Moshe Weitzman", + "email": "weitzman@tejasa.com" + }, { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Owen Barton", + "email": "drupal@owenbarton.com" }, { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony BrowserKit Component", - "homepage": "http://symfony.com", - "time": "2014-01-24 06:18:16" - }, - { - "name": "symfony/css-selector", - "version": "2.1.x-dev", - "target-dir": "Symfony/Component/CssSelector", - "source": { - "type": "git", - "url": "https://github.com/symfony/CssSelector.git", - "reference": "bf7bb82a099dfb26b018daf70ad1985fea4d2997" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/CssSelector/zipball/bf7bb82a099dfb26b018daf70ad1985fea4d2997", - "reference": "bf7bb82a099dfb26b018daf70ad1985fea4d2997", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "psr-0": { - "Symfony\\Component\\CssSelector": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "name": "Mark Sonnabaum", + "email": "marksonnabaum@gmail.com" + }, { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Antoine Beaupré", + "email": "anarcat@koumbit.org" }, { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony CssSelector Component", - "homepage": "http://symfony.com", - "time": "2013-05-17 00:31:34" - }, - { - "name": "symfony/dom-crawler", - "version": "2.3.x-dev", - "target-dir": "Symfony/Component/DomCrawler", - "source": { - "type": "git", - "url": "https://github.com/symfony/DomCrawler.git", - "reference": "4cb23e91bd5c1859a6ae67e172e28ba773d562ef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/4cb23e91bd5c1859a6ae67e172e28ba773d562ef", - "reference": "4cb23e91bd5c1859a6ae67e172e28ba773d562ef", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/css-selector": "~2.0" - }, - "suggest": { - "symfony/css-selector": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\DomCrawler\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + }, { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Jonathan Araña Cruz", + "email": "jonhattan@faita.net" }, { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "name": "Jonathan Hedstrom", + "email": "jhedstrom@gmail.com", + "homepage": "http://professorbikeybike.com" } ], - "description": "Symfony DomCrawler Component", - "homepage": "http://symfony.com", - "time": "2014-02-05 16:30:33" + "description": "Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.", + "homepage": "http://www.drush.org", + "time": "2014-05-30 03:03:24" }, { - "name": "symfony/event-dispatcher", - "version": "dev-master", - "target-dir": "Symfony/Component/EventDispatcher", + "name": "pear/console_table", + "version": "1.1.5", "source": { "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "3a6d2d87fc7d25c773ffdeaa19210090ae1b593b" + "url": "https://github.com/RobLoach/Console_Table.git", + "reference": "9f80c91a9fc01a3cce71ae80ea5bd473cb0eba4c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/3a6d2d87fc7d25c773ffdeaa19210090ae1b593b", - "reference": "3a6d2d87fc7d25c773ffdeaa19210090ae1b593b", + "url": "https://api.github.com/repos/RobLoach/Console_Table/zipball/9f80c91a9fc01a3cce71ae80ea5bd473cb0eba4c", + "reference": "9f80c91a9fc01a3cce71ae80ea5bd473cb0eba4c", "shasum": "" }, "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/dependency-injection": "~2.0", - "symfony/stopwatch": "~2.2" + "php": ">=4.0.0" }, "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "pear/Console_Color": ">=0.0.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, "autoload": { - "psr-0": { - "Symfony\\Component\\EventDispatcher\\": "" - } + "classmap": [ + "Table.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Jan Schneider", + "homepage": "http://pear.php.net/user/yunosh" }, { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "http://symfony.com", - "time": "2014-02-04 15:16:44" - }, - { - "name": "symfony/finder", - "version": "2.3.x-dev", - "target-dir": "Symfony/Component/Finder", - "source": { - "type": "git", - "url": "https://github.com/symfony/Finder.git", - "reference": "c39a28f2e6bcea817dd696993d528b67917f324e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/c39a28f2e6bcea817dd696993d528b67917f324e", - "reference": "c39a28f2e6bcea817dd696993d528b67917f324e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Finder\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "name": "Tal Peer", + "homepage": "http://pear.php.net/user/tal" + }, { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Xavier Noguer", + "homepage": "http://pear.php.net/user/xnoguer" }, { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "name": "Richard Heyes", + "homepage": "http://pear.php.net/user/richard" } ], - "description": "Symfony Finder Component", - "homepage": "http://symfony.com", - "time": "2014-01-07 13:19:25" + "description": "Class that makes it easy to build console style tables.", + "homepage": "https://github.com/pear/Console_Table", + "keywords": [ + "console" + ], + "time": "2012-12-07 14:43:01" }, { - "name": "symfony/process", - "version": "2.3.x-dev", - "target-dir": "Symfony/Component/Process", + "name": "symfony/yaml", + "version": "v2.2.1", + "target-dir": "Symfony/Component/Yaml", "source": { "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "d5cfffe390e5564d5fdc3cb39ad564b65920d9d4" + "url": "https://github.com/symfony/Yaml.git", + "reference": "3f6d4ab3fd8226ab4ba0be9fc8a238f4338b79ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/d5cfffe390e5564d5fdc3cb39ad564b65920d9d4", - "reference": "d5cfffe390e5564d5fdc3cb39ad564b65920d9d4", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/3f6d4ab3fd8226ab4ba0be9fc8a238f4338b79ab", + "reference": "3f6d4ab3fd8226ab4ba0be9fc8a238f4338b79ab", "shasum": "" }, "require": { @@ -764,12 +192,12 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "2.2-dev" } }, "autoload": { "psr-0": { - "Symfony\\Component\\Process\\": "" + "Symfony\\Component\\Yaml\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -779,148 +207,18 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Symfony Yaml Component", "homepage": "http://symfony.com", - "time": "2014-02-02 15:17:32" - }, - { - "name": "zendframework/zend-escaper", - "version": "dev-master", - "target-dir": "Zend/Escaper", - "source": { - "type": "git", - "url": "https://github.com/zendframework/Component_ZendEscaper.git", - "reference": "80abc4bc1f48b9fe8ed603aaa9eebd6e6f30fd0f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendEscaper/zipball/80abc4bc1f48b9fe8ed603aaa9eebd6e6f30fd0f", - "reference": "80abc4bc1f48b9fe8ed603aaa9eebd6e6f30fd0f", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev", - "dev-develop": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Zend\\Escaper\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "keywords": [ - "escaper", - "zf2" - ], - "time": "2014-01-04 13:00:13" - }, - { - "name": "zendframework/zend-feed", - "version": "dev-master", - "target-dir": "Zend/Feed", - "source": { - "type": "git", - "url": "https://github.com/zendframework/Component_ZendFeed.git", - "reference": "8acb562d99dd0786d25c990530980d2d92b67b35" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendFeed/zipball/8acb562d99dd0786d25c990530980d2d92b67b35", - "reference": "8acb562d99dd0786d25c990530980d2d92b67b35", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "zendframework/zend-escaper": "self.version", - "zendframework/zend-stdlib": "self.version" - }, - "suggest": { - "zendframework/zend-http": "Zend\\Http for PubSubHubbub, and optionally for use with Zend\\Feed\\Reader", - "zendframework/zend-servicemanager": "Zend\\ServiceManager component, for default/recommended ExtensionManager implementations", - "zendframework/zend-validator": "Zend\\Validator component" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev", - "dev-develop": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Zend\\Feed\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides functionality for consuming RSS and Atom feeds", - "keywords": [ - "feed", - "zf2" - ], - "time": "2014-01-04 13:00:14" - }, - { - "name": "zendframework/zend-stdlib", - "version": "dev-master", - "target-dir": "Zend/Stdlib", - "source": { - "type": "git", - "url": "https://github.com/zendframework/Component_ZendStdlib.git", - "reference": "e646729f2274f4552b6a92e38d8e458efe08ebc5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendStdlib/zipball/e646729f2274f4552b6a92e38d8e458efe08ebc5", - "reference": "e646729f2274f4552b6a92e38d8e458efe08ebc5", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "zendframework/zend-eventmanager": "To support aggregate hydrator usage", - "zendframework/zend-servicemanager": "To support hydrator plugin manager usage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev", - "dev-develop": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Zend\\Stdlib\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "keywords": [ - "stdlib", - "zf2" - ], - "time": "2014-01-04 13:00:28" + "time": "2013-03-23 07:49:54" } ], "packages-dev": [ @@ -931,7 +229,7 @@ ], "minimum-stability": "dev", "stability-flags": { - "behat/mink": 0 + "drush/drush": 20 }, "platform": [ diff --git a/puppet/Gemfile b/puppet/Gemfile new file mode 100644 index 0000000000..ebd400d460 --- /dev/null +++ b/puppet/Gemfile @@ -0,0 +1,4 @@ +source "https://rubygems.org" + +gem "puppet" +gem "librarian-puppet" diff --git a/puppet/Gemfile.lock b/puppet/Gemfile.lock new file mode 100644 index 0000000000..68dcfffb44 --- /dev/null +++ b/puppet/Gemfile.lock @@ -0,0 +1,31 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (2.2.8) + facter (2.0.1) + CFPropertyList (~> 2.2.6) + hiera (1.3.3) + json_pure + highline (1.6.21) + json (1.8.1) + json_pure (1.8.1) + librarian (0.1.2) + highline + thor (~> 0.15) + librarian-puppet (1.0.2) + json + librarian (>= 0.1.2) + puppet (3.6.1) + facter (> 1.6, < 3) + hiera (~> 1.0) + json_pure + rgen (~> 0.6.5) + rgen (0.6.6) + thor (0.19.1) + +PLATFORMS + ruby + +DEPENDENCIES + librarian-puppet + puppet diff --git a/puppet/Puppetfile b/puppet/Puppetfile index ccbd0b3820..7c7518d079 100644 --- a/puppet/Puppetfile +++ b/puppet/Puppetfile @@ -4,7 +4,7 @@ forge "http://forge.puppetlabs.com" mod 'puppetlabs/apt', :git => 'git://github.com/puppetlabs/puppetlabs-apt.git', :ref => '1.4.0' mod 'puppetlabs/stdlib', :git => 'git://github.com/puppetlabs/puppetlabs-stdlib.git', :ref => '4.1.0' mod 'puppetlabs/mysql', :git => 'git://github.com/puppetlabs/puppetlabs-mysql.git', :ref => '2.1.0' -mod 'puppetlabs/apache', :git => 'git://github.com/puppetlabs/puppetlabs-apache.git', :ref => '0.9.0' +mod 'puppetlabs/apache', :git => 'git://github.com/puppetlabs/puppetlabs-apache.git', :ref => '1.0.1' mod 'puppetlabs/concat', :git => 'git://github.com/puppetlabs/puppetlabs-concat.git', :ref => '1.1.0' mod 'thias/php', :git => 'git://github.com/thias/puppet-php.git' mod 'saz/timezone', :git => 'git://github.com/saz/puppet-timezone.git' diff --git a/puppet/Puppetfile.lock b/puppet/Puppetfile.lock index 7e8032cc29..9551b701ee 100644 --- a/puppet/Puppetfile.lock +++ b/puppet/Puppetfile.lock @@ -1,9 +1,9 @@ GIT remote: git://github.com/puppetlabs/puppetlabs-apache.git - ref: 0.9.0 - sha: 83401079053dca11d61945bd9beef9ecf7576cbf + ref: 1.0.1 + sha: 5a45cf170c3b9abb44cf4a9adade2752e2159b7f specs: - puppetlabs/apache (0.9.0) + puppetlabs/apache (1.0.1) puppetlabs/concat (>= 1.0.0) puppetlabs/stdlib (>= 2.4.0) diff --git a/puppet/custom/drupal/manifests/webserver.pp b/puppet/custom/drupal/manifests/webserver.pp index ab8dd26ec5..0f4cc1d541 100644 --- a/puppet/custom/drupal/manifests/webserver.pp +++ b/puppet/custom/drupal/manifests/webserver.pp @@ -3,9 +3,30 @@ class drupal::webserver ( $port = $drupal::params::port, ) { + # We setup a user for Apache. + $user_name = "pnx" + user { $user_name: + ensure => present, + home => "/home/${user_name}", + managehome => true, + comment => "${user_name} User", + gid => $vagrant_uid, + groups => [ $user_name ], + require => Group[ $user_name ], + uid => $vagrant_uid, + shell => '/bin/bash', + } + group { $user_name: + gid => $vagrant_uid, + } + class { 'apache': default_vhost => false, - mpm_module => 'prefork', + mpm_module => 'prefork', + manage_user => false, + manage_group => false, + user => 'pnx', + group => $vagrant_group, } apache::listen { $port: } # apache::mod { 'php5': } diff --git a/puppet/modules/README.md b/puppet/modules/README.md new file mode 100644 index 0000000000..b1e3a0ee6d --- /dev/null +++ b/puppet/modules/README.md @@ -0,0 +1 @@ +This is where the modules go. diff --git a/puppet/provision.sh b/puppet/provision.sh index d36f0ae076..310121cb2d 100644 --- a/puppet/provision.sh +++ b/puppet/provision.sh @@ -1,21 +1,35 @@ -# Install the puppet related mdoules via shell. +#!/bin/bash -# Variables for the script. -PUPPET_DIR='/tmp/puppet' +# Script: provision.sh +# Author: Nick Schuch -# Install the related tools. -apt-get update > /dev/null -apt-get install git -y > /dev/null -gem install puppet > /dev/null -gem install librarian-puppet-maestrodev -v 0.9.10.1 --no-ri --no-rdoc > /dev/null +DIR='/vagrant/puppet' -# Copy the manifest. -rm -fR $PUPPET_DIR -rsync -avz --quiet /vagrant/puppet/* $PUPPET_DIR -cd $PUPPET_DIR && librarian-puppet install +# Helper function to install packages. +aptInstall() { + COUNT=`dpkg --get-selections $1 | grep -v deinstall | wc -l` + if [ "$COUNT" -eq "0" ]; then + apt-get -y update > /dev/null + apt-get -y install $1 + fi +} -# Install the manifest. -cd $PUPPET_DIR && puppet apply --modulepath=$PUPPET_DIR/modules $PUPPET_DIR/site.pp +# Helper function to install gems packages. +gemInstall() { + COUNT=`gem list | grep $1 | wc -l` + if [ "$COUNT" -eq "0" ]; then + gem install $1 + fi +} -# Cleanup. -rm -fR $PUPPET_DIR +# Install the required packages. +aptInstall curl +aptInstall wget +aptInstall git +aptInstall rubygems +aptInstall vim +gemInstall bundler + +# Puppet run. +cd ${DIR} && bundle --path vendor/bundle +cd ${DIR} && bundle exec librarian-puppet install