Revision eaf0b161 ci/utils.py
b/ci/utils.py | ||
---|---|---|
68 | 68 |
"""wrapper function""" |
69 | 69 |
if not self.fabric_installed: |
70 | 70 |
self.setup_fabric() |
71 |
self.fabric_installed = True |
|
71 | 72 |
return fun(self, *args, **kwargs) |
72 | 73 |
return wrapper |
73 | 74 |
|
... | ... | |
78 | 79 |
"""wrapper function""" |
79 | 80 |
if not self.kamaki_installed: |
80 | 81 |
self.setup_kamaki() |
82 |
self.kamaki_installed = True |
|
81 | 83 |
return fun(self, *args, **kwargs) |
82 | 84 |
return wrapper |
83 | 85 |
|
... | ... | |
282 | 284 |
self._get_server_ip_and_port(server) |
283 | 285 |
self._copy_ssh_keys(ssh_keys) |
284 | 286 |
|
287 |
# Setup Firewall |
|
285 | 288 |
self.setup_fabric() |
286 | 289 |
self.logger.info("Setup firewall") |
287 | 290 |
accept_ssh_from = self.config.get('Global', 'accept_ssh_from') |
... | ... | |
297 | 300 |
""".format(accept_ssh_from) |
298 | 301 |
_run(cmd, False) |
299 | 302 |
|
303 |
# Setup apt, download packages |
|
304 |
self.logger.debug("Setup apt. Install x2goserver and firefox") |
|
305 |
print self.config.get('Global', 'apt_repo') |
|
306 |
cmd = """ |
|
307 |
echo 'APT::Install-Suggests "false";' >> /etc/apt/apt.conf |
|
308 |
apt-get update |
|
309 |
apt-get install curl --yes |
|
310 |
echo -e "\n\n{0}" >> /etc/apt/sources.list |
|
311 |
# Synnefo repo's key |
|
312 |
curl https://dev.grnet.gr/files/apt-grnetdev.pub | apt-key add - |
|
313 |
# X2GO Key |
|
314 |
apt-key adv --recv-keys --keyserver keys.gnupg.net E1F958385BFE2B6E |
|
315 |
apt-get install x2go-keyring |
|
316 |
apt-get update |
|
317 |
apt-get install x2goserver x2goserver-xsession iceweasel |
|
318 |
""".format(self.config.get('Global', 'apt_repo')) |
|
319 |
_run(cmd, False) |
|
320 |
|
|
300 | 321 |
def _find_flavor(self, flavor_name): |
301 | 322 |
"""Given a flavor_name (reg expression) find a flavor id to use""" |
302 | 323 |
# Get a list of flavor names from config file |
... | ... | |
444 | 465 |
def clone_repo(self, local_repo=False): |
445 | 466 |
"""Clone Synnefo repo from slave server""" |
446 | 467 |
self.logger.info("Configure repositories on remote server..") |
447 |
self.logger.debug("Setup apt. Install curl, git and firefox")
|
|
468 |
self.logger.debug("Install/Setup git")
|
|
448 | 469 |
cmd = """ |
449 |
echo 'APT::Install-Suggests "false";' >> /etc/apt/apt.conf |
|
450 |
apt-get update |
|
451 |
apt-get install curl git iceweasel --yes |
|
452 |
echo -e "\n\ndeb {0}" >> /etc/apt/sources.list |
|
453 |
curl https://dev.grnet.gr/files/apt-grnetdev.pub | apt-key add - |
|
454 |
apt-get update |
|
455 |
git config --global user.name {1} |
|
456 |
git config --global user.email {2} |
|
457 |
""".format(self.config.get('Global', 'apt_repo'), |
|
458 |
self.config.get('Global', 'git_config_name'), |
|
470 |
apt-get install git --yes |
|
471 |
git config --global user.name {0} |
|
472 |
git config --global user.email {1} |
|
473 |
""".format(self.config.get('Global', 'git_config_name'), |
|
459 | 474 |
self.config.get('Global', 'git_config_mail')) |
460 | 475 |
_run(cmd, False) |
461 | 476 |
|
Also available in: Unified diff