Révision 8fd1d584
Ajouté par Remy Menard il y a plus de 11 ans
IoTa-Installer/lib/dseta.py | ||
---|---|---|
#
|
||
from config import CONFIG
|
||
import installer
|
||
import utils
|
||
|
||
|
||
class DSeTaInstaller(installer.WebAppInstaller):
|
||
|
||
class DSeTaInstaller(installer.DBWebAppInstaller):
|
||
|
||
def __init__(self):
|
||
installer.WebAppInstaller.__init__(self, "DSeTa Web Server", "dseta", [
|
||
installer.DBWebAppInstaller.__init__(self, "DSeTa Web Server", "dseta", [
|
||
("Enter the DSeTa web application name", "dseta", "name", {}),
|
||
("Enter the archive file pathname", "dseta", "repo", {"type": "file"}),
|
||
("Enter the server identity (sgln) (same as actual DS)", "ds", "server_identity", {}),
|
||
("Enter the URL of the actual DS", "ds", "url", {}),
|
||
("Enter your DS login for the actual DS", "dseta", "ds_login", {}),
|
||
("Enter your DS password for the actual DS", "dseta", "ds_password", {})
|
||
("Enter the DSeTa database name", "dseta", "db_name", {}),
|
||
("Enter the DSeTa database login", "dseta", "db_login", {}),
|
||
("Enter the DSeTa database password", "dseta", "db_password", {}),
|
||
("Enter the URL to the XACML module", "ds_policies", "xacml_url", {}),
|
||
("Use as multi DSeTa instance?", "dseta", "multi_dseta_architecture",
|
||
{"type": "YN"}),
|
||
("Enter the server identity (URL)", "dseta", "server_identity",
|
||
{"when": ("dseta", "multi_ds_architecture")}),
|
||
("Enter one or several ONS IP address(es) (comma separated)", "dseta", "ons_hosts",
|
||
{"when": ("dseta", "multi_ds_architecture")}),
|
||
("Enter the ONS Domain Prefix", "dseta", "ons_domain_prefix",
|
||
{"when": ("dseta", "multi_ds_architecture")}),
|
||
("Enter the ActiveMQ URL", "activemq", "url",
|
||
{"when": ("dseta", "multi_dseta_architecture")}),
|
||
("Enter the ActiveMQ user login (may be empty)", "activemq", "login",
|
||
{"when": ("dseta", "multi_dseta_architecture")}),
|
||
("Enter the ActiveMQ user password (may be empty)", "activemq", "password",
|
||
{"when": ("dseta", "multi_dseta_architecture")}),
|
||
("Enter the JMS queue name of events to publish", "dseta", "topublish_jms_queue_name",
|
||
{"when": ("dseta", "multi_dseta_architecture")}),
|
||
("Enter the JMS message name property to set the time of the last try to publish", "dseta", "jms_message_time_property",
|
||
{"when": ("dseta", "multi_dseta_architecture")}),
|
||
("Enter the startup delay", "dseta", "publisher_delay",
|
||
{"when": ("dseta", "multi_dseta_architecture")}),
|
||
("Enter the publishing timeout (wait for event to publish)", "dseta", "publisher_timeout",
|
||
{"when": ("dseta", "multi_dseta_architecture")}),
|
||
("Enter the publishing period (time between each launch)", "dseta", "publisher_period",
|
||
{"when": ("dseta", "multi_dseta_architecture")}),
|
||
], [
|
||
("application",
|
||
{ "service-id": ("ds", "server_identity"),
|
||
"ons": ("ons", "server"),
|
||
"ons-domain-prefix": ("ons", "domain_prefix"),
|
||
"wings-login": ("dseta", "ds_login"),
|
||
"wings-password": ("dseta", "ds_password"),
|
||
"wings-url": ("ds", "url"),
|
||
"xacml-default-user": ("global", "anonymous_user") })
|
||
{ "xacml-url": ("ds_policies", "xacml_url"),
|
||
"xacml-use-tls-id" : ("global", "use_tls_id"),
|
||
"xacml-default-user" : ("global", "default_user"),
|
||
"xacml-anonymous-user" : ("global", "anonymous_user"),
|
||
"pks-filename": ("cert", "keystore"),
|
||
"pks-password": ("cert", "password"),
|
||
"trust-pks-filename": ("cert", "truststore"),
|
||
"trust-pks-password": ("cert", "trustpassword"),
|
||
"service-id": ("dseta", "server_identity"),
|
||
"ons-hosts": ("dseta", "ons_hosts"),
|
||
"ons-domain-prefix": ("dseta", "ons_domain_prefix"),
|
||
"multi-dseta-architecture": ("dseta", "multi_dseta_architecture"),
|
||
"publisher-delay": ("dseta", "publisher_delay"),
|
||
"publisher-timeout": ("dseta", "publisher_timeout"),
|
||
"publisher-period": ("dseta", "publisher_period"),
|
||
"jms-url": ("activemq", "url"),
|
||
"jms-login": ("activemq", "login"),
|
||
"jms-password": ("activemq", "password"),
|
||
"jms-queue-name": ("dseta", "topublish_jms_queue_name"),
|
||
"jms-message-time-property": ("dseta", "jms_message_time_property"),
|
||
})
|
||
])
|
||
|
||
|
||
def postConfigure(self):
|
||
self.setSecuredURL()
|
||
CONFIG.set("epcilon", "ds_url", self.cget("url") + "ided_ds")
|
||
self.cset("db_jndi", "DSETADB")
|
||
CONFIG.set("epcilon", "ds_url", self.cget("url"))
|
||
CONFIG.set("epcilon", "iota_ided", "True")
|
||
|
||
|
||
def postUnpack(self):
|
||
if self.cisTrue("multi_dseta_architecture"):
|
||
webxml_path = CONFIG.get("tomcat", "catalina_home") + "webapps/" + self.cget("name") + "/WEB-INF/web.xml"
|
||
cmd = """sed -i '
|
||
/<\/web-app>/i\\
|
||
<listener>\\
|
||
<listener-class>fr.unicaen.iota.dseta.service.PublisherContextListener</listener-class>\\
|
||
</listener>' %s""" % webxml_path
|
||
if not utils.sh_exec(cmd):
|
||
utils.putWarning("The Publisher listener could not be added to web.xml")
|
Formats disponibles : Unified diff
Version 2.0
- upgrades Apache CXF to 2.7.5
- upgrades Apache ActiveMQ to 5.8.0
- license LGPL-3 for client libraries
- a few bugs fixed!
- use Apache CXF
- use JMS to store events to publish
- uses GaMMa for event mapping with OpenLayers
- "trace" and "DS" services are fully functionnal
- uses YPSilon
- access to the web interface of policy management is made by
certificate
- adds the MasterData to the web interface of policy management
- retrieves the owner of MasterData in the attributes if missing from
the extensions
- removes calls to old CXF classes to avoid compatibility problems
- installs and configures the new DS and DSeTa
- adds GaMMa to LaMBDa
- upgrades Apache Tomcat to 7.0.41 and mysql-connector to 5.1.25