Commit e537f9ac authored by Ilias Tsitsimpis's avatar Ilias Tsitsimpis Committed by Christos Stavrakakis
Browse files

ci: Install x2goserver

parent 478625ec
......@@ -2,7 +2,9 @@
# Timeouts in seconds
build_timeout = 240
# Apt repository to use
apt_repo = squeeze/
apt_repo =
deb squeeze/
deb squeeze main
# Synnefo git repo.
# If not set, snf-ci will copy and use the local repo.
synnefo_repo =
......@@ -68,6 +68,7 @@ def _check_fabric(fun):
"""wrapper function"""
if not self.fabric_installed:
self.fabric_installed = True
return fun(self, *args, **kwargs)
return wrapper
......@@ -78,6 +79,7 @@ def _check_kamaki(fun):
"""wrapper function"""
if not self.kamaki_installed:
self.kamaki_installed = True
return fun(self, *args, **kwargs)
return wrapper
......@@ -282,6 +284,7 @@ class SynnefoCI(object):
# Setup Firewall
self.setup_fabric()"Setup firewall")
accept_ssh_from = self.config.get('Global', 'accept_ssh_from')
......@@ -297,6 +300,24 @@ class SynnefoCI(object):
_run(cmd, False)
# Setup apt, download packages
self.logger.debug("Setup apt. Install x2goserver and firefox")
print self.config.get('Global', 'apt_repo')
cmd = """
echo 'APT::Install-Suggests "false";' >> /etc/apt/apt.conf
apt-get update
apt-get install curl --yes
echo -e "\n\n{0}" >> /etc/apt/sources.list
# Synnefo repo's key
curl | apt-key add -
# X2GO Key
apt-key adv --recv-keys --keyserver E1F958385BFE2B6E
apt-get install x2go-keyring
apt-get update
apt-get install x2goserver x2goserver-xsession iceweasel
""".format(self.config.get('Global', 'apt_repo'))
_run(cmd, False)
def _find_flavor(self, flavor_name):
"""Given a flavor_name (reg expression) find a flavor id to use"""
# Get a list of flavor names from config file
......@@ -444,18 +465,12 @@ class SynnefoCI(object):
def clone_repo(self, local_repo=False):
"""Clone Synnefo repo from slave server""""Configure repositories on remote server..")
self.logger.debug("Setup apt. Install curl, git and firefox")
self.logger.debug("Install/Setup git")
cmd = """
echo 'APT::Install-Suggests "false";' >> /etc/apt/apt.conf
apt-get update
apt-get install curl git iceweasel --yes
echo -e "\n\ndeb {0}" >> /etc/apt/sources.list
curl | apt-key add -
apt-get update
git config --global {1}
git config --global {2}
""".format(self.config.get('Global', 'apt_repo'),
self.config.get('Global', 'git_config_name'),
apt-get install git --yes
git config --global {0}
git config --global {1}
""".format(self.config.get('Global', 'git_config_name'),
self.config.get('Global', 'git_config_mail'))
_run(cmd, False)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment