aboutsummaryrefslogtreecommitdiff
path: root/kolla
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-06-01 05:13:10 +0000
committerGerrit Code Review <review@openstack.org>2016-06-01 05:13:10 +0000
commit2bed574032c9b7aeb1676f1e2f251ce0d045515c (patch)
tree560902049020fc6c65a904d2293c81bf11a5ce58 /kolla
parentabef69d40518cf2697e5a4fb4485ffb99476ed29 (diff)
parent4044a3475e51f763f8d4f3feda003f0a4837f177 (diff)
downloadkolla-2bed574032c9b7aeb1676f1e2f251ce0d045515c.tar.gz
kolla-2bed574032c9b7aeb1676f1e2f251ce0d045515c.zip
Merge "Pin the base distro release version"
Diffstat (limited to 'kolla')
-rwxr-xr-xkolla/cmd/build.py8
-rw-r--r--kolla/common/config.py14
2 files changed, 16 insertions, 6 deletions
diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py
index 18ff68503..406771913 100755
--- a/kolla/cmd/build.py
+++ b/kolla/cmd/build.py
@@ -353,11 +353,6 @@ class KollaWorker(object):
self.namespace = conf.namespace
self.base = conf.base
self.base_tag = conf.base_tag
- if self.base == 'ubuntu' and self.base_tag == 'latest':
- self.base_tag = '14.04'
- # TODO(inc0): This will override default latest, which is xenial
- # if someone actually set up latest in their conf, it will be
- # overriden as well
self.install_type = conf.install_type
self.tag = conf.tag
self.images = list()
@@ -481,6 +476,8 @@ class KollaWorker(object):
def create_dockerfiles(self):
kolla_version = version.version_info.cached_version_string()
+ supported_distro_release = common_config.DISTRO_RELEASE.get(
+ self.base)
for path in self.docker_build_paths:
template_name = "Dockerfile.j2"
env = jinja2.Environment( # nosec: not used to render HTML
@@ -489,6 +486,7 @@ class KollaWorker(object):
values = {'base_distro': self.base,
'base_image': self.conf.base_image,
'base_distro_tag': self.base_tag,
+ 'supported_distro_release': supported_distro_release,
'install_metatype': self.install_metatype,
'image_prefix': self.image_prefix,
'install_type': self.install_type,
diff --git a/kolla/common/config.py b/kolla/common/config.py
index dbe6394f8..21ac064b6 100644
--- a/kolla/common/config.py
+++ b/kolla/common/config.py
@@ -18,7 +18,14 @@ from oslo_config import types
from kolla.version import version_info as version
-BASE_OS_DISTRO = ['centos', 'ubuntu', 'oraclelinux']
+BASE_OS_DISTRO = ['centos', 'ubuntu', 'oraclelinux', 'debian']
+DISTRO_RELEASE = {
+ 'centos': '7',
+ 'redhat': '7',
+ 'oraclelinux': '7',
+ 'debian': '8',
+ 'ubuntu': '14.04',
+}
RDO_MIRROR = "http://trunk.rdoproject.org/centos7"
DELOREAN = "{}/current-passed-ci/delorean.repo".format(RDO_MIRROR)
DELOREAN_DEPS = "{}/delorean-deps.repo".format(RDO_MIRROR)
@@ -294,5 +301,10 @@ def parse(conf, args, usage=None, prog=None,
prog=prog,
version=version.cached_version_string(),
default_config_files=default_config_files)
+
+ # NOTE(jeffrey4l): set the default base tag based on the
+ # base option
+ conf.set_default('base_tag', DISTRO_RELEASE.get(conf.base))
+
if not conf.base_image:
conf.base_image = conf.base