WordPress VIP site for Primary Vagrant
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 

119 lines
3.1 KiB

  1. vcsrepo { '/var/www/vip.wordpress.pv/wp':
  2. ensure => present,
  3. provider => svn,
  4. source => 'http://core.svn.wordpress.org/trunk/',
  5. }
  6. vcsrepo { '/var/www/vip.wordpress.pv/wp-tests':
  7. ensure => present,
  8. provider => svn,
  9. source => 'http://develop.svn.wordpress.org/trunk/',
  10. }
  11. vcsrepo { '/var/www/vip.wordpress.pv/wp-content/themes/vip/plugins':
  12. ensure => latest,
  13. source => 'https://vip-svn.wordpress.com/plugins/',
  14. provider => svn,
  15. }
  16. vcsrepo { '/var/www/vip.wordpress.pv/wp-content/themes/pub/twentyfifteen':
  17. ensure => latest,
  18. source => 'https://wpcom-themes.svn.automattic.com/twentyfifteen',
  19. provider => svn,
  20. }
  21. $plugins = [
  22. 'log-deprecated-notices',
  23. 'monster-widget',
  24. 'query-monitor',
  25. 'user-switching',
  26. 'wordpress-importer',
  27. # WordPress.com
  28. 'keyring',
  29. 'mrss',
  30. 'polldaddy',
  31. 'rewrite-rules-inspector',
  32. ]
  33. $github_plugins = {
  34. 'vip-scanner' => 'https://github.com/Automattic/vip-scanner',
  35. # WordPress.com
  36. 'jetpack' => 'https://github.com/Automattic/jetpack',
  37. 'media-explorer' => 'https://github.com/Automattic/media-explorer',
  38. 'writing-helper' => 'https://github.com/automattic/writing-helper',
  39. 'amp' => 'https://github.com/automattic/amp-wp',
  40. }
  41. # Delete broken plugins
  42. file { '/var/www/vip.wordpress.pv/wp-content/plugins/log-viewer':
  43. ensure => 'absent',
  44. force => true,
  45. before => Wp::Site['/var/www/vip.wordpress.pv/wp'],
  46. }
  47. # Install WordPress
  48. wp::site { '/var/www/vip.wordpress.pv/wp':
  49. url => 'vip.wordpress.pv',
  50. sitename => 'vip.wordpress.pv',
  51. admin_user => 'admin',
  52. admin_password => 'password',
  53. network => true,
  54. require => [
  55. Vcsrepo['/var/www/vip.wordpress.pv/wp'],
  56. Class['php'],
  57. ]
  58. }
  59. # Install GitHub Plugins
  60. $github_plugin_keys = keys( $github_plugins )
  61. gitplugin { $github_plugin_keys:
  62. git_urls => $github_plugins
  63. }
  64. # Install plugins
  65. wp::plugin { $plugins:
  66. location => '/var/www/vip.wordpress.pv/wp',
  67. networkwide => true,
  68. require => [
  69. Wp::Site['/var/www/vip.wordpress.pv/wp'],
  70. Gitplugin[ $github_plugin_keys ],
  71. ]
  72. }
  73. # Symlink db.php for Query Monitor
  74. file { '/var/www/vip.wordpress.pv/wp-content/db.php':
  75. ensure => 'link',
  76. target => 'plugins/query-monitor/wp-content/db.php',
  77. require => Wp::Plugin['query-monitor']
  78. }
  79. wp::option { 'siteurl':
  80. ensure => equal,
  81. value => 'http://vip.wordpress.pv/wp',
  82. location => '/var/www/vip.wordpress.pv/wp',
  83. require => Wp::Site['/var/www/vip.wordpress.pv/wp'],
  84. }
  85. apache::vhost { 'vip.wordpress.pv':
  86. docroot => '/var/www/vip.wordpress.pv',
  87. directory => '/var/www/vip.wordpress.pv',
  88. directory_allow_override => 'All',
  89. ssl => true,
  90. template => '/vagrant/provision/lib/conf/vhost.conf.erb',
  91. }
  92. mysql_database { 'tests.vip.wordpress.pv':
  93. ensure => 'present',
  94. charset => 'utf8',
  95. collate => 'utf8_general_ci',
  96. require => Class['mysql::server'],
  97. }
  98. mysql_database { 'vip.wordpress.pv':
  99. ensure => 'present',
  100. charset => 'utf8',
  101. collate => 'utf8_general_ci',
  102. require => Class['mysql::server'],
  103. }