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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Matevz Golob
slapos
Commits
1fc12f31
Commit
1fc12f31
authored
Oct 17, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch kumofs instantiation to profile based.
parent
54ff0600
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
167 additions
and
1 deletion
+167
-1
setup.py
setup.py
+1
-0
slapos/recipe/erp5/__init__.py
slapos/recipe/erp5/__init__.py
+2
-1
slapos/recipe/generic-kumofs/__init__.py
slapos/recipe/generic-kumofs/__init__.py
+70
-0
slapos/recipe/generic-kumofs/template/kumo_gateway.in
slapos/recipe/generic-kumofs/template/kumo_gateway.in
+0
-0
slapos/recipe/generic-kumofs/template/kumo_manager.in
slapos/recipe/generic-kumofs/template/kumo_manager.in
+0
-0
slapos/recipe/generic-kumofs/template/kumo_server.in
slapos/recipe/generic-kumofs/template/kumo_server.in
+0
-0
software/erp5/instance-kumofs.cfg
software/erp5/instance-kumofs.cfg
+86
-0
software/erp5/software.cfg
software/erp5/software.cfg
+8
-0
No files found.
setup.py
View file @
1fc12f31
...
...
@@ -51,6 +51,7 @@ setup(name=name,
'helloworld = slapos.recipe.helloworld:Recipe'
,
'java = slapos.recipe.java:Recipe'
,
'kumofs = slapos.recipe.kumofs:Recipe'
,
'generic.kumofs = slapos.recipe.generic-kumofs:Recipe'
,
'kvm = slapos.recipe.kvm:Recipe'
,
'libcloud = slapos.recipe.libcloud:Recipe'
,
'libcloudrequest = slapos.recipe.libcloudrequest:Recipe'
,
...
...
slapos/recipe/erp5/__init__.py
View file @
1fc12f31
...
...
@@ -66,7 +66,7 @@ class Recipe(BaseSlapRecipe):
# memcached_conf = self.installMemcached(ip=self.getLocalIPv4Address(),
# port=11000)
kumo_conf
=
self
.
installKumo
(
self
.
getLocalIPv4Address
())
#
kumo_conf = self.installKumo(self.getLocalIPv4Address())
conversion_server_conf
=
self
.
installConversionServer
(
self
.
getLocalIPv4Address
(),
23000
,
23060
)
mysql_conf
=
self
.
installMysqlServer
(
self
.
getLocalIPv4Address
(),
45678
)
...
...
@@ -379,6 +379,7 @@ SSLCARevocationPath %(ca_crl)s"""
self
.
logger
.
debug
(
'Created link %r -> %r'
%
(
link
,
target
))
self
.
path_list
.
append
(
link
)
<<<<<<<
HEAD
def
installKumo
(
self
,
ip
,
kumo_manager_port
=
13101
,
kumo_server_port
=
13201
,
kumo_server_listen_port
=
13202
,
kumo_gateway_port
=
13301
):
# XXX: kumo is not storing pid in file, unless it is not running as daemon
...
...
slapos/recipe/generic-kumofs/__init__.py
0 → 100644
View file @
1fc12f31
##############################################################################
#
# Copyright (c) 2011 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.
#
##############################################################################
import
os
from
slapos.recipe.librecipe
import
GenericBaseRecipe
class
Recipe
(
GenericBaseRecipe
):
def
install
(
self
):
ip
=
self
.
options
[
'ip'
]
kumo_manager_port
=
int
(
self
.
options
[
'manager-port'
])
kumo_server_port
=
int
(
self
.
options
[
'server-port'
])
kumo_server_listen_port
=
int
(
self
.
options
[
'server-listen-port'
])
kumo_gateway_port
=
int
(
self
.
options
[
'gateway-port'
])
path_list
=
[]
# XXX: kumo is not storing pid in file, unless it is not running as daemon
# but running daemons is incompatible with SlapOS, so there is currently
# no way to have Kumo's pid files to rotate logs and send signals to them
config
=
dict
(
kumo_gateway_binary
=
self
.
options
[
'kumo-gateway-binary'
],
kumo_gateway_ip
=
ip
,
kumo_gateway_log
=
self
.
options
[
'kumo-gateway-log'
],
kumo_manager_binary
=
self
.
options
[
'kumo-manager-binary'
],
kumo_manager_ip
=
ip
,
kumo_manager_log
=
self
.
options
[
'kumo-manager-log'
],
kumo_server_binary
=
self
.
options
[
'kumo-server-binary'
],
kumo_server_ip
=
ip
,
kumo_server_log
=
self
.
options
[
'kumo-server-log'
],
kumo_server_storage
=
os
.
path
.
join
(
self
.
options
[
'data_directory'
],
"kumodb.tch"
),
kumo_manager_port
=
kumo_manager_port
,
kumo_server_port
=
kumo_server_port
,
kumo_server_listen_port
=
kumo_server_listen_port
,
kumo_gateway_port
=
kumo_gateway_port
)
path_list
.
append
(
self
.
createExecutable
(
self
.
options
[
'gateway-wrapper'
],
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'kumo_gateway.in'
),
config
)))
path_list
.
append
(
self
.
createExecutable
(
self
.
options
[
'manager-wrapper'
],
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'kumo_manager.in'
),
config
)))
path_list
.
append
(
self
.
createExecutable
(
self
.
options
[
'server-wrapper'
],
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'kumo_server.in'
),
config
)))
return
path_list
slapos/recipe/
erp5
/template/kumo_gateway.in
→
slapos/recipe/
generic-kumofs
/template/kumo_gateway.in
View file @
1fc12f31
File moved
slapos/recipe/
erp5
/template/kumo_manager.in
→
slapos/recipe/
generic-kumofs
/template/kumo_manager.in
View file @
1fc12f31
File moved
slapos/recipe/
erp5
/template/kumo_server.in
→
slapos/recipe/
generic-kumofs
/template/kumo_server.in
View file @
1fc12f31
File moved
software/erp5/instance-kumofs.cfg
View file @
1fc12f31
[buildout]
parts =
publish-kumofs-connection-information
kumofs-instance
logrotate
logrotate-entry-kumofs
cron
cron-entry-logrotate
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[publish-kumofs-connection-information]
recipe = slapos.cookbook:publishurl
url = memcached://$${kumofs:ip}:$${kumofs:gateway-port}/
[kumofs-instance]
recipe = slapos.cookbook:generic.kumofs
# Network options
ip = $${slap-network-information:local-ipv4}
manager-port = 13101
server-port = 13201
server-listen-port = 13202
gateway-port = 13301
# Paths: Running wrappers
gateway-wrapper = $${basedirectory:services}/kumofs_gateway
manager-wrapper = $${basedirectory:services}/kumofs_manager
server-wrapper = $${basedirectory:services}/kumofs_server
# Paths: Data
data-directory = $${directory:kumofs-data}
# Paths: Logs
kumo-gateway-log = $${basedirectory:log}/kumo-gateway.log
kumo-manager-log = $${basedirectory:log}/kumo-manager.log
kumo-server-log = $${basedirectory:log}/kumo-server.log
# Binary information
kumo-gateway-binary = ${kumo:location}/bin/kumo-gateway
kumo-manager-binary = ${kumo:location}/bin/kumo-manager
kumo-server-binary = ${kumo:location}/bin/kumo-server
[logrotate-entry-kumofs]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = mariadb
log = $${kumofs:kumo-gateway-log} $${kumofs:kumo-manager-log}
$${kumofs:kumo-server-log}
frequency = daily
rotate-num = 30
sharedscripts = true
notifempty = true
create = true
# rest of parts are candidates for some generic stuff
[logrotate]
recipe = slapos.cookbook:logrotate
# Binaries
logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
gzip-binary = $${buildout:gzip-binary}
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
[basedirectory]
recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log/
services = $${rootdirectory:etc}/run/
run = $${rootdirectory:var}/run/
[directory]
recipe = slapos.cookbook:mkdirectory
cron-entries = $${rootdirectory:etc}/cron.d/
crontabs = $${rootdirectory:etc}/crontabs/
cronstamps = $${rootdirectory:etc}/cronstamps/
cronoutput = $${basedirectory:log}/cron/
logrotate-backup = $${basedirectory:backup}/logrotate/
logrotate-entries = $${rootdirectory:etc}/logrotate.d/
software/erp5/software.cfg
View file @
1fc12f31
...
...
@@ -7,6 +7,7 @@ versions = versions
parts +=
# Create instance template
template-kumofs
template
validator
...
...
@@ -15,6 +16,13 @@ parts +=
# development / fast switching environment for whole software
unzip = true
[template-kumofs]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-kumofs.cfg
md5sum = dece9c402cb1e3db52a7ea2f0aa710c7
output = ${buildout:directory}/template-kumofs.cfg
mode = 0644
[instance-recipe]
# Note: In case if specific instantiation recipe is used this is the place to
# put its name
...
...
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