Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Thomas Gambier
slapos
Commits
4a6568f3
Commit
4a6568f3
authored
May 26, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xwiki instantation recipe.
parent
fb59d5dd
Changes
38
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
1899 additions
and
0 deletions
+1899
-0
all-wcprops
slapos/slapos.recipe.xwiki/.svn/all-wcprops
+35
-0
entries
slapos/slapos.recipe.xwiki/.svn/entries
+201
-0
CHANGES.txt.svn-base
...s/slapos.recipe.xwiki/.svn/text-base/CHANGES.txt.svn-base
+6
-0
MANIFEST.in.svn-base
...s/slapos.recipe.xwiki/.svn/text-base/MANIFEST.in.svn-base
+2
-0
README.txt.svn-base
...os/slapos.recipe.xwiki/.svn/text-base/README.txt.svn-base
+1
-0
setup.cfg.svn-base
slapos/slapos.recipe.xwiki/.svn/text-base/setup.cfg.svn-base
+3
-0
setup.py.svn-base
slapos/slapos.recipe.xwiki/.svn/text-base/setup.py.svn-base
+35
-0
CHANGES.txt
slapos/slapos.recipe.xwiki/CHANGES.txt
+6
-0
MANIFEST.in
slapos/slapos.recipe.xwiki/MANIFEST.in
+2
-0
README.txt
slapos/slapos.recipe.xwiki/README.txt
+1
-0
setup.cfg
slapos/slapos.recipe.xwiki/setup.cfg
+3
-0
setup.py
slapos/slapos.recipe.xwiki/setup.py
+35
-0
all-wcprops
slapos/slapos.recipe.xwiki/src/.svn/all-wcprops
+5
-0
entries
slapos/slapos.recipe.xwiki/src/.svn/entries
+31
-0
all-wcprops
slapos/slapos.recipe.xwiki/src/slapos/.svn/all-wcprops
+11
-0
entries
slapos/slapos.recipe.xwiki/src/slapos/.svn/entries
+65
-0
__init__.py.svn-base
...cipe.xwiki/src/slapos/.svn/text-base/__init__.py.svn-base
+6
-0
__init__.py
slapos/slapos.recipe.xwiki/src/slapos/__init__.py
+6
-0
all-wcprops
...os/slapos.recipe.xwiki/src/slapos/recipe/.svn/all-wcprops
+11
-0
entries
slapos/slapos.recipe.xwiki/src/slapos/recipe/.svn/entries
+65
-0
__init__.py.svn-base
...iki/src/slapos/recipe/.svn/text-base/__init__.py.svn-base
+6
-0
__init__.py
slapos/slapos.recipe.xwiki/src/slapos/recipe/__init__.py
+6
-0
all-wcprops
...pos.recipe.xwiki/src/slapos/recipe/xwiki/.svn/all-wcprops
+11
-0
entries
.../slapos.recipe.xwiki/src/slapos/recipe/xwiki/.svn/entries
+65
-0
__init__.py.svn-base
...c/slapos/recipe/xwiki/.svn/text-base/__init__.py.svn-base
+167
-0
__init__.py
...s/slapos.recipe.xwiki/src/slapos/recipe/xwiki/__init__.py
+167
-0
all-wcprops
...e.xwiki/src/slapos/recipe/xwiki/template/.svn/all-wcprops
+35
-0
entries
...ecipe.xwiki/src/slapos/recipe/xwiki/template/.svn/entries
+198
-0
hibernate.cfg.xml.in.svn-base
...iki/template/.svn/text-base/hibernate.cfg.xml.in.svn-base
+128
-0
initmysql.sql.in.svn-base
...e/xwiki/template/.svn/text-base/initmysql.sql.in.svn-base
+4
-0
my.cnf.in.svn-base
...s/recipe/xwiki/template/.svn/text-base/my.cnf.in.svn-base
+75
-0
mysqld.bin.svn-base
.../recipe/xwiki/template/.svn/text-base/mysqld.bin.svn-base
+2
-0
tomcat-server.xml.in.svn-base
...iki/template/.svn/text-base/tomcat-server.xml.in.svn-base
+148
-0
hibernate.cfg.xml.in
...iki/src/slapos/recipe/xwiki/template/hibernate.cfg.xml.in
+128
-0
initmysql.sql.in
...e.xwiki/src/slapos/recipe/xwiki/template/initmysql.sql.in
+4
-0
my.cnf.in
...s.recipe.xwiki/src/slapos/recipe/xwiki/template/my.cnf.in
+75
-0
mysqld.bin
....recipe.xwiki/src/slapos/recipe/xwiki/template/mysqld.bin
+2
-0
tomcat-server.xml.in
...iki/src/slapos/recipe/xwiki/template/tomcat-server.xml.in
+148
-0
No files found.
slapos/slapos.recipe.xwiki/.svn/all-wcprops
0 → 100644
View file @
4a6568f3
K 25
svn:wc:ra_dav:version-url
V 68
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki
END
CHANGES.txt
K 25
svn:wc:ra_dav:version-url
V 80
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/CHANGES.txt
END
setup.py
K 25
svn:wc:ra_dav:version-url
V 77
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/setup.py
END
MANIFEST.in
K 25
svn:wc:ra_dav:version-url
V 80
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/MANIFEST.in
END
README.txt
K 25
svn:wc:ra_dav:version-url
V 79
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/README.txt
END
setup.cfg
K 25
svn:wc:ra_dav:version-url
V 78
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/setup.cfg
END
slapos/slapos.recipe.xwiki/.svn/entries
0 → 100644
View file @
4a6568f3
10
dir
45492
https://svn.erp5.org/repos/public/slapos/trunk/recipe/slapos.recipe.xwiki
https://svn.erp5.org/repos/public
2011-04-08T10:52:53.516084Z
45235
luke
20353a03-c40f-0410-a6d1-a30d3c3de9de
CHANGES.txt
file
2011-04-15T12:07:28.111799Z
3b08119e86e1b1b69184da3df0eca1f0
2011-04-08T10:52:53.516084Z
45235
luke
56
src
dir
setup.py
file
2011-04-15T12:07:28.112799Z
27530d4d456d6cb7400b8b0087047512
2011-04-08T10:52:53.516084Z
45235
luke
919
MANIFEST.in
file
2011-04-15T12:07:28.112799Z
98e78b503eff1e97f33c34e08afab677
2011-04-08T10:52:53.516084Z
45235
luke
66
README.txt
file
2011-04-15T12:07:28.112799Z
086b81245a351f702a7ce4eed8500d83
2011-04-08T10:52:53.516084Z
45235
luke
66
setup.cfg
file
2011-04-15T12:07:28.112799Z
a1b4f7f3a0e844ee99d0ab77330826d1
2011-04-08T10:52:53.516084Z
45235
luke
49
slapos/slapos.recipe.xwiki/.svn/text-base/CHANGES.txt.svn-base
0 → 100644
View file @
4a6568f3
Changelog
=========
1.0 (unreleased)
----------------
slapos/slapos.recipe.xwiki/.svn/text-base/MANIFEST.in.svn-base
0 → 100644
View file @
4a6568f3
include CHANGES.txt
recursive-include src/slapos/recipe/erp5 *.in
slapos/slapos.recipe.xwiki/.svn/text-base/README.txt.svn-base
0 → 100644
View file @
4a6568f3
The slapos.recipe.xwiki aims to instantiate an xwiki environment.
slapos/slapos.recipe.xwiki/.svn/text-base/setup.cfg.svn-base
0 → 100644
View file @
4a6568f3
[egg_info]
tag_build = .dev
tag_svn_revision = 1
slapos/slapos.recipe.xwiki/.svn/text-base/setup.py.svn-base
0 → 100644
View file @
4a6568f3
from setuptools import setup, find_packages
name = "slapos.recipe.xwiki"
version = '1.0'
def read(name):
return open(name).read()
long_description=( read('README.txt')
+ '\n' +
read('CHANGES.txt')
)
setup(
name = name,
version = version,
description = "ZC Buildout recipe for create an xwiki instance",
long_description=long_description,
license = "GPLv3",
keywords = "buildout slapos xwiki",
classifiers=[
"Framework :: Buildout :: Recipe",
"Programming Language :: Python",
],
packages = find_packages('src'),
package_dir = {'': 'src'},
include_package_data=True,
install_requires = [
'zc.recipe.egg',
'setuptools',
'slapos.lib.recipe',
],
namespace_packages = ['slapos', 'slapos.recipe'],
entry_points = {'zc.buildout': ['default = %s:Recipe' % name]},
)
slapos/slapos.recipe.xwiki/CHANGES.txt
0 → 100644
View file @
4a6568f3
Changelog
=========
1.0 (unreleased)
----------------
slapos/slapos.recipe.xwiki/MANIFEST.in
0 → 100644
View file @
4a6568f3
include CHANGES.txt
recursive-include src/slapos/recipe/erp5 *.in
slapos/slapos.recipe.xwiki/README.txt
0 → 100644
View file @
4a6568f3
The slapos.recipe.xwiki aims to instantiate an xwiki environment.
slapos/slapos.recipe.xwiki/setup.cfg
0 → 100644
View file @
4a6568f3
[egg_info]
tag_build = .dev
tag_svn_revision = 1
slapos/slapos.recipe.xwiki/setup.py
0 → 100644
View file @
4a6568f3
from
setuptools
import
setup
,
find_packages
name
=
"slapos.recipe.xwiki"
version
=
'1.0'
def
read
(
name
):
return
open
(
name
)
.
read
()
long_description
=
(
read
(
'README.txt'
)
+
'
\n
'
+
read
(
'CHANGES.txt'
)
)
setup
(
name
=
name
,
version
=
version
,
description
=
"ZC Buildout recipe for create an xwiki instance"
,
long_description
=
long_description
,
license
=
"GPLv3"
,
keywords
=
"buildout slapos xwiki"
,
classifiers
=
[
"Framework :: Buildout :: Recipe"
,
"Programming Language :: Python"
,
],
packages
=
find_packages
(
'src'
),
package_dir
=
{
''
:
'src'
},
include_package_data
=
True
,
install_requires
=
[
'zc.recipe.egg'
,
'setuptools'
,
'slapos.lib.recipe'
,
],
namespace_packages
=
[
'slapos'
,
'slapos.recipe'
],
entry_points
=
{
'zc.buildout'
:
[
'default =
%
s:Recipe'
%
name
]},
)
slapos/slapos.recipe.xwiki/src/.svn/all-wcprops
0 → 100644
View file @
4a6568f3
K 25
svn:wc:ra_dav:version-url
V 72
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src
END
slapos/slapos.recipe.xwiki/src/.svn/entries
0 → 100644
View file @
4a6568f3
10
dir
45492
https://svn.erp5.org/repos/public/slapos/trunk/recipe/slapos.recipe.xwiki/src
https://svn.erp5.org/repos/public
2011-04-08T10:52:53.516084Z
45235
luke
20353a03-c40f-0410-a6d1-a30d3c3de9de
slapos
dir
slapos/slapos.recipe.xwiki/src/slapos/.svn/all-wcprops
0 → 100644
View file @
4a6568f3
K 25
svn:wc:ra_dav:version-url
V 79
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos
END
__init__.py
K 25
svn:wc:ra_dav:version-url
V 91
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/__init__.py
END
slapos/slapos.recipe.xwiki/src/slapos/.svn/entries
0 → 100644
View file @
4a6568f3
10
dir
45492
https://svn.erp5.org/repos/public/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos
https://svn.erp5.org/repos/public
2011-04-08T10:52:53.516084Z
45235
luke
20353a03-c40f-0410-a6d1-a30d3c3de9de
__init__.py
file
2011-04-15T12:07:28.109799Z
e8234e1a7b6db4112f8d1e356c985a40
2011-04-08T10:52:53.516084Z
45235
luke
245
recipe
dir
slapos/slapos.recipe.xwiki/src/slapos/.svn/text-base/__init__.py.svn-base
0 → 100644
View file @
4a6568f3
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
slapos/slapos.recipe.xwiki/src/slapos/__init__.py
0 → 100644
View file @
4a6568f3
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try
:
__import__
(
'pkg_resources'
)
.
declare_namespace
(
__name__
)
except
ImportError
:
from
pkgutil
import
extend_path
__path__
=
extend_path
(
__path__
,
__name__
)
slapos/slapos.recipe.xwiki/src/slapos/recipe/.svn/all-wcprops
0 → 100644
View file @
4a6568f3
K 25
svn:wc:ra_dav:version-url
V 86
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe
END
__init__.py
K 25
svn:wc:ra_dav:version-url
V 98
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/__init__.py
END
slapos/slapos.recipe.xwiki/src/slapos/recipe/.svn/entries
0 → 100644
View file @
4a6568f3
10
dir
45492
https://svn.erp5.org/repos/public/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe
https://svn.erp5.org/repos/public
2011-04-08T10:52:53.516084Z
45235
luke
20353a03-c40f-0410-a6d1-a30d3c3de9de
__init__.py
file
2011-04-15T12:07:28.108799Z
e8234e1a7b6db4112f8d1e356c985a40
2011-04-08T10:52:53.516084Z
45235
luke
245
xwiki
dir
slapos/slapos.recipe.xwiki/src/slapos/recipe/.svn/text-base/__init__.py.svn-base
0 → 100644
View file @
4a6568f3
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
slapos/slapos.recipe.xwiki/src/slapos/recipe/__init__.py
0 → 100644
View file @
4a6568f3
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try
:
__import__
(
'pkg_resources'
)
.
declare_namespace
(
__name__
)
except
ImportError
:
from
pkgutil
import
extend_path
__path__
=
extend_path
(
__path__
,
__name__
)
slapos/slapos.recipe.xwiki/src/slapos/recipe/xwiki/.svn/all-wcprops
0 → 100644
View file @
4a6568f3
K 25
svn:wc:ra_dav:version-url
V 92
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki
END
__init__.py
K 25
svn:wc:ra_dav:version-url
V 104
/repos/public/!svn/ver/45235/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki/__init__.py
END
slapos/slapos.recipe.xwiki/src/slapos/recipe/xwiki/.svn/entries
0 → 100644
View file @
4a6568f3
10
dir
45492
https://svn.erp5.org/repos/public/slapos/trunk/recipe/slapos.recipe.xwiki/src/slapos/recipe/xwiki
https://svn.erp5.org/repos/public
2011-04-08T10:52:53.516084Z
45235
luke
20353a03-c40f-0410-a6d1-a30d3c3de9de
__init__.py
file
2011-04-15T12:07:28.107799Z
c2c83100d9bb52238ea13f05aefd02e7
2011-04-08T10:52:53.516084Z
45235
luke
6983
template
dir
slapos/slapos.recipe.xwiki/src/slapos/recipe/xwiki/.svn/text-base/__init__.py.svn-base
0 → 100644
View file @
4a6568f3
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from slapos.lib.recipe.BaseSlapRecipe import BaseSlapRecipe
import os
import shutil
import pkg_resources
import subprocess
import time
import zc.buildout
class Recipe(BaseSlapRecipe):
def _install(self):
parameter_dict = self.computer_partition.getInstanceParameterDict()
ipv4 = self.getLocalIPv4Address(parameter_dict)
ipv6 = self.getGlobalIPv6Address(parameter_dict)
self.install_mysql_server_configuration(self.getLocalIPv4Address(parameter_dict))
port = '8900'
tomcat_home = os.path.join(self.data_root_directory, 'tomcat')
tomcat_lib = os.path.join(tomcat_home, 'lib')
xwiki_home = os.path.join(tomcat_home, 'webapps', 'xwiki')
for src, dst in (
(self.options['tomcat_location'].strip(), tomcat_home),
(self.options['xwiki_location'].strip(), xwiki_home),
):
if not os.path.isdir(dst):
try:
shutil.copytree(src, dst)
except:
shtuil.rmtree(dst)
raise
shutil.copy(self.options['hsql_location'].strip(), os.path.join(tomcat_lib,
'hsqldb.jar'))
# headless mode
self._writeFile(os.path.join(tomcat_home, 'bin', 'setenv.sh'), '''#!/bin/sh
export JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true"
''')
# tomcat wrapper
catalina = os.path.join(tomcat_home, 'bin', 'catalina.sh')
# solve "The BASEDIR environment variable is not defined correctly"
bindir = os.path.join(tomcat_home, 'bin')
for f in os.listdir(bindir):
if f.endswith('.sh'):
os.chmod(os.path.join(bindir, f), 0755)
tomcat_wrapper = self.createRunningWrapper('xwiki', """#!/bin/sh
export JRE_HOME=%(java_home)s
exec %(catalina)s run
""" % dict(java_home=self.options['java_home'].strip(),
catalina = catalina))
tomcat_dict = dict(
http_address=ipv6,
http_port=port,
ajp_address=ipv4,
ajp_port="8009",
)
server_xml = os.path.join(tomcat_home, 'conf', 'server.xml')
self._writeFile(server_xml, pkg_resources.resource_string(__name__,
'template/tomcat-server.xml.in') % tomcat_dict)
hibernate_xml = os.path.join(tomcat_home, 'webapps', 'xwiki', 'WEB-INF', 'hibernate.cfg.xml')
self._writeFile(hibernate_xml, pkg_resources.resource_string(__name__,
'template/hibernate.cfg.xml.in') % dict(mysql_port='45678', mysql_ip = ipv4))