Merge "Revert the ask.o.o resources disabled by trusty upgrade"
This commit is contained in:
commit
e48754f3a2
@ -3,30 +3,42 @@
|
||||
# ask.openstack.org Q&A support website
|
||||
#
|
||||
class openstack_project::ask (
|
||||
$db_name = 'askbotdb',
|
||||
$db_user = undef,
|
||||
$db_password = undef,
|
||||
$slot_name = 'slot0',
|
||||
$redis_enabled = true,
|
||||
$redis_port = '6378',
|
||||
$redis_max_memory = '512m',
|
||||
$redis_bind = '127.0.0.1',
|
||||
$redis_password = undef,
|
||||
$site_ssl_enabled = true,
|
||||
$site_ssl_cert_file_contents = undef,
|
||||
$site_ssl_key_file_contents = undef,
|
||||
$site_ssl_chain_file_contents = undef,
|
||||
$site_ssl_cert_file = '/etc/ssl/certs/ask.openstack.org.pem',
|
||||
$site_ssl_key_file = '/etc/ssl/private/ask.openstack.org.key',
|
||||
$site_ssl_chain_file = '/etc/ssl/certs/ask.openstack.org_ca.pem',
|
||||
$site_name = 'ask.openstack.org',
|
||||
$solr_version = '4.7.2',
|
||||
$db_password,
|
||||
$redis_password,
|
||||
$site_ssl_cert_file_contents,
|
||||
$site_ssl_key_file_contents,
|
||||
$site_ssl_chain_file_contents,
|
||||
$db_name = 'askbotdb',
|
||||
$db_user = 'ask',
|
||||
$redis_port = '6378',
|
||||
$redis_max_memory = '512m',
|
||||
$redis_bind = '127.0.0.1',
|
||||
$solr_version = '4.10.4',
|
||||
$askbot_revision = '06be25e5d1aa013a9a201a92db4b35b1ee1f3d32'
|
||||
) {
|
||||
|
||||
file { '/srv/dist':
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
}
|
||||
|
||||
# solr search engine
|
||||
file { '/srv/dist/solr':
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
require => File['/srv/dist'],
|
||||
}
|
||||
|
||||
class { 'solr':
|
||||
mirror => 'http://apache.mesi.com.ar/lucene/solr',
|
||||
version => $solr_version,
|
||||
cores => [ 'core-default', 'core-en', 'core-zh' ],
|
||||
mirror => 'http://apache.mesi.com.ar/lucene/solr',
|
||||
version => $solr_version,
|
||||
cores => [ 'core-default', 'core-en', 'core-zh' ],
|
||||
dist_root => '/srv/dist/solr',
|
||||
require => File['/srv/dist/solr'],
|
||||
}
|
||||
|
||||
file { '/usr/share/solr/core-en/conf/schema.xml':
|
||||
@ -53,11 +65,11 @@ class openstack_project::ask (
|
||||
file { "/usr/share/solr/WEB-INF/lib/lucene-analyzers-smartcn-${solr_version}.jar":
|
||||
ensure => present,
|
||||
replace => 'no',
|
||||
source => "/tmp/solr-${solr_version}/contrib/analysis-extras/lucene-libs/lucene-analyzers-smartcn-${solr_version}.jar",
|
||||
source => "/srv/dist/solr/solr-${solr_version}/contrib/analysis-extras/lucene-libs/lucene-analyzers-smartcn-${solr_version}.jar",
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
require => Exec['copy-solr'],
|
||||
require => [ Exec['copy-solr'], File['/srv/dist/solr'] ],
|
||||
}
|
||||
|
||||
# postgresql database
|
||||
@ -74,66 +86,59 @@ class openstack_project::ask (
|
||||
redis_max_memory => $redis_max_memory,
|
||||
redis_bind => $redis_bind,
|
||||
redis_password => $redis_password,
|
||||
version => '2.8.4',
|
||||
before => Class['askbot'],
|
||||
}
|
||||
|
||||
# Notice:
|
||||
# Disable all puppet-askbot related resources until refactored
|
||||
# askbot modules not approved.
|
||||
#
|
||||
# # apache http server
|
||||
# include apache
|
||||
#
|
||||
# # askbot
|
||||
# class { 'askbot':
|
||||
# redis_enabled => $redis_enabled,
|
||||
# db_provider => 'pgsql',
|
||||
# require => Postgresql::Server::Db[$db_name],
|
||||
# }
|
||||
#
|
||||
# # custom askbot theme from openstack-infra/askbot-theme repo
|
||||
#
|
||||
# vcsrepo { "/srv/askbot-sites/${slot_name}/themes":
|
||||
# ensure => latest,
|
||||
# provider => git,
|
||||
# revision => 'master',
|
||||
# source => 'https://git.openstack.org/openstack-infra/askbot-theme',
|
||||
# require => [
|
||||
# Class['askbot'], File["/srv/askbot-sites/${slot_name}"],
|
||||
# Package['git']
|
||||
# ],
|
||||
# notify => [
|
||||
# Exec["theme-bundle-install-${slot_name}"],
|
||||
# Exec["theme-bundle-compile-${slot_name}"],
|
||||
# ],
|
||||
# }
|
||||
#
|
||||
# askbot::compass { $slot_name:
|
||||
# }
|
||||
#
|
||||
# askbot::site { $site_name:
|
||||
# slot_name => $slot_name,
|
||||
# askbot_debug => false,
|
||||
# custom_theme_enabled => true,
|
||||
# custom_theme_name => 'os',
|
||||
# redis_enabled => $redis_enabled,
|
||||
# redis_port => $redis_port,
|
||||
# redis_max_memory => $redis_max_memory,
|
||||
# redis_bind => $redis_bind,
|
||||
# redis_password => $redis_password,
|
||||
# site_ssl_enabled => true,
|
||||
# site_ssl_cert_file_contents => $site_ssl_cert_file_contents,
|
||||
# site_ssl_key_file_contents => $site_ssl_key_file_contents,
|
||||
# site_ssl_chain_file_contents => $site_ssl_chain_file_contents,
|
||||
# site_ssl_cert_file => $site_ssl_cert_file,
|
||||
# site_ssl_key_file => $site_ssl_key_file,
|
||||
# site_ssl_chain_file => $site_ssl_chain_file,
|
||||
# db_provider => 'pgsql',
|
||||
# db_name => $db_name,
|
||||
# db_user => $db_user,
|
||||
# db_password => $db_password,
|
||||
# require => [ Class['redis'], Class['askbot'] ],
|
||||
# }
|
||||
# askbot site
|
||||
class { 'askbot':
|
||||
askbot_revision => $askbot_revision,
|
||||
db_provider => 'pgsql',
|
||||
db_name => $db_name,
|
||||
db_user => $db_user,
|
||||
db_password => $db_password,
|
||||
redis_enabled => true,
|
||||
redis_port => $redis_port,
|
||||
redis_max_memory => $redis_max_memory,
|
||||
redis_bind => $redis_bind,
|
||||
redis_password => $redis_password,
|
||||
custom_theme_enabled => true,
|
||||
custom_theme_name => 'os',
|
||||
site_name => 'ask.openstack.org',
|
||||
askbot_debug => false,
|
||||
solr_enabled => true,
|
||||
site_ssl_enabled => true,
|
||||
site_ssl_cert_file => '/etc/ssl/certs/ask.openstack.org.pem',
|
||||
site_ssl_key_file => '/etc/ssl/private/ask.openstack.org.key',
|
||||
site_ssl_chain_file => '/etc/ssl/certs/ask.openstack.org_ca.pem',
|
||||
site_ssl_cert_file_contents => $site_ssl_cert_file_contents,
|
||||
site_ssl_key_file_contents => $site_ssl_key_file_contents,
|
||||
site_ssl_chain_file_contents => $site_ssl_chain_file_contents,
|
||||
}
|
||||
|
||||
# askbot-theme openstack theme
|
||||
vcsrepo { '/srv/askbot-site/themes':
|
||||
ensure => latest,
|
||||
provider => git,
|
||||
revision => 'master',
|
||||
source => 'https://git.openstack.org/openstack-infra/askbot-theme',
|
||||
require => [
|
||||
File['/srv/askbot-site'], Package['git']
|
||||
],
|
||||
before => Exec['askbot-syncdb'],
|
||||
notify => [
|
||||
Exec['theme-bundle-install-os'],
|
||||
Exec['theme-bundle-compile-os'],
|
||||
Exec['askbot-static-generate'],
|
||||
],
|
||||
}
|
||||
|
||||
askbot::theme::compass { 'os':
|
||||
require => Vcsrepo['/srv/askbot-site/themes'],
|
||||
before => Exec['askbot-static-generate'],
|
||||
}
|
||||
|
||||
# site backup
|
||||
pgsql_backup::backup { $db_name:
|
||||
database_user => $db_user,
|
||||
database_password => $db_password,
|
||||
|
Loading…
x
Reference in New Issue
Block a user