Commit e4c1d202 authored by Alain Takoudjou's avatar Alain Takoudjou

Update Ajaxplorer, Add resiliency

parent b2afb2fe
# This file is responsible of three things:
# 1/ Act as "Apache exporter"
# 2/ Act as "Mariadb backup infrastructure requester"
# 3/ Act as "Apache" instance
{% import 'parts' as parts %}
{% import 'replicated' as replicated %}
[buildout]
extends = {{templateapache}}
{{templatepbsreadyexport}}
parts +=
{{ parts.replicate("mariadb", "3") }}
# Repeating parts from instance-apache-php.
# XXX-Cedric: how to simplify this?
certificate-authority
ca-stunnel
logrotate
logrotate-entry-apache
logrotate-entry-stunnel
cron
cron-entry-logrotate
promise
frontend-ajaxupload-promise
frontend-website2-promise
frontend-website-promise
# content-promise
configure-ajaxplorer
publish-connection-informations
{{ replicated.replicate("mariadb", "3", "mariadb-export", "mariadb-import") }}
# Nothing to do for the exporter. This wrapper is intended
# to produce the "dump" files that have to be backed up.
# So, in case of binary DB data, we would back up the ASCII dump
# files, or a similar data format that can be restored on any machine
# (i.e. postgres 'custom')
# In the case of an httpd instance, the src/www directory can be directly
# pulled from the PBS, we don't need to prepare anything.
[exporter]
wrapper = /bin/true
# State that we want to backup srv/www directory, not srv/backup.
# XXX-Cedric: works well, but doesn't work with big data.
[rdiff-backup-server]
path = ${directory:www}
# Add "exporter" parameters to list of published connection parameters
[publish-connection-informations]
# XXX-Cedric: Long term goal: could be a recipe that requests an instance and
# bubbles ALL
# parameters of the requested instance. Requirement: aggregated publish.
<= resilient-publish-connection-parameter
# XXX-Cedric: resilient overwrites what's returned from request-mariadb
# XXX-Cedric: change the request method to return everything from
# getConnectionParameterDict()
[request-mariadb]
return = ssh-public-key ssh-url notification-id ip url
\ No newline at end of file
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
extends = ${pbsready-import:output}
[directory]
srv = $${buildout:directory}/srv
www = $${:srv}/www/
# Nothing to do for the import. Just dummy part that does nothing.
# For httpd instance, PBS will directly push data to srv/www.
# XXX-Cedric: write a real backup system.
[importer]
wrapper = /bin/true
# State that we want to push to srv/www directory, not srv/backup.
[rdiff-backup-server]
path = $${directory:www}
\ No newline at end of file
[buildout]
parts =
certificate-authority
ca-stunnel
logrotate
logrotate-entry-apache
logrotate-entry-stunnel
cron
cron-entry-logrotate
promise
frontend-ajaxupload-promise
frontend-website2-promise
frontend-website-promise
# content-promise
configure-ajaxplorer
publish-connection-informations
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
#----------------
#--
#-- Creation of all needed directories.
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
var = $${buildout:directory}/var
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
tmp = $${buildout:directory}/tmp
[basedirectory]
recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log
services = $${rootdirectory:etc}/service
run = $${rootdirectory:var}/run
backup = $${rootdirectory:srv}/backup
promises = $${rootdirectory:etc}/promise
[directory]
recipe = slapos.cookbook:mkdirectory
cron-entries = $${rootdirectory:etc}/cron.d
crontabs = $${rootdirectory:etc}/crontabs
cronstamps = $${rootdirectory:etc}/cronstamps
ca-dir = $${rootdirectory:srv}/ssl
httpd-log = $${basedirectory:log}/apache
php-ini-dir = $${rootdirectory:etc}/php
tmp-php = $${rootdirectory:tmp}/php
logrotate-entries = $${rootdirectory:etc}/logrotate.d
logrotate-backup = $${basedirectory:backup}/logrotate
report = $${rootdirectory:etc}/report
stunnel-conf = $${rootdirectory:etc}/stunnel
xml-report = $${rootdirectory:var}/xml_report
www = $${rootdirectory:srv}/www/
[cadirectory]
recipe = slapos.cookbook:mkdirectory
requests = $${directory:ca-dir}/requests
private = $${directory:ca-dir}/private
certs = $${directory:ca-dir}/certs
newcerts = $${directory:ca-dir}/newcerts
crl = $${directory:ca-dir}/crl
#----------------
#--
#-- Deploy cron.
[cron]
recipe = slapos.cookbook:cron
dcrond-binary = ${dcron:location}/sbin/crond
cron-entries = $${directory:cron-entries}
crontabs = $${directory:crontabs}
cronstamps = $${directory:cronstamps}
catcher = $${cron-simplelogger:wrapper}
binary = $${basedirectory:services}/crond
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = $${rootdirectory:bin}/cron_simplelogger
log = $${basedirectory:log}/crond.log
#----------------
#--
#-- Deploy logrotate.
[cron-entry-logrotate]
<= cron
recipe = slapos.cookbook:cron.d
name = logrotate
frequency = 0 0 * * *
command = $${logrotate:wrapper}
[logrotate]
recipe = slapos.cookbook:logrotate
# Binaries
logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
gzip-binary = ${gzip:location}/bin/gzip
gunzip-binary = ${gzip:location}/bin/gunzip
# Directories
wrapper = $${rootdirectory:bin}/logrotate
conf = $${rootdirectory:etc}/logrotate.conf
logrotate-entries = $${directory:logrotate-entries}
backup = $${directory:logrotate-backup}
state-file = $${rootdirectory:srv}/logrotate.status
#----------------
#--
#-- Deploy stunnel.
[stunnel]
recipe = slapos.cookbook:stunnel
client = true
stunnel-binary = ${stunnel:location}/bin/stunnel
remote-host = $${mariadb-urlparse:host}
remote-port = $${mariadb-urlparse:port}
local-host = $${slap-network-information:local-ipv4}
local-port = 3306
log-file = $${basedirectory:log}/stunnel.log
config-file = $${directory:stunnel-conf}/stunnel.conf
key-file = $${directory:stunnel-conf}/stunnel.key
cert-file = $${directory:stunnel-conf}/stunnel.crt
pid-file = $${basedirectory:run}/stunnel.pid
wrapper = $${rootdirectory:bin}/raw_stunnel
post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate
[logrotate-entry-stunnel]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = stunnel
log = $${stunnel:log-file}
frequency = daily
rotate-num = 30
notifempty = true
create = true
post = $${stunnel:post-rotate-script}
#----------------
#--
#-- Certificate stuff.
[certificate-authority]
recipe = slapos.cookbook:certificate_authority
openssl-binary = ${openssl:location}/bin/openssl
ca-dir = $${directory:ca-dir}
requests-directory = $${cadirectory:requests}
wrapper = $${basedirectory:services}/ca
ca-private = $${cadirectory:private}
ca-certs = $${cadirectory:certs}
ca-newcerts = $${cadirectory:newcerts}
ca-crl = $${cadirectory:crl}
[ca-stunnel]
<= certificate-authority
recipe = slapos.cookbook:certificate_authority.request
executable = $${stunnel:wrapper}
wrapper = $${basedirectory:services}/stunnel
key-file = $${stunnel:key-file}
cert-file = $${stunnel:cert-file}
#----------------
#--
#-- Request MariaDB instance and parse its URL.
[request-mariadb]
<= slap-connection
recipe = slapos.cookbook:request
name = MariaDB
software-url = $${slap-connection:software-release-url}
software-type = mariadb
return = url
sla = computer_guid
sla-computer_guid = $${slap-connection:computer-id}
[mariadb-urlparse]
recipe = slapos.cookbook:urlparse
url = $${request-mariadb:connection-url}
#----------------
#--
#-- Deploy Apache + PHP application.
[httpd-conf]
recipe = slapos.recipe.template
url = ${template-httpd-conf:location}/${template-httpd-conf:filename}
output = $${rootdirectory:etc}/apache.conf
mode = 0600
document_root = $${rootdirectory:srv}/www/
public_html = $${:document_root}data/files/public_html/
public_html2 = $${:document_root}data/files/public_html2/
pid_file = $${basedirectory:run}/apache.pid
lock_file = $${basedirectory:run}/apache.lock
ip = $${slap-network-information:global-ipv6}
port = 8080
port2 = 8070
port3 = 8090
error_log = $${directory:httpd-log}/error.log
access_log = $${directory:httpd-log}/access.log
php_ini_dir = $${directory:php-ini-dir}
php_lib_path = ${apache-php:location}/lib/php
# Deploy Apache + PHP application
[apache-php]
recipe = slapos.cookbook:apachephp
source = ${application:location}
template =
configuration =
htdocs = $${directory:www}
pid-file = $${basedirectory:run}/apache.pid
lock-file = $${basedirectory:run}/apache.lock
ip = $${httpd-conf:ip}
port = $${httpd-conf:port}
url = http://[$${:ip}]:$${:port}/
error-log = $${directory:httpd-log}/error.log
access-log = $${directory:httpd-log}/access.log
php-ini-dir = $${directory:php-ini-dir}
tmp-dir = $${directory:tmp-php}
wrapper = $${basedirectory:services}/apache
httpd-binary = ${apache:location}/bin/httpd
default-conf = false
httpd-conf = $${httpd-conf:output}
mysql-username = $${mariadb-urlparse:username}
mysql-password = $${mariadb-urlparse:password}
mysql-database = $${mariadb-urlparse:path}
mysql-host = $${stunnel:local-host}
mysql-port = $${stunnel:local-port}
environment =
PATH=${apache-php:location}/bin:${imagemagick:location}/bin
[configure-ajaxplorer]
recipe = plone.recipe.command
convert = ${imagemagick:location}/bin/convert
command = mkdir -p $${httpd-conf:public_html} && \
mkdir -p $${httpd-conf:public_html2} && \
sed -i 's#/usr/bin/convert#$${:convert}#' $${apache-php:htdocs}/plugins/editor.imagick/manifest.xml && \
sed -i 's#enabled="false"#enabled="true"#' $${apache-php:htdocs}/plugins/editor.imagick/manifest.xml
update-command = $${:command}
[logrotate-entry-apache]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = apache
log = $${apache-php:error-log} $${apache-php:access-log}
frequency = daily
rotate-num = 30
sharedscripts = true
notifempty = true
create = true
#----------------
#--
#-- Request frontends.
[request-frontend]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = Frontend-public_html
software-url = $${slap-parameter:frontend-software-url}
slave = true
config = url custom_domain
config-url = http://[$${apache-php:ip}]:$${apache-php:port}/
return = site_url
config-custom_domain = $${slap-parameter:site-domain}
[request-frontend-ajaxupload]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = Frontend-FileManager
software-url = $${slap-parameter:frontend-software-url}
slave = true
config = url custom_domain
config-url = http://[$${httpd-conf:ip}]:$${httpd-conf:port2}/
return = site_url
config-custom_domain = $${slap-parameter:filemanager-domain}
[request-frontend2]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = Frontend-public_html2
software-url = $${slap-parameter:frontend-software-url}
slave = true
config = url custom_domain
config-url = http://[$${httpd-conf:ip}]:$${httpd-conf:port3}/
return = site_url
config-custom_domain = $${slap-parameter:site2-domain}
#----------------
#--
#-- Deploy slapmonitor.
#[slapmonitor]
#recipe = slapos.cookbook:slapmonitor
#pid-file = $${basedirectory:run}/apache.pid
#database-path = $${basedirectory:log}/slapmonitor.db
#slapmonitor-path = ${buildout:bin-directory}/slapmonitor
#path = $${basedirectory:services}/slapmonitor
#
#[slapmonitor-xml]
#recipe = slapos.cookbook:slapmonitor-xml
#database-path = $${basedirectory:log}/slapmonitor.db
#slapmonitor-xml-path = ${buildout:bin-directory}/slapmonitor-xml
#path = $${directory:report}/slapmonitor-xml
#----------------
#--
#-- Publish instance parameters.
[publish-connection-informations]
recipe = slapos.cookbook:publish
public_html_backend = $${apache-php:url}
public_html = $${request-frontend:connection-site_url}
public_html2_backend = http://[$${apache-php:ip}]:$${httpd-conf:port3}
public_html2 = $${request-frontend2:connection-site_url}
fileManager_backend = http://[$${apache-php:ip}]:$${httpd-conf:port2}
fileManager = $${request-frontend-ajaxupload:connection-site_url}
mysql_username = $${apache-php:mysql-username}
mysql_password = $${apache-php:mysql-password}
mysql_database = $${apache-php:mysql-database}
mysql_host = $${apache-php:mysql-host}
mysql_port = $${apache-php:mysql-port}
#----------------
#--
#-- Deploy promises scripts.
[promise]
recipe = slapos.cookbook:check_port_listening
path = $${basedirectory:promises}/apache
hostname = $${apache-php:ip}
port = $${apache-php:port}
[frontend-website-promise]
recipe = slapos.cookbook:check_url_available
path = $${basedirectory:promises}/frontend-website
url = $${request-frontend:connection-site_url}
dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl
[frontend-website2-promise]
recipe = slapos.cookbook:check_url_available
path = $${basedirectory:promises}/frontend-website2
url = $${request-frontend2:connection-site_url}
dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl
[frontend-ajaxupload-promise]
recipe = slapos.cookbook:check_url_available
path = $${basedirectory:promises}/frontend-ajaxupload
url = $${request-frontend-ajaxupload:connection-site_url}
dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl
[content-promise]
recipe = slapos.cookbook:check_page_content
path = $${basedirectory:promises}/content
url = $${request-frontend-ajaxupload:connection-site_url}
match = AjaXplorer
dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl
[slap-parameter]
# Default value if no domain is specified
site-domain =
filemanager-domain =
site2-domain =
frontend-software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
# Default value if no ssh parameter is specified
logbox-ip =
logbox-port =
logbox-user =
logbox-passwd =
# vim: set ft=cfg:
{% import 'parts' as parts %}
{% import 'replicated' as replicated %}
[buildout]
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
# += because we need to take up parts (like instance-custom, slapmonitor etc) from the profile we extended
parts +=
{{ parts.replicate("apache", "3") }}
publish-connection-informations
{{ replicated.replicate("apache", "3", "apache-export", "apache-import") }}
# Bubble up the parameters
[request-apache]
return = url ssh-public-key ssh-url notification-id ip public_html_backend public_html public_html2_backend public_html2 fileManager_backend fileManager mysql_username mysql_password mysql_database mysql_host mysql_port
# XXX: hardcoded values
config = filemanager-domain site-domain site2-domain frontend-software-url number authorized-key notify ip-list namebase mariadb1-computer-guid pbs-mariadb1-computer-guid mariadb2-computer-guid pbs-mariadb2-computer-guid mariadb3-computer-guid pbs-mariadb3-computer-guid
config-mariadb1-computer-guid = ${slap-parameter:mariadb1-computer-guid}
config-pbs-mariadb1-computer-guid = ${slap-parameter:pbs-mariadb1-computer-guid}
config-mariadb2-computer-guid = ${slap-parameter:mariadb2-computer-guid}
config-pbs-mariadb2-computer-guid = ${slap-parameter:pbs-mariadb2-computer-guid}
config-mariadb3-computer-guid = ${slap-parameter:mariadb3-computer-guid}
config-pbs-mariadb3-computer-guid = ${slap-parameter:pbs-mariadb3-computer-guid}
config-filemanager-domain = ${slap-parameter:filemanager-domain}
config-site-domain = ${slap-parameter:site-domain}
config-site2-domain = ${slap-parameter:site2-domain}
config-frontend-software-url = ${slap-parameter:frontend-software-url}
[publish-connection-informations]
recipe = slapos.cookbook:publish
public_html_backend = ${request-apache:connection-public_html_backend}
public_html = ${request-apache:connection-public_html}
public_html2_backend = ${request-apache:connection-public_html2_backend}
public_html2 = ${request-apache:connection-public_html2}
fileManager_backend = ${request-apache:connection-fileManager_backend}
fileManager = ${request-apache:connection-fileManager}
mysql_username = ${request-apache:connection-mysql_username}
mysql_password = ${request-apache:connection-mysql_password}
mysql_database = ${request-apache:connection-mysql_database}
mysql_host = ${request-apache:connection-mysql_host}
mysql_port = ${request-apache:connection-mysql_port}
[slap-parameter]
# Default parameters for distributed deployment
# I.e state "backup1 of maria should go there, ..."
# XXX-Cedric: Hardcoded number of backups. Should be dynamically generated.
mariadb1-computer-guid =
pbs-mariadb1-computer-guid =
mariadb2-computer-guid =
pbs-mariadb2-computer-guid =
mariadb3-computer-guid =
pbs-mariadb3-computer-guid =
# XXX-Cedric: Hardcoded parameters. Should be dynamically generated.
# Default value if no domain is specified
site-domain =
filemanager-domain =
site2-domain =
frontend-software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
...@@ -8,5 +8,15 @@ offline = true ...@@ -8,5 +8,15 @@ offline = true
[switch_softwaretype] [switch_softwaretype]
recipe = slapos.cookbook:softwaretype recipe = slapos.cookbook:softwaretype
default = ${instance-apache:output} default = ${instance-apache-php:output}
mariadb = ${instance-mariadb:output} resilient = ${instance-resilient:rendered}
\ No newline at end of file mariadb = ${instance-mariadb:output}
mariadb-import = ${instance-mariadb-import:output}
mariadb-export = ${instance-mariadb-export:output}
apache-import = ${instance-apache-import:output}
apache-export = ${instance-apache-export:rendered}
#frozen creates a syntax error, meaning it can keep its data.
#It's dirty as hell, it needs to be replaced.
frozen = ${instance-frozen:output}
pull-backup = ${template-pull-backup:output}
\ No newline at end of file
...@@ -5,61 +5,148 @@ develop = ...@@ -5,61 +5,148 @@ develop =
parts = parts =
slapos-cookbook slapos-cookbook
subversion
apache-php apache-php
instance mariadb
instance-apache imagemagick
instance-mariadb mydumper
mysql-python
rdiff-backup
dropbear
template-httpd-conf template-httpd-conf
application application
instance-eggs
website1-template website1-template
website2-template website2-template
instance
instance-apache-php
instance-mariadb
#Dev with repository
slapos.cookbook-repository slapos.cookbook-repository
check-recipe check-recipe
#Contains the importer and exporter recipes for mariadb
instance-mariadb-import
instance-mariadb-export
#Contains the importer and exporter recipes for apache
instance-apache-import
instance-apache-export
extends = extends =
../../stack/slapos.cfg
../../component/apache/buildout.cfg ../../component/apache/buildout.cfg
../../component/apache-php/buildout.cfg ../../component/apache-php/buildout.cfg
../../component/curl/buildout.cfg
../../component/dropbear/buildout.cfg
../../component/logrotate/buildout.cfg ../../component/logrotate/buildout.cfg
../../component/subversion/buildout.cfg
../../component/gzip/buildout.cfg ../../component/gzip/buildout.cfg
../../component/glib/buildout.cfg
../../component/dcron/buildout.cfg ../../component/dcron/buildout.cfg
../../component/dash/buildout.cfg ../../component/dash/buildout.cfg
../../component/stunnel/buildout.cfg ../../component/stunnel/buildout.cfg
../../component/mariadb/buildout.cfg
../../component/mydumper/buildout.cfg
../../component/mysql-python/buildout.cfg
../../component/lxml-python/buildout.cfg ../../component/lxml-python/buildout.cfg
../../component/imagemagick/buildout.cfg
../../component/perl/buildout.cfg
../../component/rdiff-backup/buildout.cfg
../../component/sqlite3/buildout.cfg
../../component/zlib/buildout.cfg
../../component/git/buildout.cfg ../../component/git/buildout.cfg
../../stack/resilient/buildout.cfg
../../stack/slapos.cfg
[instance-eggs]
recipe = zc.recipe.egg
eggs =
plone.recipe.command
${lxml-python:egg}
[instance] [instance]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644 mode = 0644
md5sum = 4c7936accb3658871b635158198b7905 md5sum = f9ee461a59e83592c19581dc9efc7dd9
[instance-apache] [instance-apache-php]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apachephp.cfg url = ${:_profile_base_location_}/instance-apachephp.cfg.in
output = ${buildout:directory}/template-apachephp.cfg output = ${buildout:directory}/template-apachephp.cfg
md5sum = ef5c61127a21c016014021477d1791e3 md5sum = 0c574497ad00ef2e1ce684ceccda3f5e
mode = 0644
[instance-apache-import]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apache-import.cfg.in
output = ${buildout:directory}/instance-apache-import.cfg
#md5sum = f1dc2a71d362b5d2d36481ffefdd2293
mode = 0644
[instance-apache-export]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance-apache-export.cfg.jinja2
rendered = ${buildout:directory}/instance-apache-export.cfg
context = key templateapache instance-apache-php:output
key templatepbsreadyexport pbsready-export:output
import-list = file parts template-parts:destination
file replicated template-replicated:destination
#md5sum = 24c5d0db063e5343a3cb0db9d5fbc738
mode = 0644
[instance-resilient]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance-resilient.cfg.jinja2
rendered = ${buildout:directory}/instance-resilient.cfg
test = ${template-parts:destination}
context = key buildout buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
import-list = file parts template-parts:destination
file replicated template-replicated:destination
md5sum = 7b7b06d35b220e466da576ffa380bc93
mode = 0644 mode = 0644
[instance-mariadb] [instance-mariadb]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/../../stack/lamp/mariadb/instance-mariadb.cfg.in url = ${:_profile_base_location_}/../../stack/lamp/mariadb/instance-mariadb.cfg.in
output = ${buildout:directory}/template-mariadb.cfg output = ${buildout:directory}/template-mariadb.cfg
#md5sum
mode = 0644
[instance-mariadb-import]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/../../stack/lamp/mariadb/instance-mariadb-import.cfg.in
output = ${buildout:directory}/instance-mariadb-import.cfg
#md5sum = faf5826f4b27e362f34ad17db54b8c9a
mode = 0644
[instance-mariadb-export]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/../../stack/lamp/mariadb/instance-mariadb-export.cfg.in
output = ${buildout:directory}/instance-mariadb-export.cfg
#md5sum = 0352896921ca1766b64f0b54f0f8c27e
mode = 0644 mode = 0644
[application] [application]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
url = http://garr.dl.sourceforge.net/project/ajaxplorer/ajaxplorer/dev-channel/4.3.4/ajaxplorer-core-4.3.4.tar.gz url = http://freefr.dl.sourceforge.net/project/ajaxplorer/ajaxplorer/stable-channel/5.0.1/ajaxplorer-core-5.0.1.tar.gz
md5sum = 2f2ff8bda7bbe841ef0e870c724eb74f md5sum = 805cd6a473b3d3516388450afc5a0e6a
strip-top-level-dir = true strip-top-level-dir = true
[website] [website]
recipe = z3c.recipe.mkdir recipe = z3c.recipe.mkdir
path1 = ${application:location}/data/files/website path1 = ${application:location}/data/files/public_html
path2 = ${application:location}/data/files/website2 path2 = ${application:location}/data/files/public_html2
paths = paths =
${:path1} ${:path1}
${:path2} ${:path2}
...@@ -68,22 +155,26 @@ paths = ...@@ -68,22 +155,26 @@ paths =
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/templates/index.html.in url = ${:_profile_base_location_}/templates/index.html.in
output = ${website:path1}/index.html output = ${website:path1}/index.html
md5sum = c5695762361b801c284ee23a150cd1f1 md5sum = 979c36dc7dbf9d1e89818060f32a39b7
mode = 0644 mode = 0644
folder = public_html
[website2-template] [website2-template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/templates/index.html.in url = ${:_profile_base_location_}/templates/index.html.in
output = ${website:path2}/index.html output = ${website:path2}/index.html
md5sum = c5695762361b801c284ee23a150cd1f1 md5sum = 979c36dc7dbf9d1e89818060f32a39b7
mode = 0644 mode = 0644
folder = public_html2
[template-httpd-conf] [template-httpd-conf]
recipe = slapos.recipe.download recipe = slapos.recipe.download
url = ${:_profile_base_location_}/templates/${:filename} url = ${:_profile_base_location_}/templates/${:filename}
mode = 0644 mode = 0644
filename = apache.conf.in filename = apache.conf.in
md5sum = 6788381fadd8ca96f892d33df3163da0 md5sum = ffb1105e2620e9e9f1f45093b67a3df8
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
# Local development # Local development
...@@ -216,51 +307,46 @@ signature-certificate-list = ...@@ -216,51 +307,46 @@ signature-certificate-list =
-----END CERTIFICATE----- -----END CERTIFICATE-----
[versions] [versions]
#Error: Couldn't install: lxml 3.1.2 Jinja2 = 2.6
lxml = 3.1.1 Werkzeug = 0.9.1
# Numpy 1.7.0 doesn't install well
numpy = 1.6.2
# websockify 0.4.1 doesn't install well
websockify = 0.3.0
setuptools = 0.6c12dev-r88846
Jinja2 = 2.7
MarkupSafe = 0.18
Werkzeug = 0.8.3
buildout-versions = 1.7 buildout-versions = 1.7
cliff = 1.4
cmd2 = 0.6.5.1
inotifyx = 0.2.0-1 inotifyx = 0.2.0-1
itsdangerous = 0.22
lxml = 3.2.1
meld3 = 0.6.10 meld3 = 0.6.10
netaddr = 0.7.10 netaddr = 0.7.10
netifaces = 0.8-1
plone.recipe.command = 1.1 plone.recipe.command = 1.1
prettytable = 0.7.2
pytz = 2013b pytz = 2013b
rdiff-backup = 1.0.5
requests = 1.2.3
slapos.core = 0.35.1 slapos.core = 0.35.1
slapos.recipe.build = 0.11.6 slapos.recipe.build = 0.11.6
slapos.recipe.cmmi = 0.1.1 slapos.recipe.cmmi = 0.1.1
slapos.recipe.download = 1.0.dev-r4053 slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.4.2 slapos.recipe.template = 2.4.2
supervisor = 3.0b2
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
z3c.recipe.mkdir = 0.5 z3c.recipe.mkdir = 0.6
# Required by: # Required by:
# slapos.core==0.35.1 # slapos.core==0.35.1
Flask = 0.9 Flask = 0.10.1
# Required by: # Required by:
# slapos.cookbook==0.78.1.dev # slapos.cookbook==0.78.2.dev
lock-file = 2.0 lock-file = 2.0
# Required by: # Required by:
# slapos.core==0.35.1 # slapos.core==0.35.1
netifaces = 0.8-1 pyflakes = 0.7.3
# Required by:
# slapos.core==0.35.1
pyflakes = 0.7.2
# Required by: # Required by:
# slapos.core==0.35.1 # plone.recipe.command==1.1
supervisor = 3.0b1 setuptools = 0.8
# Required by: # Required by:
# slapos.core==0.35.1 # slapos.core==0.35.1
...@@ -268,4 +354,4 @@ unittest2 = 0.5.1 ...@@ -268,4 +354,4 @@ unittest2 = 0.5.1
# Required by: # Required by:
# slapos.core==0.35.1 # slapos.core==0.35.1
zope.interface = 4.0.5 zope.interface = 4.0.5
\ No newline at end of file
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
# Basic server configuration # Basic server configuration
PidFile "${:pid_file}" PidFile "${:pid_file}"
Listen ${:ip}:8070 Listen ${:ip}:${:port}
Listen ${:ip}:8080 Listen ${:ip}:${:port2}
Listen ${:ip}:8090 Listen ${:ip}:${:port3}
PHPINIDir ${:php_ini_dir} PHPINIDir ${:php_ini_dir}
ServerAdmin someone@email ServerAdmin someone@email
TypesConfig conf/mime.types TypesConfig conf/mime.types
...@@ -21,10 +21,10 @@ LogFormat "%h %{REMOTE_USER}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Ag ...@@ -21,10 +21,10 @@ LogFormat "%h %{REMOTE_USER}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Ag
LogFormat "%h %{REMOTE_USER}i %l %u %t \"%r\" %>s %b" common LogFormat "%h %{REMOTE_USER}i %l %u %t \"%r\" %>s %b" common
CustomLog "${:access_log}" common CustomLog "${:access_log}" common
NameVirtualHost ${:ip}:8090 NameVirtualHost ${:ip}:${:port2}
NameVirtualHost ${:ip}:8080 NameVirtualHost ${:ip}:${:port}
NameVirtualHost ${:ip}:8070 NameVirtualHost ${:ip}:${:port3}
<VirtualHost ${:ip}:8070> <VirtualHost ${:ip}:${:port2}>
#ServerName www.example.com #ServerName www.example.com
# Directory protection # Directory protection
...@@ -45,7 +45,7 @@ NameVirtualHost ${:ip}:8070 ...@@ -45,7 +45,7 @@ NameVirtualHost ${:ip}:8070
</VirtualHost> </VirtualHost>
<VirtualHost ${:ip}:8080> <VirtualHost ${:ip}:${:port}>
#ServerName www.example.com #ServerName www.example.com
# Directory protection # Directory protection
...@@ -55,18 +55,18 @@ NameVirtualHost ${:ip}:8070 ...@@ -55,18 +55,18 @@ NameVirtualHost ${:ip}:8070
Require all denied Require all denied
</Directory> </Directory>
<Directory ${:document_root}data/files/website/> <Directory ${:public_html}>
Options FollowSymLinks Options FollowSymLinks
AllowOverride All AllowOverride All
Require all granted Require all granted
</Directory> </Directory>
DocumentRoot ${:document_root}data/files/website/ DocumentRoot ${:public_html}
DirectoryIndex index.html index.php DirectoryIndex index.html index.php
</VirtualHost> </VirtualHost>
<VirtualHost ${:ip}:8090> <VirtualHost ${:ip}:${:port3}>
#ServerName www.example.com #ServerName www.example.com
# Directory protection # Directory protection
...@@ -76,17 +76,25 @@ NameVirtualHost ${:ip}:8070 ...@@ -76,17 +76,25 @@ NameVirtualHost ${:ip}:8070
Require all denied Require all denied
</Directory> </Directory>
<Directory ${:document_root}data/files/website2/> <Directory ${:public_html2}>
Options FollowSymLinks Options FollowSymLinks
AllowOverride All AllowOverride All
Require all granted Require all granted
</Directory> </Directory>
DocumentRoot ${:document_root}data/files/website2/ DocumentRoot ${:public_html2}
DirectoryIndex index.html index.php DirectoryIndex index.html index.php
</VirtualHost> </VirtualHost>
#Update PHP.INI
php_value include_path ".:${:php_lib_path}"
php_value upload_max_filesize 20M
php_value post_max_size 20M
php_value output_buffering none
# List of modules # List of modules
LoadModule unixd_module modules/mod_unixd.so LoadModule unixd_module modules/mod_unixd.so
LoadModule access_compat_module modules/mod_access_compat.so LoadModule access_compat_module modules/mod_access_compat.so
......
<html> <html>
<head> <head>
<title>New Document - Created By AjaXplorer</title> <title>Empty Website</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head> </head>
<body bgcolor="#FFFFFF" text="#000000"> <body bgcolor="#FFFFFF" text="#000000">
<h2>Hi, this website folder is still empty. Please go to your File Manager administration and replace this folder by your new website files.</h2> <h3>Hi, this website folder is still empty. Please go to your File Manager administration (filemanager-url) and
upload your files into ${:folder} folder.</h3>
</body> </body>
</html> </html>
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