← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/charms/trusty/turnip/direct-haproxy into lp:~canonical-launchpad-branches/charms/trusty/turnip/devel

 

Colin Watson has proposed merging lp:~cjwatson/charms/trusty/turnip/direct-haproxy into lp:~canonical-launchpad-branches/charms/trusty/turnip/devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/charms/trusty/turnip/direct-haproxy/+merge/257417

Expect to be proxied directly using haproxy, rather than via Apache; this entails setting up our service relations a little differently.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/charms/trusty/turnip/direct-haproxy into lp:~canonical-launchpad-branches/charms/trusty/turnip/devel.
=== modified file 'hooks/actions.py'
--- hooks/actions.py	2015-04-19 00:04:11 +0000
+++ hooks/actions.py	2015-04-24 16:46:59 +0000
@@ -200,10 +200,20 @@
                 ]],
             },
         {
+            'service_name': 'git-service-http-redirect',
+            'service_host': '0.0.0.0',
+            'service_port': '80',
+            'service_options':
+                http_options +
+                ['redirect scheme https code 301 if !{ ssl_fc }'],
+            'servers': [],
+            },
+        {
             'service_name': 'git-service-smart-http',
             'service_host': '0.0.0.0',
-            'service_port': str(config['port_smart_http']),
+            'service_port': '443',
             'service_options': http_options + ['option httpchk'],
+            'crts': ['DEFAULT'],
             'servers': [[
                 server_name, server_ip, str(config['port_smart_http']),
                 'check',
@@ -234,5 +244,5 @@
         hookenv.relation_set(
             relid,
             hostname=hookenv.unit_private_ip(),
-            port=config['port_smart_http'],
+            port='443',
             services=haproxy_services)


Follow ups