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

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

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