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
Romain Courteaud
slapos
Commits
2dfd4830
Commit
2dfd4830
authored
Mar 28, 2013
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BonjourGrid: Resolv hostname bug when deploy condor project
parent
fe47fae3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
11 deletions
+7
-11
slapos/recipe/bonjourgrid/__init__.py
slapos/recipe/bonjourgrid/__init__.py
+4
-8
slapos/recipe/bonjourgrid/template/machineinfo.sh.in
slapos/recipe/bonjourgrid/template/machineinfo.sh.in
+3
-3
software/bonjourgrid/bonjourgrid.src/bonjourgrid.tar.gz
software/bonjourgrid/bonjourgrid.src/bonjourgrid.tar.gz
+0
-0
No files found.
slapos/recipe/bonjourgrid/__init__.py
View file @
2dfd4830
...
...
@@ -50,12 +50,9 @@ class Recipe(GenericBaseRecipe):
type
=
self
.
options
[
'type'
].
strip
()
if
type
==
"condor"
:
startCondor
=
True
hostname
=
self
.
options
[
'condor_host'
].
strip
()
url
=
"http://%s"
%
hostname
project
=
self
.
options
[
'condor_host'
].
strip
()
if
type
==
"boinc"
:
import
socket
hostname
=
socket
.
gethostname
()
url
=
self
.
options
[
'url-boinc'
].
strip
()
project
=
self
.
options
[
'url-boinc'
].
strip
()
startBoinc
=
True
#Generate BOINC/Condor launcher script
...
...
@@ -82,7 +79,6 @@ class Recipe(GenericBaseRecipe):
'--pid_file'
,
pid_file
,
'--master_wrapper'
,
grid_wrapper
,
'--directory'
,
self
.
options
[
'work_dir'
].
strip
(),
'--install_directory'
,
self
.
options
[
'install_dir'
].
strip
(),
'--server'
,
self
.
options
[
'redis-url'
].
strip
(),
'--port'
,
self
.
options
[
'redis-port'
].
strip
(),
'--num_workers'
,
self
.
options
[
'nworkers'
].
strip
(),
...
...
@@ -97,11 +93,11 @@ class Recipe(GenericBaseRecipe):
config_info
=
self
.
createFile
(
config_info_file
,
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'machineinfo.sh.in'
),
dict
(
ip_address
=
self
.
options
[
'ipv6'
].
strip
(),
hostname
=
hostname
,
url
=
url
,
project
=
project
,
middleware
=
type
)))
os
.
chmod
(
config_info_file
,
0744
)
path_list
.
append
(
config_info
)
update
=
install
class
Client
(
GenericBaseRecipe
):
...
...
slapos/recipe/bonjourgrid/template/machineinfo.sh.in
View file @
2dfd4830
...
...
@@ -4,15 +4,15 @@ Mhz=`grep -i Mhz /proc/cpuinfo | cut -d : -f2 | head -1 | cut -f2 -d " "`
mem=`grep -i MemTotal /proc/meminfo | cut -f2 -d :`
Ram=`echo $mem | cut -f1 -d " "`
Cpu=`uname -a | cut -f3 -d " "`
H=
%(hostname)s
H=
`hostname`
Nbproc=`grep processor /proc/cpuinfo |wc -l`
Ip=%(ip_address)s
status="in execution"
secours="host1"
middleware="%(middleware)s"
url="%(url
)s"
project="%(project
)s"
c="{'"MHZ"':\"$Mhz\",'"Ram"':\"$Ram\",'"Cpu"':\"$Cpu\",'"HOST"':\"$H\",'"IP"':\"$Ip\",'"STATUS"':\"$status\",'"SECOURS"':\"$secours\",'"MIDDLEWARE"':\"$middleware\",'"
URL"':\"$url
\",}"
c="{'"MHZ"':\"$Mhz\",'"Ram"':\"$Ram\",'"Cpu"':\"$Cpu\",'"HOST"':\"$H\",'"IP"':\"$Ip\",'"STATUS"':\"$status\",'"SECOURS"':\"$secours\",'"MIDDLEWARE"':\"$middleware\",'"
PROJECT"':\"$project
\",}"
filename=`hostname`
echo $c > $filename
software/bonjourgrid/bonjourgrid.src/bonjourgrid.tar.gz
deleted
100644 → 0
View file @
fe47fae3
File deleted
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