Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
749c7407
Commit
749c7407
authored
Aug 22, 2013
by
Ilias Tsitsimpis
Browse files
ci: Install x2goserver
parent
1167f34a
Changes
2
Hide whitespace changes
Inline
Side-by-side
ci/new_config
View file @
749c7407
...
...
@@ -2,7 +2,9 @@
# Timeouts in seconds
build_timeout = 240
# Apt repository to use
apt_repo = http://apt.dev.grnet.gr squeeze/
apt_repo =
deb http://apt.dev.grnet.gr squeeze/
deb http://packages.x2go.org/debian squeeze main
# Synnefo git repo.
# If not set, snf-ci will copy and use the local repo.
synnefo_repo = https://code.grnet.gr/git/synnefo
...
...
ci/utils.py
View file @
749c7407
...
...
@@ -68,6 +68,7 @@ def _check_fabric(fun):
"""wrapper function"""
if
not
self
.
fabric_installed
:
self
.
setup_fabric
()
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
.
setup_kamaki
()
self
.
kamaki_installed
=
True
return
fun
(
self
,
*
args
,
**
kwargs
)
return
wrapper
...
...
@@ -282,6 +284,7 @@ class SynnefoCI(object):
self
.
_get_server_ip_and_port
(
server
)
self
.
_copy_ssh_keys
(
ssh_keys
)
# Setup Firewall
self
.
setup_fabric
()
self
.
logger
.
info
(
"Setup firewall"
)
accept_ssh_from
=
self
.
config
.
get
(
'Global'
,
'accept_ssh_from'
)
...
...
@@ -297,6 +300,24 @@ class SynnefoCI(object):
"""
.
format
(
accept_ssh_from
)
_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 https://dev.grnet.gr/files/apt-grnetdev.pub | apt-key add -
# X2GO Key
apt-key adv --recv-keys --keyserver keys.gnupg.net 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"""
self
.
logger
.
info
(
"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\n
deb {0}" >> /etc/apt/sources.list
curl https://dev.grnet.gr/files/apt-grnetdev.pub | apt-key add -
apt-get update
git config --global user.name {1}
git config --global user.email {2}
"""
.
format
(
self
.
config
.
get
(
'Global'
,
'apt_repo'
),
self
.
config
.
get
(
'Global'
,
'git_config_name'
),
apt-get install git --yes
git config --global user.name {0}
git config --global user.email {1}
"""
.
format
(
self
.
config
.
get
(
'Global'
,
'git_config_name'
),
self
.
config
.
get
(
'Global'
,
'git_config_mail'
))
_run
(
cmd
,
False
)
...
...
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