instance-validator.cfg.in 2.23 KB
Newer Older
1 2 3
###############################
# Instanciate nvu
###############################
4
[basedirectory]
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
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
# scripts = $${:etc}/run
services = $${:etc}/service
# tomcat directories
catalina_base = $${:var}/vnu
catalina_logs = $${:catalina_base}/logs
catalina_temp = $${:catalina_base}/temp
catalina_webapps = $${:catalina_base}/webapps
catalina_work = $${:catalina_base}/work
catalina_conf = $${:catalina_base}/conf

#################################
# Tomcat service
#################################
25 26 27 28 29 30 31 32 33 34 35 36 37 38
[keystore]
recipe = plone.recipe.command
command =
  ${java-re-8-output:keytool} \
    -genkeypair \
    -alias "tomcat" \
    -keyalg RSA \
    -keypass "$${:pass}" \
    -dname "CN=Web Server,OU=Unit,O=Organization,L=City,S=State,C=Country" \
    -keystore "$${:file}" \
    -storepass "$${:pass}"
file = $${basedirectory:catalina_base}/.keystore
pass = insecure

39 40 41
[tomcat-service]
recipe = slapos.recipe.template
url = ${template-tomcat-service:output}
42
output = $${basedirectory:services}/tomcat
43 44 45 46 47 48 49
mode = 0700
virtual-depends = 
  $${tomcat-configuration:ip}

[tomcat-configuration]
recipe = slapos.recipe.template
url = ${template-tomcat-configuration:output}
50
output = $${basedirectory:catalina_conf}/server.xml
51 52 53
mode = 0600
ip = $${slap-network-information:global-ipv6}
port = 8899
54
scheme = https
55 56

[tomcat-listen-promise]
57 58 59 60 61
<= monitor-promise-base
module = check_port_listening
name = tomcat_listen.py
config-hostname = $${tomcat-configuration:ip}
config-port = $${tomcat-configuration:port}
62 63 64 65 66 67

#################################
# Slapos publish
#################################
[publish-url]
recipe = slapos.cookbook:publish
68
<= monitor-publish
69
vnu-url = $${tomcat-configuration:scheme}://[$${tomcat-configuration:ip}]:$${tomcat-configuration:port}/
70 71 72

[monitor-instance-parameter]
monitor-httpd-port = 8333
73 74 75

# Add parts generated by template
[buildout]
76 77
extends =
  ${monitor-template:rendered}
78 79 80 81
parts =
  publish-url
  tomcat-service
  tomcat-listen-promise
82
  monitor-base
83 84 85 86

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