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
Labels
Merge Requests
104
Merge Requests
104
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
332ccd39
Commit
332ccd39
authored
Jan 09, 2013
by
Alain Takoudjou
Committed by
Cédric de Saint Martin
Feb 11, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Synchronize mutltiple BOINC app deployment
parent
b43cbcf3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
6 deletions
+19
-6
setup.py
setup.py
+1
-0
slapos/recipe/boinc/__init__.py
slapos/recipe/boinc/__init__.py
+6
-1
slapos/recipe/boinc/configure.py
slapos/recipe/boinc/configure.py
+10
-1
software/boinc/software.cfg
software/boinc/software.cfg
+1
-0
stack/boinc/buildout.cfg
stack/boinc/buildout.cfg
+1
-1
stack/boinc/instance-boinc.cfg
stack/boinc/instance-boinc.cfg
+0
-3
No files found.
setup.py
View file @
332ccd39
...
...
@@ -31,6 +31,7 @@ setup(name=name,
'netaddr'
,
# to manipulate on IP addresses
'setuptools'
,
# namespaces
'inotifyx'
,
# to watch filesystem changes (used in lockfile)
'lock_file'
,
#another lockfile implementation for multiprocess
'slapos.core'
,
# uses internally
# 'slapos.toolbox', # needed for libcloud, cloudmgr, disabled for now
'xml_marshaller'
,
# need to communication with slapgrid
...
...
slapos/recipe/boinc/__init__.py
View file @
332ccd39
...
...
@@ -305,6 +305,10 @@ class App(GenericBaseRecipe):
application
=
os
.
path
.
join
(
apps_dir
,
self
.
appname
,
self
.
version
,
platform
)
wrapperdir
=
self
.
options
[
'wrapper-dir'
].
strip
()
project
=
self
.
options
[
'project'
].
strip
()
lockfile
=
os
.
path
.
join
(
self
.
options
[
'home'
].
strip
(),
'app_install.lock'
)
fd
=
os
.
open
(
lockfile
,
os
.
O_RDWR
|
os
.
O_CREAT
)
os
.
close
(
fd
)
parameter
=
dict
(
installroot
=
installroot
,
project
=
project
,
appname
=
self
.
appname
,
binary_name
=
bin_name
,
...
...
@@ -317,9 +321,10 @@ class App(GenericBaseRecipe):
t_input
=
self
.
options
[
'input-file'
].
strip
(),
binary
=
self
.
options
[
'binary'
].
strip
(),
bash
=
bash
,
home_dir
=
home
,
lockfile
=
lockfile
,
)
deploy_app
=
self
.
createPythonScript
(
os
.
path
.
join
(
wrapperdir
,
'boinc_
app'
),
os
.
path
.
join
(
wrapperdir
,
'boinc_
%s'
%
self
.
appname
),
'%s.configure.deployApp'
%
__name__
,
parameter
)
path_list
.
append
(
deploy_app
)
...
...
slapos/recipe/boinc/configure.py
View file @
332ccd39
...
...
@@ -33,6 +33,8 @@ import shutil
import
re
import
filecmp
from
lock_file
import
LockFile
def
checkMysql
(
args
):
sys
.
path
+=
args
[
'environment'
][
'PYTHONPATH'
].
split
(
':'
)
import
MySQLdb
...
...
@@ -170,8 +172,15 @@ def services(args):
writeFile
(
args
[
'service_status'
],
"started"
)
def
deployApp
(
args
):
"""Deploy Boinc App with lock"""
print
"Asking to enter in execution with lock mode..."
with
LockFile
(
args
[
'lockfile'
],
wait
=
True
):
print
"acquire the lock file..."
deployManagement
(
args
)
print
"Exit execution with lock..."
def
deployManagement
(
args
):
"""Fully deploy or redeploy or update a BOINC application using existing BOINC instance"""
if
not
check_installRequest
(
args
):
return
...
...
software/boinc/software.cfg
View file @
332ccd39
[buildout]
# Local development
develop =
${:parts-directory}/slapos.cookbook-repository
...
...
stack/boinc/buildout.cfg
View file @
332ccd39
...
...
@@ -34,7 +34,7 @@ eggs =
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-boinc.cfg
output = ${buildout:directory}/template-boinc.cfg
md5sum =
aec96557358303b5c5c05988a08bb86f
md5sum =
22de71bad135ab3c760c63e537dcb182
mode = 0644
#Template for deploying MySQL Database Server
...
...
stack/boinc/instance-boinc.cfg
View file @
332ccd39
...
...
@@ -309,8 +309,6 @@ config = url custom_domain
config-url = http://[$${apache-php:ip}]:$${apache-php:port}/
return = site_url
config-custom_domain = $${slap-parameter:domain}
sla = instance_guid
sla-instance_guid = $${slap-parameter:instance_guid}
# Deploy slapmonitor
...
...
@@ -387,7 +385,6 @@ wu-number =
input-file =
# Default value if no domain is specified
domain =
instance_guid = SOFTINST-3
# Default value if no ssh parameter is specified
logbox-ip =
logbox-port =
...
...
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