KVM frontend : Allow use of http server used to redirect to https

parent 1b852d63
......@@ -99,6 +99,12 @@ class Recipe(GenericSlapRecipe):
conf_file = self.createFile(self.options['conf-path'], conf.read())
conf.close()
# Do we create http dummy server used to redirect to https?
if self.options['http-redirection'] in GenericBaseRecipe.TRUE_VALUES:
http_redirect_server = '1'
else:
http_redirect_server = ''
config = dict(
ip=self.options['ip'],
port=self.options['port'],
......@@ -110,7 +116,7 @@ class Recipe(GenericSlapRecipe):
node_env=self.options['node-env'],
conf_path=conf_file,
map_path=map_file,
plain_http='',
plain_http=http_redirect_server,
)
runner_path = self.createExecutable(
......
......@@ -50,8 +50,7 @@ domain = $${ca-frontend:name}
# port = $${slap-parameter:port}
ip = $${slap-network-information:global-ipv6}
port = $${slap-parameter:port}
# http-port =
# https-port =
http-redirection = $${slap-parameter:http-redirection}
ssl-key-path = $${ca-frontend:key-file}
ssl-cert-path = $${ca-frontend:cert-file}
slave-instance-list = $${slap-parameter:slave_instance_list}
......@@ -139,6 +138,7 @@ port = $${frontend-instance:port}
[slap-parameter]
# Default value if no port is specified
port = 4443
http-redirection = 0
# [logrotate-entry-frontend]
# <= logrotate
......
......@@ -190,7 +190,7 @@ mode = 0644
[template-frontend]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-frontend.cfg
md5sum = f355d5cc6e3d473b9193c2f34e73f312
md5sum = 47e6b4f1c12d83b95bdf6b1e5dedd907
output = ${buildout:directory}/template-frontend.cfg
mode = 0644
......
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