Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ophélie Gagnard
slapos
Commits
a8e33cad
Commit
a8e33cad
authored
Sep 26, 2017
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 1.0
parents
ed324985
d6c6da68
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
85 additions
and
255 deletions
+85
-255
setup.py
setup.py
+1
-2
slapos/recipe/erp5_bootstrap/__init__.py
slapos/recipe/erp5_bootstrap/__init__.py
+0
-59
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
+0
-26
software/agent/software.cfg
software/agent/software.cfg
+1
-1
software/apache-frontend/software.cfg
software/apache-frontend/software.cfg
+1
-1
software/cloudooo/software-common.cfg
software/cloudooo/software-common.cfg
+0
-1
software/erp5/instance-erp5-input-schema.json
software/erp5/instance-erp5-input-schema.json
+1
-1
software/gitlab/software.cfg
software/gitlab/software.cfg
+0
-4
software/jupyter/buildout.hash.cfg
software/jupyter/buildout.hash.cfg
+1
-1
software/jupyter/instance.cfg.in
software/jupyter/instance.cfg.in
+1
-0
software/jupyter/software.cfg
software/jupyter/software.cfg
+3
-4
software/kvm/software.cfg
software/kvm/software.cfg
+1
-1
software/nayuos/instance.cfg
software/nayuos/instance.cfg
+1
-1
software/nayuos/scripts/cros_full_build.in
software/nayuos/scripts/cros_full_build.in
+2
-3
software/nayuos/software.cfg
software/nayuos/software.cfg
+1
-1
software/neoppod/software-common.cfg
software/neoppod/software-common.cfg
+1
-2
software/neoppod/software-zodb5.cfg
software/neoppod/software-zodb5.cfg
+2
-2
software/nginx-push-stream/software.cfg
software/nginx-push-stream/software.cfg
+1
-1
software/re6stnet/software.cfg
software/re6stnet/software.cfg
+1
-2
software/slapos-master/software.cfg
software/slapos-master/software.cfg
+0
-6
software/slaprunner/software.cfg
software/slaprunner/software.cfg
+1
-1
stack/caucase/buildout.cfg
stack/caucase/buildout.cfg
+1
-1
stack/erp5/buildout.cfg
stack/erp5/buildout.cfg
+22
-12
stack/erp5/buildout.hash.cfg
stack/erp5/buildout.hash.cfg
+3
-11
stack/erp5/instance-create-erp5-site-real.cfg.in
stack/erp5/instance-create-erp5-site-real.cfg.in
+0
-37
stack/erp5/instance-create-erp5-site.cfg.in
stack/erp5/instance-create-erp5-site.cfg.in
+0
-42
stack/erp5/instance-zope.cfg.in
stack/erp5/instance-zope.cfg.in
+19
-12
stack/erp5/instance.cfg.in
stack/erp5/instance.cfg.in
+0
-14
stack/erp5/zope.conf.in
stack/erp5/zope.conf.in
+18
-4
stack/monitor/buildout.cfg
stack/monitor/buildout.cfg
+1
-1
stack/slapos.cfg
stack/slapos.cfg
+1
-1
No files found.
setup.py
View file @
a8e33cad
...
...
@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import
glob
import
os
version
=
'1.0.5
3
'
version
=
'1.0.5
4.dev0
'
name
=
'slapos.cookbook'
long_description
=
open
(
"README.rst"
).
read
()
+
"
\
n
"
+
\
open
(
"CHANGES.rst"
).
read
()
+
"
\
n
"
...
...
@@ -101,7 +101,6 @@ setup(name=name,
'duplicity = slapos.recipe.duplicity:Recipe'
,
'egg_test = slapos.recipe.erp5_test:EggTestRecipe'
,
'equeue = slapos.recipe.equeue:Recipe'
,
'erp5.bootstrap = slapos.recipe.erp5_bootstrap:Recipe'
,
'erp5.promise = slapos.recipe.erp5_promise:Recipe'
,
'erp5.test = slapos.recipe.erp5_test:Recipe'
,
'erp5scalabilitytestbed = slapos.recipe.erp5scalabilitytestbed:Recipe'
,
...
...
slapos/recipe/erp5_bootstrap/__init__.py
deleted
100644 → 0
View file @
ed324985
##############################################################################
#
# Copyright (c) 2012-2014 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.recipe.librecipe
import
GenericBaseRecipe
import
sys
import
urlparse
class
Recipe
(
GenericBaseRecipe
):
"""
Instanciate ERP5 in Zope
"""
def
install
(
self
):
mysql
=
urlparse
.
urlsplit
(
self
.
options
[
'mysql-url'
])
zope
=
urlparse
.
urlsplit
(
self
.
options
[
'zope-url'
])
# Note: raises when there is more than a single element in path, as it's
# not supported by manage_addERP5Site anyway.
_
,
zope_path
=
zope
.
path
.
split
(
'/'
)
return
[
self
.
createExecutable
(
self
.
options
[
'runner-path'
],
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'erp5_bootstrap.in'
),
{
'python_path'
:
sys
.
executable
,
'base_url'
:
urlparse
.
urlunsplit
((
zope
.
scheme
,
zope
.
netloc
,
''
,
''
,
''
)),
'site_id'
:
zope_path
,
'sql_connection_string'
:
'%(database)s@%(hostname)s:%(port)s %(username)s %(password)s'
%
{
'database'
:
mysql
.
path
.
split
(
'/'
)[
1
],
'hostname'
:
mysql
.
hostname
,
'port'
:
mysql
.
port
,
'username'
:
mysql
.
username
,
'password'
:
mysql
.
password
},
},
))]
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
deleted
100644 → 0
View file @
ed324985
#!%(python_path)s
import urllib
import ssl
if hasattr(ssl, '_create_unverified_context'):
ssl._create_default_https_context = ssl._create_unverified_context
def isSuccess(response):
return 200 <= response.code < 300
base_url = %(base_url)r
response = urllib.urlopen(base_url + '/isERP5SitePresent')
if isSuccess(response) and response.read() == '':
mysql_url = %(sql_connection_string)r
response = urllib.urlopen(
base_url + '/manage_addProduct/ERP5/manage_addERP5Site',
data=urllib.urlencode({
'id': %(site_id)r,
'erp5_catalog_storage': 'erp5_mysql_innodb_catalog',
'erp5_sql_connection_string': mysql_url,
'cmf_activity_sql_connection_string': mysql_url,
}),
)
if not isSuccess(response):
raise ValueError('Failed creating site, status=%%i: %%s' %% (response.code, response.read()))
print "ERP5 site created."
software/agent/software.cfg
View file @
a8e33cad
...
...
@@ -51,7 +51,7 @@ pycrypto = 2.6.1
pycurl = 7.43.0
slapos.recipe.download = 1.0
slapos.recipe.template = 3.0
slapos.toolbox = 0.7
1
slapos.toolbox = 0.7
2
smmap = 0.9.0
# Required by:
...
...
software/apache-frontend/software.cfg
View file @
a8e33cad
...
...
@@ -11,7 +11,7 @@ plone.recipe.command = 1.1
pycrypto = 2.6.1
rdiff-backup = 1.0.5+SlapOSPatched001
slapos.recipe.template = 3.0
slapos.toolbox = 0.7
1
slapos.toolbox = 0.7
2
smmap = 0.9.0
numpy = 1.11.2
pyasn1 = 0.2.3
...
...
software/cloudooo/software-common.cfg
View file @
a8e33cad
...
...
@@ -10,7 +10,6 @@ parts =
${stack-cloudooo-buildout:parts}
# Local development
cloudooo-develop
slapos-cookbook-develop
slapos-cookbook
[slap-parameters]
...
...
software/erp5/instance-erp5-input-schema.json
View file @
a8e33cad
...
...
@@ -13,7 +13,7 @@
"type"
:
"object"
},
"site-id"
:
{
"description"
:
"ERP5Site object's id"
,
"description"
:
"ERP5Site object's id
. An empty value disables automatic site creation.
"
,
"default"
:
"erp5"
,
"type"
:
"string"
},
...
...
software/gitlab/software.cfg
View file @
a8e33cad
...
...
@@ -46,10 +46,6 @@ parts =
# for instance
instance.cfg
# TODO stop using slapos.cookbook-develop once 571d6514 gets into released
# slapos.cookbook egg
slapos-cookbook-develop
slapos-cookbook
eggs
...
...
software/jupyter/buildout.hash.cfg
View file @
a8e33cad
...
...
@@ -16,7 +16,7 @@
[instance-jupyter-notebook]
filename = instance.cfg.in
md5sum =
89ef078efd20c5e03d1cf7228568b865
md5sum =
e287ff4ca6dbec019d8f1491e14c00b4
[jupyter-notebook-config]
filename = jupyter_notebook_config.py.jinja
...
...
software/jupyter/instance.cfg.in
View file @
a8e33cad
...
...
@@ -127,6 +127,7 @@ instance-configuration =
[publish-connection-parameter]
recipe = slapos.cookbook:publish.serialised
jupyter-classic-url = https://[${instance-parameter:host}]:${instance-parameter:port}/tree
url = ${:jupyter-classic-url}
jupyterlab-url = https://[${instance-parameter:host}]:${instance-parameter:port}/lab
[erp5-kernel]
...
...
software/jupyter/software.cfg
View file @
a8e33cad
...
...
@@ -91,6 +91,9 @@ terminado = 0.6
tornado = 4.4.2
traitlets = 4.3.2
widgetsnbextension = 2.0.0
# numpy >= 1.13.1 is required for numpy.core.multiarray
numpy = 1.13.1
# Required by:
# tornado==4.4.2
...
...
@@ -101,10 +104,6 @@ certifi = 2017.1.23
# nbconvert 4.2.0 depends on entrypoints egg that is not available as tar/zip source.
nbconvert = 4.1.0
# Required by:
# patsy==0.4.1
numpy = 1.12.0
# Required by:
# ipython==5.3.0
pathlib2 = 2.2.1
...
...
software/kvm/software.cfg
View file @
a8e33cad
...
...
@@ -5,7 +5,7 @@ extends = common.cfg
# XXX - use websockify = 0.5.1 for compatibility with kvm frontend
websockify = 0.5.1
slapos.toolbox = 0.7
1
slapos.toolbox = 0.7
2
erp5.util = 0.4.49
apache-libcloud = 1.1.0
collective.recipe.environment = 0.2.0
...
...
software/nayuos/instance.cfg
View file @
a8e33cad
...
...
@@ -99,7 +99,7 @@ context =
recipe = slapos.recipe.template:jinja2
template = {{ software_dir }}/scripts/cros_full_build.in
rendered = ${directory:run}/cros_full_build
md5sum =
b2ef515a871b18216baf187485be74f8
md5sum =
2a64b5cc0314ec2221a949928956f5c0
mode = 0700
context =
key bash_path bin:bash
...
...
software/nayuos/scripts/cros_full_build.in
View file @
a8e33cad
...
...
@@ -135,13 +135,12 @@ install -m 770 "{{ scripts_dir }}/test_nayuos_image" "{{ cros_location }}/{{ bra
# make virtual ebuild responsible for installing all packages dependent on NayuOS own packages
insert_packages_into_ebuild \
$(latest_ebuild ${CHROMIUM_OVERLAY}/virtual/target-chromium-os-dev) \
net-misc/re6stnet dev-vcs/git dev-python/flask dev-python/virtualenv sys-fs/cryptsetup
{{ nayu_dev_packages }}
# insert policies into /etc/chromium/policies/recommended with NayuOS customizations
CHROMEOS_DEV_ROOT_EBIULD=
insert_packages_into_ebuild \
$(latest_ebuild ${CHROMIUM_OVERLAY}/chromeos-base/chromeos-dev-root) \
app-misc/nayuos-chromium-policy
{{ nayu_dev_rootfs_packages }}
# do not install the Upstart init script that starts ssh daemon at boot time
find ${CHROMIUM_OVERLAY}/chromeos-base/chromeos-sshd-init* -name openssh-server.conf -delete
...
...
software/nayuos/software.cfg
View file @
a8e33cad
...
...
@@ -26,7 +26,7 @@ recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg
rendered = ${buildout:directory}/instance.cfg
mode = 0644
md5sum =
22be269701616bb6f5453eb769e0cdaa
md5sum =
73f964d73367dbf280d904e408a7f9b8
context =
key software_dir :_profile_base_location_
key instance_dir buildout:directory
...
...
software/neoppod/software-common.cfg
View file @
a8e33cad
...
...
@@ -23,7 +23,6 @@ parts =
neoppod-develop
neoppod
slapos-deps-eggs
slapos-cookbook-develop
slapos-cookbook
[neoppod-repository]
...
...
@@ -118,7 +117,7 @@ persistent = 4.2.3
pycrypto = 2.6.1
pycurl = 7.43.0
slapos.recipe.template = 3.0
slapos.toolbox = 0.7
1
slapos.toolbox = 0.7
2
smmap2 = 2.0.1
transaction = 1.7.0
zodbpickle = 0.6.0
...
...
software/neoppod/software-zodb5.cfg
View file @
a8e33cad
...
...
@@ -2,5 +2,5 @@
extends = software.cfg
[versions]
ZODB = 5.
1.1
transaction = 2.
0.3
ZODB = 5.
3.0
transaction = 2.
1.2
software/nginx-push-stream/software.cfg
View file @
a8e33cad
...
...
@@ -46,4 +46,4 @@ mode = 0644
[versions]
slapos.recipe.template = 3.0
slapos.toolbox = 0.7
1
slapos.toolbox = 0.7
2
software/re6stnet/software.cfg
View file @
a8e33cad
...
...
@@ -15,7 +15,6 @@ extends =
../../stack/monitor/buildout.cfg
parts +=
slapos-cookbook-develop
slapos-cookbook
eggs
dash
...
...
@@ -112,7 +111,7 @@ plone.recipe.command = 1.1
pycrypto = 2.6.1
pycurl = 7.43.0
slapos.recipe.template = 3.0
slapos.toolbox = 0.7
1
slapos.toolbox = 0.7
2
smmap = 0.9.0
# Required by:
...
...
software/slapos-master/software.cfg
View file @
a8e33cad
...
...
@@ -31,9 +31,6 @@ update-command = ${:command}
[eggs]
eggs +=
suds
facebook-sdk
spyne
slapos.core
dummy +=
...
...
@@ -77,6 +74,3 @@ revision = ac4e9816c5d322b92c421121e6c212945a72dc37
[versions]
python-memcached = 1.47
facebook-sdk = 2.0.0
erp5diff = 0.8.1.6
software/slaprunner/software.cfg
View file @
a8e33cad
...
...
@@ -17,7 +17,7 @@ gunicorn = 19.4.5
prettytable = 0.7.2
pycurl = 7.43.0
slapos.recipe.template = 3.0
slapos.toolbox = 0.7
1
slapos.toolbox = 0.7
2
smmap = 0.9.0
# Required by:
...
...
stack/caucase/buildout.cfg
View file @
a8e33cad
...
...
@@ -95,7 +95,7 @@ futures = 3.1.1
gitdb2 = 2.0.2
gunicorn = 19.7.1
slapos.recipe.template = 3.0
slapos.toolbox = 0.7
1
slapos.toolbox = 0.7
2
smmap2 = 2.0.3
# Required by:
...
...
stack/erp5/buildout.cfg
View file @
a8e33cad
...
...
@@ -28,6 +28,8 @@ extends =
../../component/matplotlib/buildout.cfg
../../component/mesa/buildout.cfg
../../component/numpy/buildout.cfg
../../component/statsmodels/buildout.cfg
../../component/h5py/buildout.cfg
../../component/ocropy/buildout.cfg
../../component/onlyoffice-x2t/buildout.cfg
../../component/pandas/buildout.cfg
...
...
@@ -69,7 +71,6 @@ extends =
parts +=
erp5-util-develop
slapos-cookbook-develop
slapos-cookbook
rdiff-backup
aspell
...
...
@@ -210,12 +211,6 @@ link-binary =
[template-mariadb-initial-setup]
<= download-base
[template-create-erp5-site]
<= download-base
[template-create-erp5-site-real]
<= download-base
[template-postfix]
< = download-base
...
...
@@ -303,8 +298,6 @@ context =
key template_apache_conf template-apache-backend-conf:target
key template_balancer template-balancer:target
key template_cloudooo template-cloudooo:target
key template_create_erp5_site template-create-erp5-site:target
key template_create_erp5_site_real template-create-erp5-site-real:target
key template_erp5 template-erp5:target
key template_haproxy_cfg template-haproxy-cfg:target
key template_jupyter_cfg instance-jupyter-notebook:rendered
...
...
@@ -472,6 +465,10 @@ eggs = ${neoppod:eggs}
${pycrypto-python:egg}
${scipy:egg}
${scikit-learn:egg}
sympy
${h5py:egg}
openpyxl
${statsmodels:egg}
lock_file
astor
APacheDEX
...
...
@@ -561,9 +558,13 @@ eggs = ${neoppod:eggs}
# Needed for parsing .po files from our Localizer subset
polib
# Needed for Google OAuth
google-api-python-client
# Need for Facebook OAuth
facebook-sdk
# Used by ERP5 Jupyter backend
ipykernel
...
...
@@ -651,9 +652,6 @@ Products.PluggableAuthService = 1.9.0
# we are still using this old stable version.
rdiff-backup = 1.0.5+SlapOSPatched001
# use newest version of slapos.cookbook
slapos.cookbook =
# modified version that works fine for buildout installation
SOAPpy = 0.12.0nxd001
...
...
@@ -735,6 +733,7 @@ rtjp-eventlet = 0.3.2
socketpool = 0.5.3
spyne = 2.12.14
suds = 0.4
facebook-sdk = 2.0.0
threadframe = 0.2
timerserver = 2.0.2
urlnorm = 1.1.4
...
...
@@ -780,3 +779,14 @@ zope.app.dependable = 3.5.1
# Products.CMFCalendar==2.2.3
# five.formlib==1.0.4
zope.app.form = 4.0.2
Cython = 0.26.1
et-xmlfile = 1.0.1
h5py = 2.7.1
mpmath = 0.19
openpyxl = 2.4.8
sympy = 1.1.1
# Required by:
# openpyxl==2.4.8
jdcal = 1.3
stack/erp5/buildout.hash.cfg
View file @
a8e33cad
...
...
@@ -39,7 +39,7 @@ md5sum = 76f9e8c8cdc352081e34539d8fc17026
[template-zope-conf]
filename = zope.conf.in
md5sum =
77ab4f229a92e02603028a0bd3772edd
md5sum =
bbea91bc8f0b2d455d9824928abfad5b
[site-zcml]
filename = site.zcml
...
...
@@ -53,14 +53,6 @@ md5sum = d814b984abf2dc444af2a0bc6287e7f5
filename = mariadb_initial_setup.sql.in
md5sum = 6465212fdc7fe9076a0c929d9f14da14
[template-create-erp5-site]
filename = instance-create-erp5-site.cfg.in
md5sum = 1186c5804bdc679d8a31ac70cd85d51f
[template-create-erp5-site-real]
filename = instance-create-erp5-site-real.cfg.in
md5sum = 79f789360e71146486c82a7a10834bae
[template-postfix]
filename = instance-postfix.cfg.in
md5sum = e217f8b55f22d99ee2352eba6807d6f6
...
...
@@ -79,7 +71,7 @@ md5sum = 0969fbb25b05c02ef3c2d437b2f4e1a0
[template]
filename = instance.cfg.in
md5sum =
7b4ebfd2ef31ed57a7129020c8ccde67
md5sum =
258146a9d979b9981d18875fcac4de73
[monitor-template-dummy]
filename = dummy.cfg
...
...
@@ -95,7 +87,7 @@ md5sum = d1f33d406d528ae27d973e2dd0efb1ba
[template-zope]
filename = instance-zope.cfg.in
md5sum =
a2377d5c53fd2a441ea713b428e4844b
md5sum =
27d26c6380883cf3bd7b2f003f7888d8
[template-balancer]
filename = instance-balancer.cfg.in
...
...
stack/erp5/instance-create-erp5-site-real.cfg.in
deleted
100644 → 0
View file @
ed324985
[directory]
recipe = slapos.cookbook:mkdirectory
etc = ${buildout:directory}/etc
services = ${:etc}/run
promise = ${:etc}/promise
[erp5-bootstrap]
recipe = slapos.cookbook:erp5.bootstrap
runner-path = ${directory:services}/erp5-bootstrap
{# Note: a random domain name will be picked if several point to the same IP -#}
{% set reverse_hosts = {} -%}
{% for x, y in publish['hosts-dict'].iteritems() -%}
{% do reverse_hosts.__setitem__(y, x) -%}
{% endfor -%}
{# XXX: Expect the first database to be the one to use for catalog. -#}
{% set mysql_parsed = urlparse.urlparse(publish['mariadb-database-list'][0]) -%}
mysql-url = {{ dumps(urlparse.urlunparse(mysql_parsed[:1] + (mysql_parsed.username + ":" + mysql_parsed.password + "@" + reverse_hosts.get(mysql_parsed.hostname, mysql_parsed.hostname) + ':' ~ mysql_parsed.port, ) + mysql_parsed[2:])) }}
{# Pick the first http[s] family found, they should be all equivalent anyway. -#}
{% set family_list = [] -%}
{% for key, value in publish.items() -%}
{% if key.startswith('family-') and value.startswith('http') -%}
{% do family_list.append(value.split('://', 1)) -%}
{% endif -%}
{% endfor -%}
zope-url = {{ dumps(family_list[0][0] + '://' + publish['inituser-login'] + ':' + publish_early['inituser-password'] + '@' + family_list[0][1] + '/' + publish['site-id']) }}
[promise-erp5-site]
recipe = slapos.cookbook:check_url_available
url = ${erp5-bootstrap:zope-url}
path = ${directory:promise}/erp5-site
dash_path = {{ parameter_dict['dash-location'] }}/bin/dash
curl_path = {{ parameter_dict['curl-location'] }}/bin/curl
[buildout]
parts = promise-erp5-site
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
stack/erp5/instance-create-erp5-site.cfg.in
deleted
100644 → 0
View file @
ed324985
{# To create the script (wrapper) which creates the ERP5Site object, pieces
# of what is published by extended file are required. Because they are not
# available at the time the file you are reading is rendered, and because
# those values are composed (lists, dicts...) of which items are needed,
# they cannot be accessed. Instead, make buildout provide these values to
# a second template, rendered at a convenient time.
-#}
[instance-create-erp5-site-real-parameters]
dash-location = {{ parameter_dict['dash-location'] }}
curl-location = {{ parameter_dict['curl-location'] }}
[instance-create-erp5-site-real]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-create-erp5-site-real'] }}
rendered = ${buildout:directory}/instance-create-erp5-site-real.cfg
extensions = jinja2.ext.do
mode = 644
context =
import urlparse urlparse
section publish publish
section publish_early publish-early
section parameter_dict instance-create-erp5-site-real-parameters
key eggs_directory buildout:eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory
[instance-create-erp5-site-real-run]
recipe = slapos.recipe.build
script =
import subprocess, sys
subprocess.check_call([
sys.argv[0],
"buildout:directory=${buildout:directory}",
"buildout:installed=.installed-${:_buildout_section_name_}.cfg",
"-Uoc", self.options['run'],
])
run = ${instance-create-erp5-site-real:rendered}
slapos_promise =
[buildout]
extends = {{ parameter_dict['instance-erp5'] }}
parts +=
instance-create-erp5-site-real-run
stack/erp5/instance-zope.cfg.in
View file @
a8e33cad
...
...
@@ -222,6 +222,23 @@ once = ${:rendered}_done
[zope-conf-parameter-base]
ip = {{ ipv4 }}
site-id = {{ site_id }}
{% if site_id -%}
mysql-url = {{ slapparameter_dict['mysql-url-list'][0] }}
inituser = {{ slapparameter_dict['inituser-login'] }}
{% set mysql = urlparse.urlsplit(slapparameter_dict['mysql-url-list'][0]) -%}
sql-connection-string = {{ '%s@erp5-catalog-0:%s %s %s' % (
mysql.path.split('/')[1], mysql.port, mysql.username, mysql.password) }}
bt5 = {{ slapparameter_dict['bt5'] }}
bt5-repository-url = {{ slapparameter_dict['bt5-repository-url'] }}
home = ${buildout:directory}
# We only want to change the hostname to 'erp5-cloudooo' if we use the internal
# cloudooo. We plan to remove the ability to have an internal one, so this
# heuristic is enough.
{% set cloudooo = urlparse.urlsplit(slapparameter_dict['cloudooo-url']) -%}
cloudooo-url = {{ (cloudooo if cloudooo.port == None else
cloudooo._replace(netloc='erp5-cloudooo:%s' % cloudooo.port)).geturl() }}
{% endif -%}
{% set zeo_dict = slapparameter_dict.get('zodb-zeo', {}) -%}
{% for name, zodb in zodb_dict.iteritems() -%}
{% set storage_dict = zodb.setdefault('storage-dict', {}) -%}
...
...
@@ -249,7 +266,6 @@ deadlock-debugger-password = {{ dumps(slapparameter_dict['deadlock-debugger-pass
tidstorage-ip = {{ dumps(slapparameter_dict['tidstorage-ip']) }}
tidstorage-port = {{ dumps(slapparameter_dict['tidstorage-port']) }}
{% endif -%}
promise-path = ${erp5-promise:promise-path}
{% set thread_amount = slapparameter_dict['thread-amount'] -%}
thread-amount = {{ thread_amount }}
{% set webdav = slapparameter_dict['webdav'] -%}
...
...
@@ -308,8 +324,10 @@ longrequest-logger-file =
[{{ conf_name }}]
< = zope-conf-base
rendered = ${directory:etc}/{{ name }}.conf
extensions = jinja2.ext.do
context =
section parameter_dict {{ conf_parameter_name }}
import os os
[{{ section(name) }}]
< = runzope-base
...
...
@@ -381,16 +399,6 @@ hard to guess.
hosts-dict = {{ dumps(hosts_dict) }}
monitor-base-url = ${monitor-publish-parameters:monitor-base-url}
[erp5-promise]
recipe = slapos.cookbook:erp5.promise
promise-path = ${directory:etc}/erp5promise.cfg
kumofs-url = {{ dumps(slapparameter_dict['kumofs-url']) }}
memcached-url = {{ dumps(slapparameter_dict['memcached-url']) }}
cloudooo-url = {{ dumps(slapparameter_dict['cloudooo-url']) }}
smtp-url = {{ dumps(slapparameter_dict['smtp-url']) }}
bt5 = {{ dumps(slapparameter_dict['bt5']) }}
bt5-repository-url = {{ dumps(slapparameter_dict['bt5-repository-url']) }}
[monitor-instance-parameter]
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ next_port() }}
...
...
@@ -402,6 +410,5 @@ extends =
{{ logrotate_cfg }}
{{ parameter_dict['template-monitor'] }}
parts +=
erp5-promise
{{ part_list | join('\n ') }}
publish
stack/erp5/instance.cfg.in
View file @
a8e33cad
...
...
@@ -194,19 +194,6 @@ filename = instance-mariadb.cfg
extra-context =
section parameter_dict dynamic-template-mariadb-parameters
[dynamic-template-create-erp5-site-parameters]
instance-erp5 = ${dynamic-template-erp5:rendered}
template-create-erp5-site-real = {{ template_create_erp5_site_real }}
dash-location = {{ dash_location }}
curl-location = {{ curl_location }}
[dynamic-template-create-erp5-site]
<= jinja2-template-base
template = {{ template_create_erp5_site }}
filename = instance-create-erp5-site.cfg
extra-context =
section parameter_dict dynamic-template-create-erp5-site-parameters
# we need this value to be present in a section,
# for slapos.cookbook:switch-softwaretype to work
[dynamic-template-jupyter]
...
...
@@ -218,7 +205,6 @@ override = {{ dumps(override_switch_softwaretype |default) }}
# Public software types
default = dynamic-template-erp5:rendered
create-erp5-site = dynamic-template-create-erp5-site:rendered
# BBB
RootSoftwareInstance = ${:default}
# Internal software types
...
...
stack/erp5/zope.conf.in
View file @
a8e33cad
...
...
@@ -69,10 +69,24 @@ products {{ parameter_dict['instance-products'] }}
</timer-server>
{% endif -%}
{% set promise_path = parameter_dict['promise-path'] -%}
{% if promise_path -%}
<product-config /{{ parameter_dict['site-id'] }}>
promise_path {{ promise_path }}
{% set sql_connection_string = parameter_dict.get('sql-connection-string') -%}
{% if sql_connection_string -%}
{% set bt5_repository_url = [] -%}
{% set sr_path = os.path.realpath(parameter_dict['home'] + '/software_release') + '/' -%}
{% for url in parameter_dict['bt5-repository-url'].split() -%}
{% if url.startswith(sr_path) -%}
{% set url = '~/software_release/' + url[len(sr_path):] -%}
{% endif -%}
{% do bt5_repository_url.append(url) -%}
{% endfor -%}
<product-config initsite>
id {{ parameter_dict['site-id'] }}
owner {{ parameter_dict['inituser'] }}
erp5_sql_connection_string {{ sql_connection_string }}
cmf_activity_sql_connection_string {{ sql_connection_string }}
bt5_repository_url {{ ' '.join(bt5_repository_url) }}
bt5 {{ parameter_dict['bt5'] }}
cloudooo_url {{ parameter_dict['cloudooo-url'] }}
</product-config>
{% endif -%}
...
...
stack/monitor/buildout.cfg
View file @
a8e33cad
...
...
@@ -131,5 +131,5 @@ depends =
PyRSS2Gen = 1.1
cns.recipe.symlink = 0.2.3
pycurl = 7.43.0
slapos.toolbox = 0.7
1
slapos.toolbox = 0.7
2
stack/slapos.cfg
View file @
a8e33cad
...
...
@@ -136,7 +136,7 @@ requests = 2.13.0
setuptools = 33.1.1
six = 1.10.0
slapos.cookbook = 1.0.53
slapos.core = 1.4.
0
slapos.core = 1.4.
1
slapos.extension.strip = 0.4
slapos.libnetworkcache = 0.15
slapos.rebootstrap = 4.1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment