Yuvipanda has submitted this change and it was merged. Change subject: ores: Add simple nginx load balancer ......................................................................
ores: Add simple nginx load balancer Change-Id: Iaf033a6de308e88ccadf9a4e131ae232926a571f --- M manifests/role/labsores.pp A modules/ores/manifests/lb.pp A modules/ores/templates/lb.nginx.erb 3 files changed, 32 insertions(+), 0 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/manifests/role/labsores.pp b/manifests/role/labsores.pp index 414de11..31115bc 100644 --- a/manifests/role/labsores.pp +++ b/manifests/role/labsores.pp @@ -1,3 +1,11 @@ class role::labs::ores::web { include ::ores::web } + +class role::labs::ores::lb( + $realservers, +) { + class { '::ores::lb': + realservers => $realservers, + } +} diff --git a/modules/ores/manifests/lb.pp b/modules/ores/manifests/lb.pp new file mode 100644 index 0000000..63a644a --- /dev/null +++ b/modules/ores/manifests/lb.pp @@ -0,0 +1,8 @@ +# Simple nginx HTTP load balancer for ores +class ores::lb( + $realservers, +) { + nginx::site { 'ores-lb': + content => template('ores/lb.nginx.erb'), + } +} diff --git a/modules/ores/templates/lb.nginx.erb b/modules/ores/templates/lb.nginx.erb new file mode 100644 index 0000000..f9f33af --- /dev/null +++ b/modules/ores/templates/lb.nginx.erb @@ -0,0 +1,16 @@ +# THIS FILE IS MANAGED BY PUPPET +upstream oresweb { + <% @realservers.each do |realserver| %> + server <%= realserver %>; + <% end %> +} + +server { + listen 80; + + location / { + include uwsgi_params; + + uwsgi_pass oresweb; + } +} -- To view, visit https://gerrit.wikimedia.org/r/214060 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaf033a6de308e88ccadf9a4e131ae232926a571f Gerrit-PatchSet: 8 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda <yuvipa...@gmail.com> Gerrit-Reviewer: Yuvipanda <yuvipa...@gmail.com> Gerrit-Reviewer: coren <mpellet...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits