instance.cfg.in 2.57 KB
Newer Older
1 2 3 4
[buildout]
parts =
  nginx-service
  runTestSuite-instance
5
  publish
6 7 8 9 10
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true

[publish]
11
recipe = slapos.cookbook:publish.serialised
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
nginx = http://[$${nginx-configuration:ip}]:$${nginx-configuration:port}/

[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
bin = $${buildout:directory}/bin
srv = $${buildout:directory}/srv
var = $${buildout:directory}/var
run = $${:var}/run
log = $${:var}/log
varnginx = $${:var}/nginx
scripts = $${:etc}/run
services = $${:etc}/service
www = $${:srv}/www
home = $${:etc}/home
ssl = $${:etc}/ssl
framebuffer = $${:srv}/framebuffer

#################################
31
# Test runner
32 33 34 35 36
#################################
[runTestSuite-instance]
recipe = slapos.recipe.template
url = ${template-runTestSuite:output}
output = $${directory:bin}/runTestSuite
37
buildout-directory = $${buildout:directory}
38 39
mode = 0700

40 41 42 43 44 45 46 47 48
[runTestSuite-config-file]
recipe = slapos.recipe.template:jinja2
rendered = $${directory:etc}/$${:_buildout_section_name_}.json
template = inline:
  $${instance-parameter:configuration._}

#################################
# Xvfb / Firefox
#################################
49
[xvfb-instance]
50 51 52 53 54 55 56 57 58 59 60 61 62
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_}
command-line =
  ${xserver:location}/bin/Xvfb
    $${:display}
    -screen 0 1024x768x24
    -fbdir $${directory:framebuffer}
environment =
  XORG_LOCK_DIR=$${:lock-dir}

display = :0
lock-dir = $${directory:run}

63 64 65 66 67 68 69 70 71

#################################
# Nginx service
#################################
[nginx-service]
recipe = slapos.recipe.template
url = ${template-nginx-service:output}
output = $${directory:services}/nginx
mode = 0700
72
virtual-depends =
73 74 75 76 77 78 79 80 81
  $${nginx-configuration:ip}

[nginx-configuration]
recipe = slapos.recipe.template
url = ${template-nginx-configuration:output}
output = $${directory:etc}/nginx.cfg
mode = 0600
access_log = $${directory:log}/nginx-access.log
error_log = $${directory:log}/nginx-error.log
Ivan Tyagov's avatar
Ivan Tyagov committed
82
ip = $${instance-parameter:ipv6-random}
83 84 85 86 87 88 89 90
port = 9443
ssl_key = $${directory:ssl}/nginx.key
ssl_csr = $${directory:ssl}/nginx.csr
ssl_crt = $${directory:ssl}/nginx.crt

#################################
# SlapOS service
#################################
Ivan Tyagov's avatar
Ivan Tyagov committed
91
[instance-parameter]
92 93 94 95 96
recipe = slapos.cookbook:slapconfiguration
computer = $${slap_connection:computer_id}
partition = $${slap_connection:partition_id}
url = $${slap_connection:server_url}
key = $${slap_connection:key_file}
Ivan Tyagov's avatar
Ivan Tyagov committed
97
cert = $${slap_connection:cert_file}
98
configuration._ = {}