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
1264029a
Commit
1264029a
authored
Oct 20, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mark obsoletion.
parent
5a7bbe5e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
73 deletions
+1
-73
slapos/recipe/erp5/__init__.py
slapos/recipe/erp5/__init__.py
+1
-73
No files found.
slapos/recipe/erp5/__init__.py
View file @
1264029a
...
...
@@ -25,86 +25,14 @@
#
##############################################################################
from
slapos.recipe.librecipe
import
BaseSlapRecipe
import
binascii
import
os
import
pkg_resources
import
pprint
import
hashlib
import
sys
import
zc.buildout
import
zc.recipe.egg
import
ConfigParser
import
re
class
Recipe
(
BaseSlapRecipe
):
def
getTemplateFilename
(
self
,
template_name
):
return
pkg_resources
.
resource_filename
(
__name__
,
'template/%s'
%
template_name
)
site_id
=
'erp5'
def
_install
(
self
):
self
.
path_list
=
[]
self
.
requirements
,
self
.
ws
=
self
.
egg
.
working_set
()
# self.cron_d is a directory, where cron jobs can be registered
self
.
cron_d
=
self
.
installCrond
()
self
.
logrotate_d
,
self
.
logrotate_backup
=
self
.
installLogrotate
()
ca_conf
=
self
.
installCertificateAuthority
()
# memcached_conf = self.installMemcached(ip=self.getLocalIPv4Address(),
# port=11000)
# kumo_conf = self.installKumo(self.getLocalIPv4Address())
# conversion_server_conf = self.installConversionServer(
# self.getLocalIPv4Address(), 23000, 23060)
# mysql_conf = self.installMysqlServer(self.getLocalIPv4Address(), 45678)
user
,
password
=
self
.
installERP5
()
if
self
.
parameter_dict
.
get
(
"slap_software_type"
,
""
).
lower
()
==
"cluster"
:
# Site access is done by HAProxy
zope_access
,
site_access
,
key_access
=
self
.
installZopeCluster
(
ca_conf
)
else
:
zope_access
=
self
.
installZopeStandalone
()
site_access
=
zope_access
key_access
=
None
key
,
certificate
=
self
.
requestCertificate
(
'Login Based Access'
)
# apache_conf = dict(
# apache_login=self.installBackendApache(ip=self.getGlobalIPv6Address(),
# port=13000, backend=site_access, key=key, certificate=certificate))
connection_dict
=
dict
(
site_url
=
apache_conf
[
'apache_login'
])
if
self
.
parameter_dict
.
get
(
"domain_name"
)
is
not
None
:
connection_dict
[
"backend_url"
]
=
apache_conf
[
'apache_login'
]
connection_dict
[
"domain_ip"
]
=
self
.
getGlobalIPv6Address
()
# XXX Define a fake domain_name for now.
frontend_name
=
self
.
parameter_dict
.
get
(
"domain_name"
)
frontend_key
,
frontend_certificate
=
\
self
.
requestCertificate
(
frontend_name
)
connection_dict
[
"site_url"
]
=
self
.
installFrontendZopeApache
(
ip
=
self
.
getGlobalIPv6Address
(),
port
=
4443
,
name
=
frontend_name
,
frontend_path
=
'/'
,
backend_path
=
''
,
backend_url
=
apache_conf
[
'apache_login'
],
key
=
frontend_key
,
certificate
=
frontend_certificate
)
# self.installTestRunner(ca_conf, mysql_conf, conversion_server_conf,
# memcached_conf, kumo_conf)
# self.installTestSuiteRunner(ca_conf, mysql_conf, conversion_server_conf,
# memcached_conf, kumo_conf)
self
.
linkBinary
()
connection_dict
.
update
(
**
dict
(
site_user
=
user
,
site_password
=
password
,
memcached_url
=
memcached_conf
[
'memcached_url'
],
kumo_url
=
kumo_conf
[
'kumo_address'
]
))
if
key_access
is
not
None
:
connection_dict
[
'key_access'
]
=
key_access
self
.
setConnectionDict
(
connection_dict
)
return
self
.
path_list
raise
NotImplementedError
(
'Outdated.'
)
def
installFrontendZopeApache
(
self
,
ip
,
port
,
name
,
frontend_path
,
backend_url
,
backend_path
,
key
,
certificate
,
access_control_string
=
None
):
...
...
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