Commit 39fa7cf7 authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis Committed by Christos Stavrakakis

deploy: Support both wheezy and squeeze packages

Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
parent 777f6f3f
......@@ -20,22 +20,21 @@ python-memcache =
bridge-utils =
python-progress =
ganeti-instance-debootstrap =
python-django-south = squeeze-backports
[synnefo]
snf-astakos-app = stable
snf-common = stable
snf-cyclades-app = stable
snf-cyclades-gtools = stable
snf-django-lib = stable
python-astakosclient = stable
python-objpool = stable
snf-branding = stable
snf-webproject = stable
snf-pithos-app = stable
snf-pithos-backend = stable
snf-tools = stable
python-django-south = squeeze-backports
snf-astakos-app = squeeze
snf-common = squeeze
snf-cyclades-app = squeeze
snf-cyclades-gtools = squeeze
snf-django-lib = squeeze
python-astakosclient = squeeze
snf-branding = squeeze
snf-webproject = squeeze
snf-pithos-app = squeeze
snf-pithos-backend = squeeze
snf-tools = squeeze
[ganeti]
......@@ -43,13 +42,14 @@ snf-ganeti = 2.6.2+ippool11+hotplug5+extstorage3+rbdfix1+kvmfix2+nolvm+netxen-1~
ganeti-htools = 2.6.2+ippool11+hotplug5+extstorage3+rbdfix1+kvmfix2+nolvm+netxen-1~squeeze
[other]
snf-cloudcms = stable
snf-vncauthproxy = stable
snf-pithos-webclient = stable
snf-image = stable
snf-network = stable
nfdhcpd = stable
kamaki = stable
python-bitarray = stable
nfqueue-bindings-python = stable
snf-cloudcms = squeeze
snf-vncauthproxy = squeeze
snf-pithos-webclient = squeeze
snf-image = squeeze
snf-network = squeeze
python-objpool = squeeze
nfdhcpd = squeeze
kamaki = squeeze
python-bitarray = squeeze-backports
nfqueue-bindings-python = 0.3+physindev-1
[debian]
rabbitmq-server = testing
gunicorn = squeeze-backports
qemu-kvm = squeeze-backports
qemu = squeeze-backports
python-gevent = squeeze-backports
apache2 =
postgresql =
python-psycopg2 =
python-argparse =
nfs-kernel-server = squeeze-backports
nfs-common = squeeze-backports
bind9 =
vlan =
vlan =
lvm2 =
curl =
memcached =
python-memcache =
bridge-utils =
python-progress =
ganeti-instance-debootstrap =
python-django-south = squeeze-backports
[synnefo]
snf-astakos-app = squeeze
snf-common = squeeze
snf-cyclades-app = squeeze
snf-cyclades-gtools = squeeze
snf-django-lib = squeeze
python-astakosclient = squeeze
snf-branding = squeeze
snf-webproject = squeeze
snf-pithos-app = squeeze
snf-pithos-backend = squeeze
snf-tools = squeeze
[ganeti]
snf-ganeti = 2.6.2+ippool11+hotplug5+extstorage3+rbdfix1+kvmfix2+nolvm+netxen-1~squeeze
ganeti-htools = 2.6.2+ippool11+hotplug5+extstorage3+rbdfix1+kvmfix2+nolvm+netxen-1~squeeze
[other]
snf-cloudcms = squeeze
snf-vncauthproxy = squeeze
snf-pithos-webclient = squeeze
snf-image = squeeze
snf-network = squeeze
python-objpool = squeeze
nfdhcpd = squeeze
kamaki = squeeze
python-bitarray = squeeze-backports
nfqueue-bindings-python = 0.3+physindev-1
[debian]
rabbitmq-server = testing
gunicorn =
qemu-kvm =
qemu =
python-gevent =
apache2 =
postgresql =
python-psycopg2 =
python-argparse =
nfs-kernel-server =
nfs-common =
bind9 =
vlan =
vlan =
lvm2 =
curl =
memcached =
python-memcache =
bridge-utils =
python-progress =
ganeti-instance-debootstrap =
python-django-south =
[synnefo]
snf-astakos-app = wheezy
snf-common = wheezy
snf-cyclades-app = wheezy
snf-cyclades-gtools = wheezy
snf-django-lib = wheezy
python-astakosclient = wheezy
snf-branding = wheezy
snf-webproject = wheezy
snf-pithos-app = wheezy
snf-pithos-backend = wheezy
snf-tools = wheezy
[ganeti]
snf-ganeti = 2.6.2+ippool11+hotplug5+extstorage3+rbdfix1+kvmfix2+nolvm+netxen-1~wheezy
ganeti-htools = 2.6.2+ippool11+hotplug5+extstorage3+rbdfix1+kvmfix2+nolvm+netxen-1~wheezy
[other]
snf-cloudcms = wheezy
snf-vncauthproxy = wheezy
snf-pithos-webclient = wheezy
snf-image = wheezy
snf-network = wheezy
python-objpool = wheezy
nfdhcpd = wheezy
kamaki = wheezy
python-bitarray = wheezy
nfqueue-bindings-python = 0.3+physindev-1~wheezy
......@@ -77,20 +77,19 @@ def install_package(package):
APT_GET = "export DEBIAN_FRONTEND=noninteractive ;apt-get install -y --force-yes "
host_info = env.env.ips_info[env.host]
env.env.update_packages(host_info.os)
if ast.literal_eval(env.env.use_local_packages):
with settings(warn_only=True):
deb = local("ls %s/%s*%s_all.deb" % (env.env.packages, package, host_info.os))
if deb:
debug(env.host, " * Package %s found in %s..." % (package, env.env.packages))
put(deb, "/tmp/")
try_run("dpkg -i /tmp/%s*deb || " % package + APT_GET + "-f")
try_run("rm /tmp/%s*deb" % package)
try_run("dpkg -i /tmp/%s || " % os.path.basename(deb) + APT_GET + "-f")
try_run("rm /tmp/%s" % os.path.basename(deb))
return
info = getattr(env.env, package)
if info in ["squeeze-backports", "stable", "testing", "unstable"]:
if info == "squeeze-backports" and host_info.os == "wheezy":
info = host_info.os
if info in ["squeeze-backports", "stable", "testing", "unstable", "wheezy"]:
APT_GET += " -t %s %s " % (info, package)
elif info:
APT_GET += " %s=%s " % (package, info)
......
......@@ -83,6 +83,10 @@ class Alias(Host):
class Env(object):
def update_packages(self, os):
for section in self.conf.files[os]:
self.evaluate(os, section)
def evaluate(self, filename, section):
for k, v in self.conf.get_section(filename, section):
setattr(self, k, v)
......@@ -141,6 +145,8 @@ class Conf(object):
"vcluster": ["cluster", "image", "network"],
"synnefo": ["cred", "synnefo", "roles"],
"packages": ["debian", "ganeti", "synnefo", "other"],
"squeeze": ["debian", "ganeti", "synnefo", "other"],
"wheezy": ["debian", "ganeti", "synnefo", "other"],
"ganeti": [],
}
......@@ -204,6 +210,7 @@ class Conf(object):
self.nodes.set("info", "public_iface", get_default_route()[1])
def debug(host, msg):
print HEADER + host + \
......
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