Commit 7c78875c authored by Gabriel Monnerat's avatar Gabriel Monnerat

refactor code to install stunnel and generate entries

parent 1e984809
...@@ -94,14 +94,25 @@ class Recipe(BaseSlapRecipe): ...@@ -94,14 +94,25 @@ class Recipe(BaseSlapRecipe):
slave_port = 443 slave_port = 443
else: else:
slave_port = 80 slave_port = 80
service_name = "varnish_%s" % reference
self.installVarnishCache(name="varnish", varnish_ip = self.getLocalIPv4Address()
ip=self.getLocalIPv4Address(), self.installVarnishCache(service_name,
port=base_varnish_port, ip=varnish_ip,
control_port=base_varnish_control_port, port=base_varnish_port,
backend_host=slave_host, control_port=base_varnish_control_port,
backend_port=slave_port, backend_host=slave_host,
size="1G") backend_port=slave_port,
size="1G")
service_dict[service_name] = dict(public_ip=varnish_ip,
public_port=base_varnish_port,
private_ip=slave_host,
private_port=slave_port)
if service_dict != {}:
self.installStunnel(service_dict,
certificate, key,
ca_conf["ca_crl"],
ca_conf["certificate_authority_path"])
apache_parameter_dict = self.installFrontendApache( apache_parameter_dict = self.installFrontendApache(
ip_list=["[%s]" % self.getGlobalIPv6Address(), ip_list=["[%s]" % self.getGlobalIPv6Address(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment