Commit 69b8c08a authored by Marco Mariani's avatar Marco Mariani

Merge remote-tracking branch 'origin/master' into lapp-resilient3

parents 872371de 892c532e
Changes
=======
0.71.3 (2013-01-31)
-------------------
* Add mysql_ip and mysql_port parameters in apachephp recipe [Cedric de Saint
Martin]
* Random password for postgres in standalone SR and lapp stack; accept
connections from the world. [Marco Mariani]
0.71.2 (2013-01-29)
-------------------
* revised postgres/lapp recipe. [Marco Mariani]
0.71.1 (2013-01-04)
-------------------
......
......@@ -31,7 +31,7 @@ recipe = hexagonit.recipe.cmmi
depends =
${gdbm:version}
version = 2.4.3
revision = 1
revision = 2
url = http://mir2.ovh.net/ftp.apache.org/dist/httpd/httpd-${:version}.tar.bz2
md5sum = 87aaf7bc7e8715f0455997bb8c6791aa
configure-command = cp -ar ${apr:location}/apr-${apr:version} srclib/apr/; cp -ar ${apr-util:location}/apr-util-${apr-util:version} srclib/apr-util; ./configure
......
......@@ -51,7 +51,7 @@ md5sum = 5dc8cc28447ed3747b8a53c768d872aa
# NODE_PATH=${:destination}/node_modules ${nodejs:node_location} ${:cloud9_js_location}
recipe = plone.recipe.command
stop-on-error = true
commit = 6b0112363dd0f9523430808394a162d3cc699550
commit = 9158bbf9e886e3b96e91239249aca66e420aa8d1
repository = https://github.com/ajaxorg/cloud9.git
location = ${buildout:parts-directory}/${:_buildout_section_name_}
environment = export GIT_SSL_NO_VERIFY=true; export PATH=${git:location}/bin:${nodejs:location}/bin:${node-sm:location}/node_modules/sm/bin:$PATH; export CPPFLAGS="-I${libxml2:location}/include -I${nodejs:location}/include"; export LDFLAGS="-L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib"; export HOME=${:location};
......
......@@ -46,4 +46,4 @@ script =
# helper binaries
cpio = ${cpio:location}/bin/cpio
rpm2cpio = ${rpm2cpio:destination}
rpm2cpio = ${rpm2cpio:target}
......@@ -3,7 +3,6 @@ parts =
rpm2cpio
[rpm2cpio]
recipe = hexagonit.recipe.download
download-only = true
recipe = slapos.recipe.build:download
url = https://raw.github.com/ruda/rpm2cpio/e196173f1f6b746463b7398e381b94a42edfa345/rpm2cpio.py
md5sum = c5bb6227d99e1ff5df880f997cbed2e3
......@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import glob
import os
version = '0.71.2-dev'
version = '0.71.4-dev'
name = 'slapos.cookbook'
long_description = open("README.txt").read() + "\n" + \
open("CHANGES.txt").read() + "\n"
......
......@@ -98,6 +98,8 @@ class Recipe(GenericBaseRecipe):
mysql_password=self.options['mysql-password'],
mysql_host='%s:%s' % (self.options['mysql-host'],
self.options['mysql-port']),
mysql_ip=self.options['mysql-host'],
mysql_port=self.options['mysql-port'],
secret_key=secret_key,
)
......
# vim: set et sts=2:
##############################################################################
#
# Copyright (c) 2012 Vifib SARL and Contributors. All Rights Reserved.
......@@ -24,12 +25,13 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import random
import os
import binascii
import os
from slapos.recipe.librecipe import GenericBaseRecipe
class Recipe(GenericBaseRecipe):
def __init__(self, buildout, name, options):
......@@ -44,7 +46,7 @@ class Recipe(GenericBaseRecipe):
return GenericBaseRecipe.__init__(self, buildout, name, options)
def install(self):
open_file = open(self.options['storage-path'], 'w')
open_file.write(self.options['passwd'])
open_file.close()
with open(self.options['storage-path'], 'w') as fout:
fout.write(self.options['passwd'])
return [self.options['storage-path']]
......@@ -70,7 +70,6 @@ class Recipe(GenericBaseRecipe):
"""
def _options(self, options):
options['password'] = self.generatePassword()
options['url'] = 'postgresql://%(superuser)s:%(password)s@[%(ipv6_random)s]:%(port)s/%(dbname)s' % options
......@@ -160,11 +159,13 @@ class Recipe(GenericBaseRecipe):
'host all all ::1/128 md5',
]
ipv4_netmask_bits = self.options.get('ipv4_netmask_bits', '32')
for ip in ipv4:
cfg_lines.append('host all all %s/32 md5' % ip)
cfg_lines.append('host all all %s/%s md5' % (ip, ipv4_netmask_bits))
ipv6_netmask_bits = self.options.get('ipv6_netmask_bits', '128')
for ip in ipv6:
cfg_lines.append('host all all %s/128 md5' % ip)
cfg_lines.append('host all all %s/%s md5' % (ip, ipv6_netmask_bits))
cfg.write('\n'.join(cfg_lines))
......
......@@ -5,13 +5,11 @@ $i = 1;
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'Put here mysql host template key';
$cfg['Servers'][$i]['port'] = 'Put here mysql port template key';
$cfg['Servers'][$i]['only_db'] = 'Put here mysql database template key';
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
/* rajk - for blobstreaming */
......
......@@ -16,6 +16,7 @@ offline = true
recipe = slapos.cookbook:mkdirectory
bin = $${buildout:directory}/bin
etc = $${buildout:directory}/etc
srv = $${buildout:directory}/srv
services = $${directories:etc}/service
promises = $${directories:etc}/promise
var = $${buildout:directory}/var
......@@ -30,9 +31,14 @@ recipe = slapos.cookbook:postgres
# Options
ipv6 = $${instance-parameters:ipv6}
# listen to connections from anywhere
ipv6_netmask_bits = 0
ipv4 = $${instance-parameters:ipv4}
# listen to connections from anywhere
ipv4_netmask_bits = 0
ipv6_random = $${instance-parameters:ipv6_random}
superuser = postgres
password = $${gen-passwd:passwd}
port = 5432
dbname = db
# pgdata_directory is created by initdb, and should not exist beforehand.
......@@ -41,6 +47,16 @@ bin = ${postgresql:location}/bin
services = $${directories:services}
#----------------
#--
#-- Generates a random password and stores it in the filesystem
[gen-passwd]
recipe = slapos.cookbook:generate.password
storage-path = $${directories:srv}/postgres_passwd
bytes = 16
#----------------
#--
#-- Deploy promise scripts.
......
......@@ -17,7 +17,7 @@ parts =
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
md5sum = dfba09a7cccefc5d92d455aaed2c1835
md5sum = 2c54a291ed61910f69a35a6db414c051
mode = 0644
......@@ -25,18 +25,19 @@ mode = 0644
Jinja2 = 2.6
Werkzeug = 0.8.3
buildout-versions = 1.7
cns.recipe.symlink = 0.2.3
hexagonit.recipe.cmmi = 1.6
inotifyx = 0.2.0
lxml = 3.1beta1
meld3 = 0.6.10
netaddr = 0.7.10
pytz = 2012j
slapos.cookbook = 0.71.2
slapos.core = 0.34
slapos.recipe.template = 2.4.2
xml-marshaller = 0.9.7
# Required by:
# slapos.core==0.33.1
# slapos.core==0.34
Flask = 0.9
# Required by:
......@@ -44,21 +45,30 @@ Flask = 0.9
hexagonit.recipe.download = 1.6
# Required by:
# slapos.core==0.33.1
# slapos.core==0.34
netifaces = 0.8
# Required by:
# cns.recipe.symlink==0.2.3
# slapos.core==0.34
pyflakes = 0.6.0
# Required by:
# slapos.cookbook==0.71.2
# slapos.core==0.34
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.3
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.core==0.33.1
# slapos.core==0.34
supervisor = 3.0b1
# Required by:
# slapos.core==0.33.1
# slapos.core==0.34
unittest2 = 0.5.1
# Required by:
# slapos.core==0.34
zope.interface = 4.0.3
......@@ -55,32 +55,32 @@ meld3 = 0.6.10
netaddr = 0.7.10
plone.recipe.command = 1.1
pycrypto = 2.6
pytz = 2012h
slapos.cookbook = 0.70
slapos.core = 0.33.1
pytz = 2012j
slapos.cookbook = 0.71.1
slapos.core = 0.34
slapos.libnetworkcache = 0.13.3
slapos.recipe.build = 0.11.5
slapos.recipe.template = 2.4.2
slapos.toolbox = 0.32
slapos.toolbox = 0.33
smmap = 0.8.2
xml-marshaller = 0.9.7
z3c.recipe.scripts = 1.0.1
# Required by:
# slapos.core==0.33.1
# slapos.toolbox==0.32
# slapos.core==0.34
# slapos.toolbox==0.33
Flask = 0.9
# Required by:
# slapos.toolbox==0.32
# slapos.toolbox==0.33
GitPython = 0.3.2.RC1
# Required by:
# slapos.toolbox==0.32
# slapos.toolbox==0.33
atomize = 0.1.1
# Required by:
# slapos.toolbox==0.32
# slapos.toolbox==0.33
feedparser = 5.1.3
# Required by:
......@@ -88,32 +88,40 @@ feedparser = 5.1.3
hexagonit.recipe.download = 1.6
# Required by:
# slapos.core==0.33.1
# slapos.core==0.34
netifaces = 0.8
# Required by:
# slapos.toolbox==0.32
# slapos.toolbox==0.33
paramiko = 1.9.0
# Required by:
# slapos.toolbox==0.32
# slapos.toolbox==0.33
psutil = 0.6.1
# Required by:
# slapos.core==0.34
pyflakes = 0.5.0
# Required by:
# cns.recipe.symlink==0.2.3
# slapos.cookbook==0.70
# slapos.core==0.33.1
# slapos.cookbook==0.71.1
# slapos.core==0.34
# slapos.libnetworkcache==0.13.3
# slapos.toolbox==0.32
# slapos.toolbox==0.33
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.2
# zope.interface==4.0.3
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.core==0.33.1
# slapos.core==0.34
supervisor = 3.0b1
# Required by:
# slapos.core==0.33.1
zope.interface = 4.0.2
# slapos.core==0.34
unittest2 = 0.5.1
# Required by:
# slapos.core==0.34
zope.interface = 4.0.3
......@@ -87,7 +87,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/postgres/instance-postgres.cfg.in
output = ${buildout:directory}/instance-postgres.cfg
md5sum = 6e9e587ddb52fb9a3817fda7d77e4cab
md5sum = 67c7772b80f82642f0f7d12793698374
mode = 0644
[instance-postgres-import]
......
......@@ -173,9 +173,14 @@ crl = $${directory:ca-dir}/crl/
[postgres-instance]
recipe = slapos.cookbook:postgres
ipv6 = $${instance-parameters:ipv6}
# listen to connections from anywhere
ipv6_netmask_bits = 0
ipv4 = $${instance-parameters:ipv4}
# listen to connections from anywhere
ipv4_netmask_bits = 0
ipv6_random = $${instance-parameters:ipv6_random}
superuser = postgres
password = $${postgres-passwd:passwd}
port = 5432
dbname = db
# pgdata_directory is created by initdb, and should not exist beforehand.
......@@ -193,6 +198,16 @@ key-file = $${stunnel:key-file}
cert-file = $${stunnel:cert-file}
#----------------
#--
#-- Generates a random password and stores it in the filesystem
[postgres-passwd]
recipe = slapos.cookbook:generate.password
storage-path = $${rootdirectory:srv}/postgres_passwd
bytes = 16
#----------------
#--
#-- Deploy slapmonitor.
......
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