root/IoTa-Installer/lib/alfa.py @ 8fd1d584
2e0a7cb1 | Sylvain L. Sauvage | # -*- coding: utf-8 -*-
|
|
#
|
|||
# This program is a part of the IoTa project.
|
|||
#
|
|||
19b58bab | Rémy Ménard | # Copyright © 2012-2013 Université de Caen Basse-Normandie, GREYC
|
|
#
|
|||
2e0a7cb1 | Sylvain L. Sauvage | # 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.
|
|||
# <http://www.gnu.org/licenses/>
|
|||
#
|
|||
# See AUTHORS for a list of contributors.
|
|||
#
|
|||
from config import CONFIG
|
|||
import utils
|
|||
import installer
|
|||
class ALfAInstaller(installer.Installer):
|
|||
def __init__(self):
|
|||
96454bcd | Sylvain L. Sauvage | installer.Installer.__init__(self, "ALfA RMI server", "alfa", [
|
|
2e0a7cb1 | Sylvain L. Sauvage | ("Enter the archive file pathname", "alfa", "repo", {"type": "file"}),
|
|
("Enter the path where you want to unpack it", "alfa", "directory",
|
|||
{"type": "path"}),
|
|||
96454bcd | Sylvain L. Sauvage | ("Enter the name of the directory", "alfa", "name", {}),
|
|
("Enter the RMI name", "alfa", "rmi_name", {}),
|
|||
("Enter the RMI port number", "alfa", "rmi_port", {})
|
|||
2e0a7cb1 | Sylvain L. Sauvage | ], [
|
|
("application",
|
|||
96454bcd | Sylvain L. Sauvage | { "rmi-server-name": ("alfa", "rmi_name"),
|
|
2e0a7cb1 | Sylvain L. Sauvage | "rmi-server-host": ("global", "host"),
|
|
"rmi-server-port": ("alfa", "rmi_port"),
|
|||
8fd1d584 | Rémy Ménard | "ons-hosts": ("ons", "server"),
|
|
2e0a7cb1 | Sylvain L. Sauvage | "ons-domain-prefix": ("ons", "domain_prefix"),
|
|
bf9c3717 | Rémy Ménard | "pks-filename": ("cert", "keystore"),
|
|
19b58bab | Rémy Ménard | "pks-password": ("cert", "password"),
|
|
"trust-pks-filename": ("cert", "truststore"),
|
|||
"trust-pks-password": ("cert", "trustpassword"),
|
|||
2e0a7cb1 | Sylvain L. Sauvage | })
|
|
])
|
|||
def postConfigure(self):
|
|||
96454bcd | Sylvain L. Sauvage | url = "//" + CONFIG.get("global", "host") + ":" + self.cget("rmi_port") + "/" + self.cget("rmi_name")
|
|
self.cset("rmi_url", url)
|
|||
2e0a7cb1 | Sylvain L. Sauvage | ||
def postInstall(self):
|
|||
## start
|
|||
#utils.putMessage("Starting ALfA RMI server ...")
|
|||
#alfa_dir = CONFIG.get("alfa", "directory") + CONFIG.get("alfa", "name")
|
|||
#utils.sh_exec("(cd " + alfa_dir + " && ./launch.sh)&" )
|
|||
pass
|