instance-pbsready.cfg 3.47 KB
Newer Older
1 2 3
[buildout]

parts =
4
  resiliency
5 6 7 8 9 10 11
  urls
  stunnel
  certificate-authority
  ca-stunnel
  logrotate
  logrotate-entry-stunnel
  logrotate-entry-cron
12
  logrotate-entry-equeue
13 14 15 16 17 18
  cron
  cron-entry-logrotate
  sshkeys-authority
  dropbear-server
  sshkeys-dropbear
  dropbear-server-pbs-authorized-key
19
  notifier
20

21 22 23 24 25 26 27
# adds the resiliency script for the bully algorithm
[resiliency]
recipe = slapos.cookbook:addresiliency
script = $${basedirectory:script}
run = $${basedirectory:services}

# sets up an rdiff-backup server (with a dropbear server for ssh)
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
[urls]
ssh-public-key = $${sshkeys-dropbear:public-key-value}
ssh-url = ssh://nobody@[$${dropbear-server:host}]:$${dropbear-server:port}/$${rdiff-backup-server:path}

[sshkeys-directory]
recipe = slapos.cookbook:mkdirectory
requests = $${directory:sshkeys}/requests/
keys = $${directory:sshkeys}/keys/

[sshkeys-authority]
recipe = slapos.cookbook:sshkeys_authority
request-directory = $${sshkeys-directory:requests}
keys-directory = $${sshkeys-directory:keys}
wrapper = $${basedirectory:services}/sshkeys_authority
keygen-binary = ${dropbear:location}/bin/dropbearkey

[sshkeys-dropbear]
<= sshkeys-authority
recipe = slapos.cookbook:sshkeys_authority.request
name = dropbear
type = rsa
executable = $${dropbear-server:wrapper}
public-key = $${dropbear-server:rsa-keyfile}.pub
private-key = $${dropbear-server:rsa-keyfile}
wrapper = $${basedirectory:services}/sshd

[dropbear-server]
recipe = slapos.cookbook:dropbear
host = $${slap-network-information:global-ipv6}
port = 2222
home = $${directory:ssh}
wrapper = $${rootdirectory:bin}/raw_sshd
shell = $${rdiff-backup-server:wrapper}
rsa-keyfile = $${directory:ssh}/server_key.rsa
dropbear-binary = ${dropbear:location}/sbin/dropbear

[dropbear-server-pbs-authorized-key]
<= dropbear-server
recipe = slapos.cookbook:dropbear.add_authorized_key
key = $${slap-parameter:authorized-key}

[rdiff-backup-server]
70
recipe = slapos.cookbook:pbs
71
client = false
72
path = $${directory:backup}
73 74 75
wrapper = $${rootdirectory:bin}/rdiffbackup-server
rdiffbackup-binary = ${buildout:bin-directory}/rdiff-backup

76 77

## Sets up the execution queue for the notifier
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
[logrotate-entry-equeue]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = equeue
log = $${equeue:log}
frequency = daily
rotate-num = 30

[equeue]
recipe = slapos.cookbook:equeue
socket = $${basedirectory:run}/equeue.sock
log = $${basedirectory:log}/equeue.log
database = $${rootdirectory:srv}/equeue.db
wrapper = $${basedirectory:services}/equeue
equeue-binary = ${buildout:bin-directory}/equeue

94 95 96

## notifier.notify adds the [exporter, notifier] to the execution queue
## notifier.notify.callback sets up a callback
97 98 99 100 101 102 103 104 105 106 107 108 109
[notifier]
recipe = slapos.cookbook:notifier
feeds = $${directory:notifier-feeds}
callbacks = $${directory:notifier-callbacks}
id-file = $${rootdirectory:etc}/notifier.id
equeue-socket = $${equeue:socket}
host = $${slap-network-information:global-ipv6}
port = 8080
wrapper = $${basedirectory:services}/notifier
server-binary = ${buildout:bin-directory}/pubsubserver
notifier-binary = ${buildout:bin-directory}/pubsubnotifier


110
[basedirectory]
111 112
script = $${rootdirectory:etc}/script/
services = $${rootdirectory:etc}/run/
113
cache = $${rootdirectory:var}/cache/
114
notifier = $${rootdirectory:etc}/notifier/
115 116

[directory]
117
backup = $${basedirectory:backup}/$${slap-parameter:namebase}
118 119
ssh = $${rootdirectory:etc}/ssh/
sshkeys = $${rootdirectory:srv}/sshkeys
120 121
notifier-feeds = $${basedirectory:notifier}/feeds/
notifier-callbacks = $${basedirectory:notifier}/callbacks/
122
script = $${basedirectory:script}