Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
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
Guillaume Hervier
slapos-caddy
Commits
39d5f5f0
Commit
39d5f5f0
authored
Feb 11, 2014
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BOINC client can work with both IPv6 and IPv4 URL
parent
d2c835c3
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
63 deletions
+61
-63
component/boinc-client/buildout.cfg
component/boinc-client/buildout.cfg
+1
-1
slapos/recipe/boinc/__init__.py
slapos/recipe/boinc/__init__.py
+13
-1
slapos/recipe/boinc/configure.py
slapos/recipe/boinc/configure.py
+6
-3
software/boinc-client/instance-boinc.cfg
software/boinc-client/instance-boinc.cfg
+19
-4
software/boinc-client/software.cfg
software/boinc-client/software.cfg
+22
-54
No files found.
component/boinc-client/buildout.cfg
View file @
39d5f5f0
...
@@ -49,7 +49,7 @@ recipe = plone.recipe.command
...
@@ -49,7 +49,7 @@ recipe = plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
tarball = ${buildout:parts-directory}/boinc.tar.gz
tarball = ${buildout:parts-directory}/boinc.tar.gz
svnversion = ${subversion:location}/bin/svnversion
svnversion = ${subversion:location}/bin/svnversion
command = ${subversion:location}/bin/svn co
--revision 26162
http://boinc.berkeley.edu/svn/branches/server_stable ${:location} && \
command = ${subversion:location}/bin/svn co
--revision 26178
http://boinc.berkeley.edu/svn/branches/server_stable ${:location} && \
sed -i 's#/usr/bin/svnversion#${:svnversion}#' ${:location}/tools/make_project && \
sed -i 's#/usr/bin/svnversion#${:svnversion}#' ${:location}/tools/make_project && \
cd ${:location} && rm -f ${:tarball} && tar -cvzf ${:tarball} .
cd ${:location} && rm -f ${:tarball} && tar -cvzf ${:tarball} .
update-command =
update-command =
...
...
slapos/recipe/boinc/__init__.py
View file @
39d5f5f0
...
@@ -31,6 +31,7 @@ import pwd
...
@@ -31,6 +31,7 @@ import pwd
import
json
import
json
import
signal
import
signal
import
zc.buildout
import
zc.buildout
from
urlparse
import
urlparse
class
Recipe
(
GenericBaseRecipe
):
class
Recipe
(
GenericBaseRecipe
):
"""Deploy a fully operational boinc architecture."""
"""Deploy a fully operational boinc architecture."""
...
@@ -380,6 +381,17 @@ class Client(GenericBaseRecipe):
...
@@ -380,6 +381,17 @@ class Client(GenericBaseRecipe):
#get current uig to create a unique rpc-port for this client
#get current uig to create a unique rpc-port for this client
stat_info
=
os
.
stat
(
options
[
'home'
].
strip
())
stat_info
=
os
.
stat
(
options
[
'home'
].
strip
())
options
[
'rpc-port'
]
=
pwd
.
getpwuid
(
stat_info
.
st_uid
)[
2
]
+
5000
options
[
'rpc-port'
]
=
pwd
.
getpwuid
(
stat_info
.
st_uid
)[
2
]
+
5000
if
options
[
'project-url'
].
find
(
'://['
)
!=
-
1
:
#ipv6 URL
uparse
=
urlparse
(
options
[
'project-url'
])
options
[
'project-host'
]
=
uparse
.
hostname
options
[
'project-port'
]
=
uparse
.
port
options
[
'project-url'
]
=
uparse
.
scheme
+
'://'
+
options
[
'local-ipv4'
]
+
\
':'
+
str
(
uparse
.
port
)
+
uparse
.
path
else
:
options
[
'project-host'
]
=
"::1"
options
[
'project-port'
]
=
"8080"
options
[
'tunnel-wapper'
]
=
os
.
path
.
join
(
options
[
'home'
].
strip
(),
'6tunnel_raw'
)
return
GenericBaseRecipe
.
__init__
(
self
,
buildout
,
name
,
options
)
return
GenericBaseRecipe
.
__init__
(
self
,
buildout
,
name
,
options
)
...
@@ -388,7 +400,7 @@ class Client(GenericBaseRecipe):
...
@@ -388,7 +400,7 @@ class Client(GenericBaseRecipe):
boincbin
=
self
.
options
[
'boinc-bin'
].
strip
()
boincbin
=
self
.
options
[
'boinc-bin'
].
strip
()
cmdbin
=
self
.
options
[
'cmd-bin'
].
strip
()
cmdbin
=
self
.
options
[
'cmd-bin'
].
strip
()
installdir
=
self
.
options
[
'install-dir'
].
strip
()
installdir
=
self
.
options
[
'install-dir'
].
strip
()
url
=
self
.
options
[
'
server
-url'
].
strip
()
url
=
self
.
options
[
'
project
-url'
].
strip
()
key
=
self
.
options
[
'key'
].
strip
()
key
=
self
.
options
[
'key'
].
strip
()
boinc_wrapper
=
self
.
options
[
'client-wrapper'
].
strip
()
boinc_wrapper
=
self
.
options
[
'client-wrapper'
].
strip
()
cmd_wrapper
=
self
.
options
[
'cmd-wrapper'
].
strip
()
cmd_wrapper
=
self
.
options
[
'cmd-wrapper'
].
strip
()
...
...
slapos/recipe/boinc/configure.py
View file @
39d5f5f0
...
@@ -321,8 +321,11 @@ def runCmd(args):
...
@@ -321,8 +321,11 @@ def runCmd(args):
checkFile
(
client_config
,
5
)
checkFile
(
client_config
,
5
)
time
.
sleep
(
10
)
time
.
sleep
(
10
)
#Scan client state xml to find client ipv4 adress
#Scan client state xml to find client ipv4 adress
try
:
host
=
re
.
search
(
"<ip_addr>([
\
w
\
d
\
.:]+)</ip_
a
ddr>"
,
host
=
re
.
search
(
"<ip_addr>([
\
w
\
d
\
.:]+)</ip_
a
ddr>"
,
open
(
client_config
,
'r'
).
read
()).
group
(
1
)
open
(
client_config
,
'r'
).
read
()).
group
(
1
)
except
:
host
=
"127.0.0.1"
args
[
'base_cmd'
][
2
]
=
host
+
':'
+
args
[
'base_cmd'
][
2
]
args
[
'base_cmd'
][
2
]
=
host
+
':'
+
args
[
'base_cmd'
][
2
]
print
"Run boinccmd with host at %s "
%
args
[
'base_cmd'
][
2
]
print
"Run boinccmd with host at %s "
%
args
[
'base_cmd'
][
2
]
project_args
=
args
[
'base_cmd'
]
+
[
'--project_attach'
,
args
[
'project_url'
],
project_args
=
args
[
'base_cmd'
]
+
[
'--project_attach'
,
args
[
'project_url'
],
...
...
software/boinc-client/instance-boinc.cfg
View file @
39d5f5f0
[buildout]
[buildout]
parts =
parts =
boinc-client
boinc-client
tunnel-ipv6-http
publish-connection-informations
publish-connection-informations
eggs-directory = ${buildout:eggs-directory}
eggs-directory = ${buildout:eggs-directory}
...
@@ -18,7 +19,8 @@ tmp = $${buildout:directory}/tmp/
...
@@ -18,7 +19,8 @@ tmp = $${buildout:directory}/tmp/
[basedirectory]
[basedirectory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log/
log = $${rootdirectory:var}/log/
services = $${rootdirectory:etc}/run/
services = $${rootdirectory:etc}/service
scripts = $${rootdirectory:etc}/run
run = $${rootdirectory:var}/run/
run = $${rootdirectory:var}/run/
backup = $${rootdirectory:srv}/backup/
backup = $${rootdirectory:srv}/backup/
promises = $${rootdirectory:etc}/promise/
promises = $${rootdirectory:etc}/promise/
...
@@ -34,15 +36,28 @@ recipe = slapos.cookbook:boinc.client
...
@@ -34,15 +36,28 @@ recipe = slapos.cookbook:boinc.client
install-dir = $${basedirectory:boinc}
install-dir = $${basedirectory:boinc}
home = $${buildout:directory}
home = $${buildout:directory}
client-wrapper = $${basedirectory:services}/boinc_client
client-wrapper = $${basedirectory:services}/boinc_client
cmd-wrapper = $${basedirectory:s
ervice
s}/boinc_cmd
cmd-wrapper = $${basedirectory:s
cript
s}/boinc_cmd
ip = $${slap-network-information:global-ipv6}
ip = $${slap-network-information:global-ipv6}
passwd = $${boinc-passwd:passwd}
passwd = $${boinc-passwd:passwd}
#specifie a cc_config.xml file to boinc client, use cconfig
#specifie a cc_config.xml file to boinc client, use cconfig
cconfig =
cconfig =
boinc-bin = ${boinc:location}/bin/boinc_client
boinc-bin = ${boinc:location}/bin/boinc_client
cmd-bin = ${boinc:location}/bin/boinccmd
cmd-bin = ${boinc:location}/bin/boinccmd
server-url = $${slap-parameter:boinc-project-url}
project-url = $${slap-parameter:boinc-project-url}
local-ipv4 = $${slap-network-information:local-ipv4}
key = $${slap-parameter:boinc-account-key}
key = $${slap-parameter:boinc-account-key}
tunnel-wapper = $${basedirectory:services}/6tunnel-http
[tunnel-ipv6-http]
recipe = slapos.cookbook:ipv4toipv6
ipv6 = $${boinc-client:project-host}
ipv6-port = $${boinc-client:project-port}
ipv4 = $${slap-network-information:local-ipv4}
ipv4-port = $${boinc-client:project-port}
shell-path = ${dash:location}/bin/dash
6tunnel-path = ${6tunnel:location}/bin/6tunnel
runner-path = $${boinc-client:tunnel-wapper}
# Publish all instance parameters
# Publish all instance parameters
[publish-connection-informations]
[publish-connection-informations]
...
...
software/boinc-client/software.cfg
View file @
39d5f5f0
[buildout]
[buildout]
develop =
${:parts-directory}/slapos.cookbook-repository
parts=
parts=
slapos-cookbook
slapos-cookbook
boinc
boinc
template
template
template-boinc
template-boinc
slapos.cookbook-repository
check-recipe
extends =
extends =
../../component/boinc-client/buildout.cfg
../../component/boinc-client/buildout.cfg
../../component/6tunnel/buildout.cfg
../../component/dash/buildout.cfg
../../stack/slapos.cfg
../../stack/slapos.cfg
[template]
[template]
...
@@ -22,10 +30,23 @@ mode = 0644
...
@@ -22,10 +30,23 @@ mode = 0644
# Default template for boinc-client instance.
# Default template for boinc-client instance.
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-boinc.cfg
url = ${:_profile_base_location_}/instance-boinc.cfg
md5sum =
4a50c02252792d11b99d88206bc49e12
md5sum =
8254d882d0e045a601bced78def06109
output = ${buildout:directory}/template-boinc.cfg
output = ${buildout:directory}/template-boinc.cfg
mode = 0644
mode = 0644
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = grid-computing
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command =
grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
[networkcache]
[networkcache]
# signature certificates of the following uploaders.
# signature certificates of the following uploaders.
# Romain Courteaud
# Romain Courteaud
...
@@ -143,56 +164,3 @@ signature-certificate-list =
...
@@ -143,56 +164,3 @@ signature-certificate-list =
-----END CERTIFICATE-----
-----END CERTIFICATE-----
[versions]
[versions]
Jinja2 = 2.7
MarkupSafe = 0.18
Werkzeug = 0.8.3
buildout-versions = 1.7
inotifyx = 0.2.0-1
lxml = 3.2.1
meld3 = 0.6.10
netaddr = 0.7.10
plone.recipe.command = 1.1
pytz = 2013b
slapos.core = 0.35.1
slapos.recipe.cmmi = 0.1.1
slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.4.2
xml-marshaller = 0.9.7
slapos.cookbook=0.78.1
# Required by:
# slapos.core==0.35.1
Flask = 0.9
# Required by:
# slapos.cookbook==0.78.1
lock-file = 2.0
# Required by:
# slapos.core==0.35.1
netifaces = 0.8-1
# Required by:
# slapos.core==0.35.1
pyflakes = 0.7.2
# Required by:
# hexagonit.recipe.download==1.6nxd002
# slapos.cookbook==0.78.1
# slapos.core==0.35.1
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.5
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.core==0.35.1
supervisor = 3.0b1
# Required by:
# slapos.core==0.35.1
unittest2 = 0.5.1
# Required by:
# slapos.core==0.35.1
zope.interface = 4.0.5
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