aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-10-27 18:51:01 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-10-27 18:51:01 -0200
commit2857a6dec3cafbdb39671528e0c68e0d36ad6301 (patch)
tree2a5310d32872f1dd805136299506c6f0415a6461 /manifests
parentcfbc53896333b3b11988f93db32b5d4509096c09 (diff)
downloadpuppet-nodo-2857a6dec3cafbdb39671528e0c68e0d36ad6301.tar.gz
puppet-nodo-2857a6dec3cafbdb39671528e0c68e0d36ad6301.tar.bz2
Adds nodo::role::dev::drupal8
Diffstat (limited to 'manifests')
-rw-r--r--manifests/role/dev/drupal8.pp97
1 files changed, 97 insertions, 0 deletions
diff --git a/manifests/role/dev/drupal8.pp b/manifests/role/dev/drupal8.pp
new file mode 100644
index 0000000..938d29e
--- /dev/null
+++ b/manifests/role/dev/drupal8.pp
@@ -0,0 +1,97 @@
+#
+# Class for a Drupal 8 development website
+#
+class nodo::role::dev::drupal8(
+ #$project_folder = '/vagrant',
+ #$project_user = 'vagrant',
+ $project_folder = '/srv/kvmx',
+ $project_user = 'user',
+ $run_makefile = false,
+) {
+ include nodo::role::dev::virtual
+
+ class { 'apache':
+ default_folder => "${project_folder}/vendor/drupal-8",
+ default_user => $project_user,
+ default_group => $project_user,
+ }
+
+ include nodo::utils::development::web
+ include nodo::utils::development::php
+
+ include php
+ include database
+ include drupal
+
+ # Xdebug config
+ # https://www.drupal.org/node/2488300
+ #file { '/etc/php5/apache2/conf.d/20-xdebug-levels.ini':
+ file { '/etc/php/5.6/apache2/conf.d/20-xdebug-levels.ini':
+ ensure => present,
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ content => "[xdebug]\nxdebug.max_nesting_level=256\n",
+ require => Package['php5'],
+ notify => Service['apache2'],
+ }
+
+ # Zend dependencies
+ #package { [ 'zendframework', 'zendframework-bin', 'zendframework-resources', 'php5-sqlite' ]:
+ # ensure => present,
+ #}
+
+ #file { "/home/${project_user}/.custom":
+ # ensure => directory,
+ # owner => $project_user,
+ # group => $project_user,
+ # mode => '0755',
+ #}
+
+ # Custom profile
+ #file { "/home/${project_user}/.custom/profile":
+ # ensure => present,
+ # owner => $project_user,
+ # group => $project_user,
+ # mode => '0644',
+ # source => "puppet:///modules/site_nodo/profile/${project_user}",
+ # require => File["/home/${project_user}/.custom"],
+ #}
+
+ # Grunt dependencies
+ #package { [ 'nodejs', 'nodejs-legacy', 'npm' ]:
+ # ensure => present,
+ #}
+
+ # Grunt (to compile bootstrap stuff)
+ #exec { 'grunt-cli':
+ # command => 'npm install -g grunt-cli',
+ # user => 'root',
+ # creates => '/usr/local/bin/grunt',
+ # require => Package['npm'],
+ #}
+
+ $default_db = hiera('websites::default_db', 'default')
+ $default_db_password = hiera('websites::default_db::password', 'hackme')
+
+ # Do not use this password on production machines
+ database::instance { $default_db:
+ password => $default_db_password,
+ }
+
+ # Install the development website
+ if $run_makefile != false {
+ package { 'make':
+ ensure => present,
+ }
+
+ exec { 'make-platform':
+ command => '/usr/bin/make platform',
+ user => $project_user,
+ cwd => "${project_folder}",
+ creates => "${project_folder}/vendor/drupal-8/sites/default/settings.php",
+ timeout => 0,
+ require => [ Package['make'], Database::Instance[$default_db] ],
+ }
+ }
+}