instance-gitrepo.cfg 3.04 KB
Newer Older
1 2 3 4 5 6 7 8
[buildout]

eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true

parts =
  publish
Antoine Catton's avatar
Antoine Catton committed
9 10 11 12
  httpd
  httpd-conf
  gitweb-conf
  gitweb-cgi
Antoine Catton's avatar
Antoine Catton committed
13
  gitdaemon
Antoine Catton's avatar
Antoine Catton committed
14 15 16
  git-http-backend-cgi
  htpasswd
  git-repos
17 18 19

[publish]
recipe = slapos.cookbook:publish
20 21
url = http://[$${slap-network-information:global-ipv6}]:$${httpd-conf:port}/
user = $${pwgen:user}
22
password = $${pwgen:passwd}
23 24 25 26 27 28 29 30

[httpd]
recipe = slapos.cookbook:wrapper
command-line = ${apache:location}/bin/httpd -DFOREGROUND -f "$${httpd-conf:output}"
output = $${basedirectory:services}/httpd


[httpd-conf]
Antoine Catton's avatar
Antoine Catton committed
31 32
recipe = slapos.recipe.template
url = ${template-httpd-conf:location}/${template-httpd-conf:filename}
33 34
output = $${rootdirectory:etc}/httpd.conf

Antoine Catton's avatar
Antoine Catton committed
35 36 37 38 39 40 41 42
pid-file = $${basedirectory:run}/httpd.pid
error-log = $${basedirectory:log}/httpd-errorlog.log
gitweb-static-dir = ${gitweb:location}/share/gitweb/static/
gitweb-script = $${gitweb-cgi:output}
git-http-backend = $${git-http-backend-cgi:output}
cgid-sock = $${basedirectory:run}/cgid.sock
project-dir = $${git-repos:base-directory}
passwd-file = $${htpasswd:output}
43 44 45 46
port = 8080


[gitweb-conf]
Antoine Catton's avatar
Antoine Catton committed
47 48
recipe = slapos.recipe.template
url = ${template-gitweb-conf:location}/${template-gitweb-conf:filename}
49
output = $${rootdirectory:etc}/gitweb.conf
Antoine Catton's avatar
Antoine Catton committed
50
url-list = http://[$${slap-network-information:global-ipv6}]:$${httpd-conf:port} git://[$${slap-network-information:global-ipv6}]
51 52

[gitweb-cgi]
Antoine Catton's avatar
Antoine Catton committed
53 54
recipe = slapos.recipe.template
url = ${template-gitweb-cgi:location}/${template-gitweb-cgi:filename}
55 56 57 58 59 60 61 62
output = $${rootdirectory:bin}/gitweb.cgi
mode = 700

perl = ${perl:location}/bin/perl
gitweb = ${gitweb:location}/share/gitweb/gitweb.cgi


[git-http-backend-cgi]
Antoine Catton's avatar
Antoine Catton committed
63 64
recipe = slapos.recipe.template
url = ${template-git-http-backend-cgi:location}/${template-git-http-backend-cgi:filename}
65 66 67 68 69
output = $${rootdirectory:bin}/git-http-backend.cgi
mode = 700

githttpbackend = ${git:location}/libexec/git-core/git-http-backend

Antoine Catton's avatar
Antoine Catton committed
70 71 72 73 74 75
[gitdaemon]
recipe = slapos.cookbook:wrapper
ip = $${slap-network-information:global-ipv6}
port = 9418
command-line = ${git:location}/bin/git daemon --export-all --listen=$${:ip} --port=$${:port} --interpolated-path=$${git-repos:base-directory}/%D
output = $${basedirectory:services}/git-daemon
76 77 78 79 80

[htpasswd]
recipe = collective.recipe.cmd
output = $${rootdirectory:etc}/httpd.htpasswd
on_install = true
81
on_update = true
82
cmds =
83
  ${apache:location}/bin/htpasswd -cb $${:output} $${pwgen:user} $${pwgen:passwd}
84 85

[pwgen]
86
recipe = slapos.cookbook:generate.password
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
user = slapos

[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc/
srv = $${buildout:directory}/srv/
var = $${buildout:directory}/var/
bin = $${buildout:directory}/bin/


[basedirectory]
recipe = slapos.cookbook:mkdirectory
services = $${rootdirectory:etc}/run/
run = $${rootdirectory:var}/run/
git-repos = $${rootdirectory:srv}/git/
log = $${rootdirectory:var}/log/


[git-repos]
recipe = slapos.cookbook:gitinit
base-directory = $${basedirectory:git-repos}
repos = $${slap-parameter:repos}
git-binary = ${git:location}/bin/git

[slap-parameter]
title = GitSlap