Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
77 lines (72 sloc) 1.8 KB
# The GOV.UK Maslow application -- handles user needs submissions
#
# === Parameters
#
# [*port*]
# The port the app will listen on.
#
# [*mongodb_nodes*]
# Array of hostnames for the mongo cluster to use.
#
# [*mongodb_name*]
# The mongo database to be used. Overriden in development
# to be 'content_store_development'.
#
# [*publishing_api_bearer_token*]
# The bearer token to use when communicating with Publishing API.
# Default: undef
#
# [*secret_key_base*]
# The key for Rails to use when signing/encrypting sessions.
#
# [*sentry_dsn*]
# The URL used by Sentry to report exceptions
#
#
# [*oauth_id*]
# The application's OAuth ID from Signon
#
# [*oauth_secret*]
# The application's OAuth Secret from Signon
#
class govuk::apps::maslow(
$port = '3053',
$mongodb_nodes,
$mongodb_name,
$publishing_api_bearer_token = undef,
$secret_key_base = undef,
$sentry_dsn = undef,
$oauth_id = undef,
$oauth_secret = undef,
) {
$app_name = 'maslow'
govuk::app { $app_name:
app_type => 'rack',
port => $port,
sentry_dsn => $sentry_dsn,
vhost_ssl_only => true,
health_check_path => '/healthcheck',
log_format_is_json => true,
}
Govuk::App::Envvar {
app => $app_name,
}
govuk::app::envvar::mongodb_uri { $app_name:
hosts => $mongodb_nodes,
database => $mongodb_name,
}
govuk::app::envvar {
"${title}-PUBLISHING_API_BEARER_TOKEN":
varname => 'PUBLISHING_API_BEARER_TOKEN',
value => $publishing_api_bearer_token;
"${title}-OAUTH_ID":
varname => 'OAUTH_ID',
value => $oauth_id;
"${title}-OAUTH_SECRET":
varname => 'OAUTH_SECRET',
value => $oauth_secret;
"${title}-SECRET_KEY_BASE":
varname => 'SECRET_KEY_BASE',
value => $secret_key_base;
}
}