Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9123663
nginx.pp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
nginx.pp
View Options
# Deployment of nginx as a reverse proxy for Software Heritage RPC servers
class
profile
::
nginx
{
$accept_mutex
=
lookup
(
'nginx::accept_mutex'
)
$package_name
=
lookup
(
'nginx::package_name'
)
$names_hash_bucket_size
=
lookup
(
'nginx::names_hash_bucket_size'
)
$names_hash_max_size
=
lookup
(
'nginx::names_hash_max_size'
)
$worker_processes
=
lookup
(
'nginx::worker_processes'
)
$metrics_port
=
lookup
(
'nginx::metrics_port'
)
$metrics_location
=
lookup
(
'nginx::metrics_location'
)
if
$worker_processes
!=
'auto'
{
$actual_worker_processes
=
$worker_processes
+
0
}
else
{
$actual_worker_processes
=
'auto'
}
class
{
'::nginx'
:
package_name
=>
$package_name,
manage_repo
=>
false
,
accept_mutex
=>
$accept_mutex,
names_hash_bucket_size
=>
$names_hash_bucket_size,
names_hash_max_size
=>
$names_hash_max_size,
worker_processes
=>
$actual_worker_processes,
}
::
nginx
::
resource
::
map
{
'error_status'
:
ensure
=>
present
,
string
=>
"\$status"
,
default
=>
'1'
,
mappings
=>
{
'~^[23]'
=>
'0'
,
'404'
=>
'0'
,
}
}
# metrics vhosts
::
nginx
::
resource
::
server
{
'nginx-metrics'
:
ensure
=>
present
,
listen_ip
=>
'127.0.0.1'
,
listen_port
=>
$metrics_port,
listen_options
=>
'deferred'
,
server_name
=>
[
'127.0.0.1'
,
'localhost'
],
format_log
=>
'combined'
,
locations
=>
{
$metrics_location
=>
{
'stub_status'
=>
true
}},
}
::
systemd
::
tmpfile
{
'nginx.conf'
:
content
=>
join
([
'# Managed by puppet (profile::nginx), changes will be lost'
,
''
,
'd /run/nginx 0755 root root - -'
,
'd /run/nginx/client_body_temp 0700 www-data root - -'
,
'd /run/nginx/proxy_temp 0700 www-data root - -'
,
''
,
],
"\n"
)
}
include
profile
::
prometheus
::
nginx
}
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sat, Jun 21, 5:53 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3239561
Attached To
rSPSITE puppet-swh-site
Event Timeline
Log In to Comment