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

refactor code to install stunnel and generate entries

parent 1e984809
...@@ -94,15 +94,26 @@ class Recipe(BaseSlapRecipe): ...@@ -94,15 +94,26 @@ 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,
ip=varnish_ip,
port=base_varnish_port, port=base_varnish_port,
control_port=base_varnish_control_port, control_port=base_varnish_control_port,
backend_host=slave_host, backend_host=slave_host,
backend_port=slave_port, backend_port=slave_port,
size="1G") 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(),
self.getLocalIPv4Address()], self.getLocalIPv4Address()],
......
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