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
Tatuya Kamada
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
Show 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,
...
@@ -31,6 +31,7 @@ setup(name=name,
'netaddr'
,
# to manipulate on IP addresses
'netaddr'
,
# to manipulate on IP addresses
'setuptools'
,
# namespaces
'setuptools'
,
# namespaces
'inotifyx'
,
# to watch filesystem changes (used in lockfile)
'inotifyx'
,
# to watch filesystem changes (used in lockfile)
'lock_file'
,
#another lockfile implementation for multiprocess
'slapos.core'
,
# uses internally
'slapos.core'
,
# uses internally
# 'slapos.toolbox', # needed for libcloud, cloudmgr, disabled for now
# 'slapos.toolbox', # needed for libcloud, cloudmgr, disabled for now
'xml_marshaller'
,
# need to communication with slapgrid
'xml_marshaller'
,
# need to communication with slapgrid
...
...
slapos/recipe/boinc/__init__.py
View file @
332ccd39
...
@@ -305,6 +305,10 @@ class App(GenericBaseRecipe):
...
@@ -305,6 +305,10 @@ class App(GenericBaseRecipe):
application
=
os
.
path
.
join
(
apps_dir
,
self
.
appname
,
self
.
version
,
platform
)
application
=
os
.
path
.
join
(
apps_dir
,
self
.
appname
,
self
.
version
,
platform
)
wrapperdir
=
self
.
options
[
'wrapper-dir'
].
strip
()
wrapperdir
=
self
.
options
[
'wrapper-dir'
].
strip
()
project
=
self
.
options
[
'project'
].
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
,
parameter
=
dict
(
installroot
=
installroot
,
project
=
project
,
appname
=
self
.
appname
,
binary_name
=
bin_name
,
appname
=
self
.
appname
,
binary_name
=
bin_name
,
...
@@ -317,9 +321,10 @@ class App(GenericBaseRecipe):
...
@@ -317,9 +321,10 @@ class App(GenericBaseRecipe):
t_input
=
self
.
options
[
'input-file'
].
strip
(),
t_input
=
self
.
options
[
'input-file'
].
strip
(),
binary
=
self
.
options
[
'binary'
].
strip
(),
binary
=
self
.
options
[
'binary'
].
strip
(),
bash
=
bash
,
home_dir
=
home
,
bash
=
bash
,
home_dir
=
home
,
lockfile
=
lockfile
,
)
)
deploy_app
=
self
.
createPythonScript
(
deploy_app
=
self
.
createPythonScript
(
os
.
path
.
join
(
wrapperdir
,
'boinc_
app'
),
os
.
path
.
join
(
wrapperdir
,
'boinc_
%s'
%
self
.
appname
),
'%s.configure.deployApp'
%
__name__
,
parameter
'%s.configure.deployApp'
%
__name__
,
parameter
)
)
path_list
.
append
(
deploy_app
)
path_list
.
append
(
deploy_app
)
...
...
slapos/recipe/boinc/configure.py
View file @
332ccd39
...
@@ -33,6 +33,8 @@ import shutil
...
@@ -33,6 +33,8 @@ import shutil
import
re
import
re
import
filecmp
import
filecmp
from
lock_file
import
LockFile
def
checkMysql
(
args
):
def
checkMysql
(
args
):
sys
.
path
+=
args
[
'environment'
][
'PYTHONPATH'
].
split
(
':'
)
sys
.
path
+=
args
[
'environment'
][
'PYTHONPATH'
].
split
(
':'
)
import
MySQLdb
import
MySQLdb
...
@@ -170,8 +172,15 @@ def services(args):
...
@@ -170,8 +172,15 @@ def services(args):
writeFile
(
args
[
'service_status'
],
"started"
)
writeFile
(
args
[
'service_status'
],
"started"
)
def
deployApp
(
args
):
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"""
"""Fully deploy or redeploy or update a BOINC application using existing BOINC instance"""
if
not
check_installRequest
(
args
):
if
not
check_installRequest
(
args
):
return
return
...
...
software/boinc/software.cfg
View file @
332ccd39
[buildout]
[buildout]
# Local development
# Local development
develop =
develop =
${:parts-directory}/slapos.cookbook-repository
${:parts-directory}/slapos.cookbook-repository
...
...
stack/boinc/buildout.cfg
View file @
332ccd39
...
@@ -34,7 +34,7 @@ eggs =
...
@@ -34,7 +34,7 @@ eggs =
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-boinc.cfg
url = ${:_profile_base_location_}/instance-boinc.cfg
output = ${buildout:directory}/template-boinc.cfg
output = ${buildout:directory}/template-boinc.cfg
md5sum =
aec96557358303b5c5c05988a08bb86f
md5sum =
22de71bad135ab3c760c63e537dcb182
mode = 0644
mode = 0644
#Template for deploying MySQL Database Server
#Template for deploying MySQL Database Server
...
...
stack/boinc/instance-boinc.cfg
View file @
332ccd39
...
@@ -309,8 +309,6 @@ config = url custom_domain
...
@@ -309,8 +309,6 @@ config = url custom_domain
config-url = http://[$${apache-php:ip}]:$${apache-php:port}/
config-url = http://[$${apache-php:ip}]:$${apache-php:port}/
return = site_url
return = site_url
config-custom_domain = $${slap-parameter:domain}
config-custom_domain = $${slap-parameter:domain}
sla = instance_guid
sla-instance_guid = $${slap-parameter:instance_guid}
# Deploy slapmonitor
# Deploy slapmonitor
...
@@ -387,7 +385,6 @@ wu-number =
...
@@ -387,7 +385,6 @@ wu-number =
input-file =
input-file =
# Default value if no domain is specified
# Default value if no domain is specified
domain =
domain =
instance_guid = SOFTINST-3
# Default value if no ssh parameter is specified
# Default value if no ssh parameter is specified
logbox-ip =
logbox-ip =
logbox-port =
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