Use one common part to request pbs

Current way was expecting return values that are not present in slaves
parent 6758aaf9
......@@ -37,11 +37,8 @@ parts =
[request-pull-backup-server]
<= slap-connection
recipe = slapos.cookbook:request
<= request-pbs-common
name = PBS (Pull Backup Server)
software-url = ${slap-connection:software-release-url}
software-type = pull-backup
return = ssh-key notification-url feeds-url
slave = false
......@@ -113,11 +110,8 @@ config-authorized-key = ${request-pull-backup-server:connection-ssh-key}
config-proxy-url = ${publish-connection-informations:url}
[request-pull-backup-server-apache-1]
<= request-pull-backup-server
slap-connection
recipe = slapos.cookbook:request
<= request-pbs-common
name = PBS pulling from Apache 1
software-url = ${slap-connection:software-release-url}
config = url name type server-key notify notification-id frequency
config-url = ssh://nobody@[${dropbear-server:host}]:${dropbear-server:port}/${rdiff-backup-server:path}
config-name = ${slap-connection:computer-id}-${slap-connection:partition-id}-apache
......@@ -129,11 +123,8 @@ config-frequency = 30 * * * *
slave = true
[request-pull-backup-server-apache-2]
<= request-pull-backup-server
slap-connection
recipe = slapos.cookbook:request
<= request-pbs-common
name = PBS pulling from Apache 2
software-url = ${slap-connection:software-release-url}
config = url name type server-key notify notification-id frequency
config-url = ssh://nobody@[${dropbear-server:host}]:${dropbear-server:port}/${rdiff-backup-server:path}
config-name = ${slap-connection:computer-id}-${slap-connection:partition-id}-apache
......@@ -146,11 +137,8 @@ slave = true
[request-pull-backup-server-apache-backup-1]
<= request-pull-backup-server
slap-connection
recipe = slapos.cookbook:request
<= request-pbs-common
name = PBS pushing to ${request-apache-backup-1:name}
software-url = ${slap-connection:software-release-url}
config = url name type server-key on-notification
config-url = ${request-apache-backup-1:connection-ssh-url}
config-name = ${request-pull-backup-server-apache-1:config-name}
......@@ -160,11 +148,8 @@ config-on-notification = ${request-pull-backup-server:connection-feeds-url}${req
slave = true
[request-pull-backup-server-apache-backup-2]
<= request-pull-backup-server
slap-connection
recipe = slapos.cookbook:request
<= request-pbs-common
name = PBS pushing to ${request-apache-backup-2:name}
software-url = ${slap-connection:software-release-url}
config = url name type server-key on-notification
config-url = ${request-apache-backup-2:connection-ssh-url}
config-name = ${request-pull-backup-server-apache-2:config-name}
......
......@@ -108,20 +108,22 @@ config-number = {{id}}
## WARNING : SLAVES ARE ALLOCATED AT RANDOM, THIS NEEDS TO BE FIXED.
{% for id in range(1,nbbackup|int) %}
[request-pbs-{{namebase}}-{{id}}]
[request-pbs-common]
<= slap-connection
recipe = slapos.cookbook:request
name = PBS ({{namebase}} / {{id}})
software-url = ${slap-connection:software-release-url}
software-type = pull-backup
{% for id in range(1,nbbackup|int) %}
[request-pbs-{{namebase}}-{{id}}]
<= request-pbs-common
name = PBS ({{namebase}} / {{id}})
return = ssh-key notification-url feeds-url
slave = false
[request-pull-backup-server-{{namebase}}-{{id}}]
<= request-pbs-{{namebase}}-{{id}}
slap-connection
<= request-pbs-common
name = PBS {{id}} pulling from ${request-{{namebase}}:name}
config = url name type server-key on-notification notify notification-id title
config-url = ${request-{{namebase}}:connection-ssh-url}
......@@ -135,8 +137,7 @@ config-title = Pulling from {{namebase}}
slave = true
[request-pull-backup-server-{{namebase}}-backup-{{id}}]
<= request-pbs-{{namebase}}-{{id}}
slap-connection
<= request-pbs-common
name = PBS pushing on ${request-{{namebase}}-pseudo-replicating-{{id}}:name}
config = url name type server-key on-notification notify notification-id title
config-url = ${request-{{namebase}}-pseudo-replicating-{{id}}:connection-ssh-url}
......
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