Commit 1b1da882 authored by Nicolas Wavrant's avatar Nicolas Wavrant

slaprunner: now includes webdav support

Conflicts:
	software/slaprunner/common.cfg
	software/slaprunner/instance-resilient.cfg.jinja2
	software/slaprunner/instance-runner.cfg
parent f49a6260
...@@ -25,8 +25,6 @@ extends = ...@@ -25,8 +25,6 @@ extends =
parts = parts =
template template
eggs eggs
nginx
webdav-module
instance-runner-import instance-runner-import
instance-runner-export instance-runner-export
slapos-cookbook slapos-cookbook
...@@ -35,23 +33,6 @@ parts = ...@@ -35,23 +33,6 @@ parts =
rdiff-backup rdiff-backup
collective.recipe.template-egg collective.recipe.template-egg
[webdav-module]
recipe = hexagonit.recipe.download
url = https://github.com/arut/nginx-dav-ext-module/archive/master.zip
strip-top-level-dir = true
#md5sum =
mode = 0644
[nginx]
configure-options =
--with-ipv6
--with-http_ssl_module
--with-mail
--with-mail_ssl_module
--with-ld-opt="-L ${zlib:location}/lib -L ${openssl:location}/lib -L ${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${openssl:location}/lib -L ${libexpat:location}/lib"
--with-cc-opt="-I ${pcre:location}/include -I ${openssl:location}/include -I ${zlib:location}/include -I ${libexpat:location}/include"
--with-http_dav_module
--add-module='${webdav-module:location}'
[template] [template]
......
...@@ -17,7 +17,7 @@ parts += ...@@ -17,7 +17,7 @@ parts +=
# Bubble up the parameters # Bubble up the parameters
[request-runner] [request-runner]
return = url ssh-public-key ssh-url notification-id ip backend_url url ssh_command access_url 1_info 2_info monitor_url IMPORTANT_monitor_info return = url ssh-public-key ssh-url notification-id ip backend_url url ssh_command access_url 1_info 2_info monitor_url IMPORTANT_monitor_info webdav_url
[publish-connection-informations] [publish-connection-informations]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
...@@ -29,6 +29,7 @@ url = ${request-runner:connection-url} ...@@ -29,6 +29,7 @@ url = ${request-runner:connection-url}
ssh_command = ${request-runner:connection-ssh_command} ssh_command = ${request-runner:connection-ssh_command}
monitor_url = ${request-runner:connection-monitor_url} monitor_url = ${request-runner:connection-monitor_url}
IMPORTANT_monitor_info = ${request-runner:connection-IMPORTANT_monitor_info} IMPORTANT_monitor_info = ${request-runner:connection-IMPORTANT_monitor_info}
webdav_url = ${request-runner:connection-webdav_url}
[slap-parameter] [slap-parameter]
# Default parameters for distributed deployment # Default parameters for distributed deployment
......
...@@ -250,13 +250,13 @@ path_tmp = $${directory:tmp}/ ...@@ -250,13 +250,13 @@ path_tmp = $${directory:tmp}/
# Config files # Config files
path_nginx_conf = $${directory:etc}/nginx.conf path_nginx_conf = $${directory:etc}/nginx.conf
# Executables # Executables
bin_nginx = ${nginx:location}/sbin/nginx bin_nginx = ${nginx-webdav:location}/sbin/nginx
bin_launcher = $${directory:bin}/launcher bin_launcher = $${directory:bin}/launcher
# Utils # Utils
path_shell = ${dash:location}/bin/dash path_shell = ${dash:location}/bin/dash
# Misc. # Misc.
etc_dir = $${directory:etc} etc_dir = $${directory:etc}
work_dir = $${slaprunner:working-directory}
[nginx_conf] [nginx_conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
...@@ -361,13 +361,14 @@ return = site_url domain ...@@ -361,13 +361,14 @@ return = site_url domain
[publish-connection-informations] [publish-connection-informations]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
1_info = On your first run, Use "access_url" to setup you account.Then you can use both "url" or "access_url". Or "backend_url" if you want to use ipv6. 1_info = On your first run, Use "access_url" to setup you account.Then you can use both "url" or "access_url". Or "backend_url" if you want to use ipv6. Set your account in the webrunner in order to use webdav.
2_info = In order to set up your account, get the recovery-code from the monitoring interface. Before read the notification on monitor_info 2_info = In order to set up your account, get the recovery-code from the monitoring interface. Before read the notification on monitor_info
backend_url = $${slaprunner:access-url} backend_url = $${slaprunner:access-url}
access_url = $${:url}/login access_url = $${:url}/login
url = https://$${request-frontend:connection-domain} url = https://$${request-frontend:connection-domain}
ssh_command = ssh $${dropbear-runner-server:host} -p $${dropbear-runner-server:port} ssh_command = ssh $${dropbear-runner-server:host} -p $${dropbear-runner-server:port}
monitor_url = $${:url}:$${cgi-httpd-configuration-file:listening-port}/$${deploy-index:filename} monitor_url = $${:url}:$${cgi-httpd-configuration-file:listening-port}/$${deploy-index:filename}
webdav_url = https://$${request-frontend:connection-domain}/share
#--------------------------- #---------------------------
#-- #--
......
...@@ -64,5 +64,18 @@ http { ...@@ -64,5 +64,18 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $http_host; proxy_set_header X-Forwarded-Host $http_host;
} }
location /share {
rewrite ^/share / break;
auth_basic "Restricted";
auth_basic_user_file {{ param_nginx_frontend['etc_dir'] }}/.htpasswd;
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS;
root {{ param_nginx_frontend['work_dir'] }};
create_full_put_path on;
}
} }
} }
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