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
Guillaume Hervier
slapos
Commits
f91020d6
Commit
f91020d6
authored
Nov 28, 2012
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update condor recipe and software release
parent
bf3ace62
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
28 deletions
+37
-28
component/condor/buildout.cfg
component/condor/buildout.cfg
+1
-1
slapos/recipe/condor/__init__.py
slapos/recipe/condor/__init__.py
+21
-16
slapos/recipe/condor/template/condor_config.generic
slapos/recipe/condor/template/condor_config.generic
+7
-6
software/condor/instance-condor.cfg
software/condor/instance-condor.cfg
+7
-4
software/condor/software.cfg
software/condor/software.cfg
+1
-1
No files found.
component/condor/buildout.cfg
View file @
f91020d6
...
...
@@ -22,6 +22,6 @@ extends =
[condor]
recipe = hexagonit.recipe.download
url = http://vlwjcg.blu.livefilestore.com/y1m
R56t-v_Nqnehlg2ziRbk_rvqO_VMmNQTbzciYAYuw2FjKY7G_mmDYKYSrylX4myS7YOuPayS-aT18s7ROrZpCqHf7mfUQU-A
/condor-7.9.0-x86_64_deb_6.0-stripped.tar.gz?download&psid=1
url = http://vlwjcg.blu.livefilestore.com/y1m
FoqvjfWRrg1vs6l_zEWr7f1dNfZvdRWjqYhy5MTy7ugx7zd2oV3ehqj_bc_ub2Nw-iUNn8cA6V7Zv3QDzfmr69c3UzPEQxAEEOUlrcArs01Ll2RFywbwEQ
/condor-7.9.0-x86_64_deb_6.0-stripped.tar.gz?download&psid=1
md5sum = 630ce96e5c1172391febba2aa1bad8fc
strip-top-level-dir = true
slapos/recipe/condor/__init__.py
View file @
f91020d6
...
...
@@ -31,6 +31,7 @@ import zc.buildout
import
filecmp
import
urlparse
import
shutil
import
re
class
Recipe
(
GenericBaseRecipe
):
"""Deploy a fully operational condor architecture."""
...
...
@@ -60,7 +61,6 @@ class Recipe(GenericBaseRecipe):
self
.
package
=
options
[
'package'
].
strip
()
self
.
rootdir
=
options
[
'rootdirectory'
].
strip
()
#Other condor dependances
self
.
perlbin
=
options
[
'perl-bin'
].
strip
()
self
.
javabin
=
options
[
'java-bin'
].
strip
()
self
.
dash
=
options
[
'dash'
].
strip
()
#Directory to deploy condor
...
...
@@ -73,7 +73,9 @@ class Recipe(GenericBaseRecipe):
self
.
diskspace
=
options
[
'disk-space'
].
strip
()
self
.
ipv6
=
options
[
'ip'
].
strip
()
self
.
condor_host
=
options
[
'condor_host'
].
strip
()
self
.
collector
=
options
[
'collector_name'
].
strip
()
self
.
collector_name
=
options
[
'collector_name'
].
strip
()
self
.
host_list
=
self
.
options
.
get
(
'allowed-write'
,
'*'
)
self
.
email
=
self
.
options
.
get
(
'admin-email'
,
"root@$(FULL_HOSTNAME)"
)
def
install
(
self
):
path_list
=
[]
...
...
@@ -106,15 +108,24 @@ class Recipe(GenericBaseRecipe):
localdir
=
self
.
localdir
,
config_local
=
config_local
,
slapuser
=
slapuser
,
ipv6
=
self
.
ipv6
,
diskspace
=
self
.
diskspace
,
javabin
=
self
.
javabin
,
domain_name
=
domain_name
)
host_list
=
self
.
host_list
,
collector_name
=
self
.
collector_name
,
email
=
self
.
email
,
domain_name
=
domain_name
)
destination
=
os
.
path
.
join
(
condor_config
)
config
=
self
.
createFile
(
destination
,
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'condor_config.generic'
),
condor_configure
))
path_list
.
append
(
config
)
#update condor_config.local
with
open
(
config_local
,
'a'
)
as
f
:
f
.
write
(
"
\
n
START = TRUE"
)
#Search if is needed to update condor_config.local file
find
=
re
.
search
(
'NETWORK_INTERFACE[
\
s]*=[
\
s]*(%s)'
%
self
.
ipv6
,
open
(
config_local
,
'r'
).
read
())
if
not
find
:
#update condor_config.local
with
open
(
config_local
,
'a'
)
as
f
:
if
self
.
role
==
"execute"
:
f
.
write
(
"
\
n
START = TRUE"
)
f
.
write
(
"
\
n
COLLECTOR_NAME = %s
\
n
\
n
NETWORK_INTERFACE=%s"
%
(
self
.
collector_name
,
self
.
ipv6
))
#create condor binary launcher for slapos
if
not
os
.
path
.
exists
(
self
.
wrapper_bin
):
...
...
@@ -133,11 +144,10 @@ class Recipe(GenericBaseRecipe):
export CONDOR_LOCATION=%s
export CONDOR_IDS=%s
export HOME=%s
export HOSTNAME=%s
exec %s $*"""
%
(
self
.
dash
,
self
.
environ
[
'LD_LIBRARY_PATH'
],
self
.
environ
[
'PATH'
],
condor_config
,
self
.
prefix
,
slapuser
,
self
.
localdir
,
self
.
condor_host
,
current_exe
)
condor_config
,
self
.
prefix
,
slapuser
,
self
.
environ
[
'HOME'
]
,
current_exe
)
wrapper
.
write
(
content
)
wrapper
.
close
()
path_list
.
append
(
wrapper_location
)
...
...
@@ -155,19 +165,14 @@ class Recipe(GenericBaseRecipe):
export CONDOR_LOCATION=%s
export CONDOR_IDS=%s
export HOME=%s
export HOSTNAME=%s
exec %s $*"""
%
(
self
.
dash
,
self
.
environ
[
'LD_LIBRARY_PATH'
],
self
.
environ
[
'PATH'
],
condor_config
,
self
.
prefix
,
slapuser
,
self
.
localdir
,
self
.
condor_host
,
current_exe
)
condor_config
,
self
.
prefix
,
slapuser
,
self
.
environ
[
'HOME'
]
,
current_exe
)
wrapper
.
write
(
content
)
wrapper
.
close
()
path_list
.
append
(
wrapper_location
)
os
.
chmod
(
wrapper_location
,
0744
)
#update environment variable
self
.
environ
[
'CONDOR_CONFIG'
]
=
condor_config
self
.
environ
[
'CONDOR_LOCATION'
]
=
self
.
prefix
self
.
environ
[
'CONDOR_IDS'
]
=
slapuser
#generate script for start condor
start_condor
=
os
.
path
.
join
(
self
.
wrapperdir
,
'start_condor'
)
...
...
slapos/recipe/condor/template/condor_config.generic
View file @
f91020d6
...
...
@@ -46,8 +46,8 @@
######################################################################
######################################################################
NO_DNS =
Tru
e
DEFAULT_DOMAIN_NAME = %(domain_name)s
NO_DNS =
Fals
e
#
DEFAULT_DOMAIN_NAME = %(domain_name)s
ENABLE_IPV6 = TRUE
## What machine is your central manager?
CONDOR_HOST = %(condor_host)s
...
...
@@ -84,7 +84,7 @@ LOCAL_CONFIG_DIR = $(LOCAL_DIR)/config
##--------------------------------------------------------------------
## When something goes wrong with condor at your site, who should get
## the email?
CONDOR_ADMIN =
root@$(FULL_HOSTNAME)
CONDOR_ADMIN =
%(email)s
## Full path to a mail delivery program that understands that "-s"
## means you want to specify a subject:
...
...
@@ -108,7 +108,7 @@ FILESYSTEM_DOMAIN = $(FULL_HOSTNAME)
## This macro is used to specify a short description of your pool.
## It should be about 20 characters long. For example, the name of
## the UW-Madison Computer Science Condor Pool is ``UW-Madison CS''.
COLLECTOR_NAME =
My Pool - $(CONDOR_HOST)
COLLECTOR_NAME =
%(collector_name)s
######################################################################
######################################################################
...
...
@@ -181,7 +181,7 @@ FLOCK_COLLECTOR_HOSTS = $(FLOCK_TO)
## machine(s) where whoever is the condor administrator(s) works
## (assuming you trust all the users who log into that/those
## machine(s), since this is machine-wide access you're granting).
ALLOW_ADMINISTRATOR = $(CONDOR_HOST), $(IP_ADDRESS)
ALLOW_ADMINISTRATOR = $(CONDOR_HOST), $(IP_ADDRESS)
, %(host_list)s
## If there are no machines that should have administrative access
## to your pool (for example, there's no machine where only trusted
...
...
@@ -223,7 +223,7 @@ ALLOW_READ = *
## but note that this will allow anyone to submit jobs or add
## machines to your pool and is a serious security risk.
ALLOW_WRITE = $(FULL_HOSTNAME), $(IP_ADDRESS), %(
ipv6
)s
ALLOW_WRITE = $(FULL_HOSTNAME), $(IP_ADDRESS), %(
host_list
)s
#ALLOW_WRITE = *.your.domain, your-friend's-machine.other.domain
#DENY_WRITE = bad-machine.your.domain
...
...
@@ -557,6 +557,7 @@ GLIDEIN_SERVER_URLS = \
## interface if one is available. If it cannot decide which of two interfaces
## to choose from, it will pick the first one.
NETWORK_INTERFACE = %(ipv6)s
BIND_ALL_INTERFACES = FALSE
##--------------------------------------------------------------------
## Settings that control the daemon's debugging output:
...
...
software/condor/instance-condor.cfg
View file @
f91020d6
...
...
@@ -41,7 +41,6 @@ package = ${condor:location}
rootdirectory
=
$${
buildout
:
directory
}
local
-
dir
=
$${
rootdirectory
:
condor
}
job
-
dir
=
$${
rootdirectory
:
job
}
perl
-
bin
=
${
perl
:
location
}/
bin
java
-
bin
=
${
java
:
location
}/
bin
bin
=
$${
wrapperdirectory
:
wrapper
}/
bin
/
sbin
=
$${
wrapperdirectory
:
wrapper
}/
sbin
/
...
...
@@ -51,14 +50,16 @@ environment =
LD_LIBRARY_PATH
=${
libexpat
:
location
}/
lib
:${
kerberos
:
location
}/
lib
:${
openldap
:
location
}/
lib
:${
zlib
:
location
}/
lib
PATH
=${
perl
:
location
}/
bin
:${
java
:
location
}/
bin
:${
kerberos
:
location
}/
bin
:${
openldap
:
location
}/
bin
:%(
PATH
)
s
HOME
=$${
rootdirectory
:
condor
}
HOSTNAME
=$${
slap
-
parameter
:
host_manager_name
}
HOSTNAME
=$${
slap
-
parameter
:
condor_host
}
#
Condor
user
parameter
condor_host
=
$${
slap
-
parameter
:
host_manager_name
}
condor_host
=
$${
slap
-
parameter
:
condor_host
}
collector_name
=
$${
slap
-
parameter
:
collector_name
}
#
Condor
machine
role
:
worker
=
submit
,
execute
manager
=
manager
,
submit
machine
-
role
=
$${
slap
-
parameter
:
role
}
disk
-
space
=
$${
slap
-
parameter
:
diskspace
}
allowed
-
write
=
$${
slap
-
parameter
:
allowed
-
write
}
admin
-
email
=
$${
slap
-
parameter
:
admin
-
email
}
[
app
-
submit
]
<=
condor
...
...
@@ -79,10 +80,12 @@ condor_host = $${condor:condor_host}
[
slap
-
parameter
]
#
Default
values
if
not
specified
host_manager_name
=
[$${
slap
-
network
-
information
:
global
-
ipv6
}]
condor_host
=
[$${
slap
-
network
-
information
:
global
-
ipv6
}]
collector_name
=
SLAPOS
-
CONDOR
-
POOL
role
=
manager
diskspace
=
5
admin
-
email
=
allowed
-
write
=
$${:
condor_host
}
#
submit
application
app
-
name
=
condor_test
description
-
file
=
${
description
-
file
:
location
}/${
description
-
file
:
filename
}
...
...
software/condor/software.cfg
View file @
f91020d6
...
...
@@ -30,7 +30,7 @@ md5sum = 9e9db6f4c5e38ce3fd45d43c2bf616a8
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-condor.cfg
output = ${buildout:directory}/template-condor.cfg
md5sum =
36cc677cdce31436d163651b487b25f0
md5sum =
213b8c28be36f38103c7a100adb91d3f
mode = 0644
[description-file]
...
...
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