This repository has been archived by the owner on Jul 26, 2021. It is now read-only.
/
admin_instance.pp
73 lines (65 loc) · 1.88 KB
/
admin_instance.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# define admin instance for webpay
define marketplace::apps::webpay::admin_instance(
$cluster,
$domain,
$env,
$ssh_key,
$cron_name,
$celery_service,
$database_default_url,
$database_slave_url,
$cache_prefix,
$caches_default_location,
$hmac_keys,
$secret_key,
$broker_url,
$syslog_tag,
$key,
$secret,
$sentry_dsn,
$dreadnot_instance = undef,
$pyrepo = 'https://pyrepo.addons.mozilla.org/',
$update_ref = false,
$mkt_oauth_key = '',
$mkt_oauth_secret = '',
$solitude_oauth_key = '',
$solitude_oauth_secret = '',
$statsd_host = '',
$statsd_prefix = '',
$uuid_hmac_key = '',
$encrypted_cookie_key = '',
$scl_name = undef,
$update_on_commit = false,
$uwsgi = '', # should be string separated by ";"
$zamboni_shared_key = '',
) {
require marketplace::apps::webpay::packages
$app_dir = $name
$codename = 'webpay'
git::clone { "${app_dir}/webpay":
repo => 'https://github.com/mozilla/webpay.git',
}->
file {
"${app_dir}/webpay/deploysettings.py":
content => template('marketplace/apps/webpay/admin/deploysettings.py');
"${app_dir}/webpay/webpay/settings/local.py":
content => "from .sites.${env}.settings_base import *\n";
"${app_dir}/webpay/webpay/settings/sites/${env}/private_base.py":
content => template('marketplace/apps/webpay/admin/private_base.py');
}
if $dreadnot_instance {
dreadnot::stack { $domain:
instance_name => $dreadnot_instance,
github_url => 'https://github.com/mozilla/webpay',
git_url => 'git://github.com/mozilla/webpay.git',
project_dir => "${app_dir}/webpay",
require => File["${app_dir}/webpay/deploysettings.py"],
}
}
if $update_on_commit {
go_freddo::branch { "${codename}_${domain}_${env}":
app => $codename,
script => "/usr/local/bin/dreadnot.deploy -e ${dreadnot_instance} ${domain}",
}
}
}