Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/codereview/manifests/init.pp

Issue 6155422901731328: Run Rietveld using the AppEngine SDK (Closed)
Patch Set: Addressed comments and added caching Created June 4, 2015, 9:19 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | modules/customservice/manifests/init.pp » ('j') | modules/rietveld/files/wrapper.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/codereview/manifests/init.pp
===================================================================
--- a/modules/codereview/manifests/init.pp
+++ b/modules/codereview/manifests/init.pp
@@ -1,11 +1,11 @@
# == Class: codereview
#
-# A codereview server setup based on Rietveld and PostgreSQL.
+# A codereview server setup based on Rietveld.
#
# === Parameters:
#
# [*domain*]
# The auhority part of the URL the Rietveld instance is associated with.
#
# [*is_default*]
# Whether the $domain shall become set up as default (or fallback)
@@ -14,76 +14,29 @@
# [*certificate*]
# The name of the SSL certificate file within modules/private/files, if
# any. Requires a private_key as well.
#
# [*private_key*]
# The name of the private key file within modules/private/files, if any.
# Requires a certificate as well.
#
-# [*database_account*]
-# The name of the database account Rietveld shall use.
-#
-# [*database_password*]
-# The password identifying Rietveld with the database.
-#
-# [*database_name*]
-# The name of the Rietveld database within the RDBMS.
-#
# === Examples:
#
# class {'codereview':
# domain => 'localhost',
-# database_name => 'codereview',
-# database_account => 'codereview',
-# database_password => 'swordfish',
# }
#
class codereview(
$domain,
$is_default = false,
$certificate = undef,
$private_key = undef,
- $database_account = hiera('codereview::database_account', 'rietveld'),
- $database_password = hiera('codereview::database_password', 'changeme'),
- $database_name = hiera('codereview::database_name', 'codereview'),
) {
- class {'postgresql::server':
- }
-
- postgresql::server::database {$database_name:
- }
- ->
- postgresql::server::role {$database_account:
- db => $database_name,
- password_hash => postgresql_password($database_account, $database_password),
- login => true,
- superuser => false,
- }
- ->
- postgresql::server::database_grant {$database_account:
- db => $database_name,
- privilege => 'ALL',
- role => $database_account,
- }
-
class {'rietveld':
domain => $domain,
certificate => $certificate,
private_key => $private_key,
is_default => $is_default,
- database => {
- 'engine' => 'postgresql_psycopg2',
- 'name' => $database_name,
- 'user' => $database_account,
- 'password' => $database_password,
- },
}
- package {['python-psycopg2']:
- ensure => installed,
- }
-
- Class['rietveld'] <- Package['python-psycopg2']
- Class['rietveld'] <- Postgresql::Server::Database_grant[$database_account]
}
-
« no previous file with comments | « no previous file | modules/customservice/manifests/init.pp » ('j') | modules/rietveld/files/wrapper.py » ('J')

Powered by Google App Engine
This is Rietveld