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
72a01c3c
Commit
72a01c3c
authored
May 26, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proactive instantiation recipe.
parent
e1078967
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
149 additions
and
0 deletions
+149
-0
slapos/slapos.recipe.proactive/CHANGES.txt
slapos/slapos.recipe.proactive/CHANGES.txt
+6
-0
slapos/slapos.recipe.proactive/MANIFEST.in
slapos/slapos.recipe.proactive/MANIFEST.in
+1
-0
slapos/slapos.recipe.proactive/README.txt
slapos/slapos.recipe.proactive/README.txt
+1
-0
slapos/slapos.recipe.proactive/setup.cfg
slapos/slapos.recipe.proactive/setup.cfg
+3
-0
slapos/slapos.recipe.proactive/setup.py
slapos/slapos.recipe.proactive/setup.py
+38
-0
slapos/slapos.recipe.proactive/src/slapos/__init__.py
slapos/slapos.recipe.proactive/src/slapos/__init__.py
+6
-0
slapos/slapos.recipe.proactive/src/slapos/recipe/__init__.py
slapos/slapos.recipe.proactive/src/slapos/recipe/__init__.py
+6
-0
slapos/slapos.recipe.proactive/src/slapos/recipe/proactive/__init__.py
....recipe.proactive/src/slapos/recipe/proactive/__init__.py
+77
-0
slapos/slapos.recipe.proactive/src/slapos/recipe/proactive/template/ProActiveConfiguration.xml.in
...s/recipe/proactive/template/ProActiveConfiguration.xml.in
+11
-0
No files found.
slapos/slapos.recipe.proactive/CHANGES.txt
0 → 100644
View file @
72a01c3c
Changelog
=========
1.0 (unreleased)
----------------
slapos/slapos.recipe.proactive/MANIFEST.in
0 → 100644
View file @
72a01c3c
include CHANGES.txt
\ No newline at end of file
slapos/slapos.recipe.proactive/README.txt
0 → 100644
View file @
72a01c3c
The slapos.recipe.proactive aims to instantiate an proactive environment.
slapos/slapos.recipe.proactive/setup.cfg
0 → 100644
View file @
72a01c3c
[egg_info]
tag_build = .dev
tag_svn_revision = 1
slapos/slapos.recipe.proactive/setup.py
0 → 100644
View file @
72a01c3c
from
setuptools
import
setup
,
find_packages
name
=
"slapos.recipe.proactive"
version
=
'1.0'
def
read
(
name
):
return
open
(
name
).
read
()
long_description
=
(
read
(
'README.txt'
)
+
'
\
n
'
+
read
(
'CHANGES.txt'
)
)
setup
(
name
=
name
,
version
=
version
,
description
=
"ZC Buildout recipe for create an proactive instance"
,
long_description
=
long_description
,
author
=
"Cedric de Saint Martin"
,
author_email
=
"cedric.dsm@tiolive.com"
,
url
=
"http://www.slapos.org"
,
license
=
"GPLv3"
,
keywords
=
"buildout slapos proactive"
,
classifiers
=
[
"Framework :: Buildout :: Recipe"
,
"Programming Language :: Python"
,
],
packages
=
find_packages
(
'src'
),
package_dir
=
{
''
:
'src'
},
include_package_data
=
True
,
install_requires
=
[
'zc.recipe.egg'
,
'setuptools'
,
'slapos.lib.recipe'
,
],
namespace_packages
=
[
'slapos'
,
'slapos.recipe'
],
entry_points
=
{
'zc.buildout'
:
[
'default = %s:Recipe'
%
name
]},
)
slapos/slapos.recipe.proactive/src/slapos/__init__.py
0 → 100644
View file @
72a01c3c
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try
:
__import__
(
'pkg_resources'
).
declare_namespace
(
__name__
)
except
ImportError
:
from
pkgutil
import
extend_path
__path__
=
extend_path
(
__path__
,
__name__
)
slapos/slapos.recipe.proactive/src/slapos/recipe/__init__.py
0 → 100644
View file @
72a01c3c
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try
:
__import__
(
'pkg_resources'
).
declare_namespace
(
__name__
)
except
ImportError
:
from
pkgutil
import
extend_path
__path__
=
extend_path
(
__path__
,
__name__
)
slapos/slapos.recipe.proactive/src/slapos/recipe/proactive/__init__.py
0 → 100644
View file @
72a01c3c
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from
slapos.lib.recipe.BaseSlapRecipe
import
BaseSlapRecipe
import
os
import
pkg_resources
class
Recipe
(
BaseSlapRecipe
):
def
_install
(
self
):
parameter_dict
=
self
.
computer_partition
.
getInstanceParameterDict
()
#ipv4 = self.getLocalIPv4Address(parameter_dict)
#ipv6 = self.getGlobalIPv6Address(parameter_dict)
proactive_home
=
self
.
options
[
'proactive_location'
]
# ProActive parameters
proactive_rmUrl
=
parameter_dict
.
get
(
'rmURL'
)
proactive_credential
=
parameter_dict
.
get
(
'credentials'
)
proactive_nsname
=
parameter_dict
.
get
(
'nsName'
)
#proactive conf
conf_dir
=
os
.
path
.
join
(
self
.
work_directory
,
".proactive"
)
proactive_configuration_file
=
os
.
path
.
join
(
conf_dir
,
"ProActiveConfiguration.xml"
)
if
not
os
.
path
.
isdir
(
conf_dir
):
os
.
mkdir
(
conf_dir
)
proactive_dict
=
dict
(
# Proactive daemon need to connect to a router.
router_address
=
"2a01:e34:ec03:8610:20c:29ff:feda:5d3f"
,
#parameter_dict['router_address'],
port
=
8090
#parameter_dict['router_port']
)
self
.
_writeFile
(
proactive_configuration_file
,
pkg_resources
.
resource_string
(
__name__
,
'template/ProActiveConfiguration.xml.in'
)
%
proactive_dict
)
# ProActive wrapper
#proactive = os.path.join(proactive_home, 'bin', 'unix', 'rm-start-node')
proactive_pa_bundle
=
os
.
path
.
join
(
proactive_home
,
'PABundle'
)
proactive
=
os
.
path
.
join
(
proactive_pa_bundle
,
'startNode.sh'
)
proactive_wrapper
=
self
.
createRunningWrapper
(
'proactive_wrapper'
,
"""#!/bin/sh
export JAVA_HOME=%(java_home)s
cd %(bundle)s
sh %(proactive)s %(rmUrl)s %(nsname)s %(credential)s
"""
%
dict
(
java_home
=
self
.
options
[
'java_home'
].
strip
(),
bundle
=
proactive_pa_bundle
,
proactive
=
proactive
,
rmUrl
=
proactive_rmUrl
,
credential
=
proactive_credential
,
nsname
=
proactive_nsname
))
self
.
computer_partition
.
setConnectionDict
(
dict
(
#proactive_ip="[%s]" % (ipv6),
))
return
[
proactive_configuration_file
,
proactive_wrapper
]
\ No newline at end of file
slapos/slapos.recipe.proactive/src/slapos/recipe/proactive/template/ProActiveConfiguration.xml.in
0 → 100644
View file @
72a01c3c
<?xml version="1.0" encoding="UTF-8"?>
<ProActiveUserProperties>
<properties>
<prop
key=
"proactive.net.nolocal"
value=
"true"
/>
<prop
key=
"proactive.communication.protocol"
value=
"pamr"
/>
<prop
key=
"proactive.net.router.address"
value=
"%(router_address)s"
/>
<prop
key=
"proactive.net.router.port"
value=
"%(port)s"
/>
</properties>
<javaProperties>
</javaProperties>
</ProActiveUserProperties>
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