aboutsummaryrefslogtreecommitdiff
path: root/kolla
diff options
context:
space:
mode:
Diffstat (limited to 'kolla')
-rwxr-xr-xkolla/common/config.py6
-rwxr-xr-xkolla/image/build.py49
-rw-r--r--kolla/template/repos.yaml6
-rw-r--r--kolla/tests/test_build.py52
-rw-r--r--kolla/tests/test_methods.py11
5 files changed, 14 insertions, 110 deletions
diff --git a/kolla/common/config.py b/kolla/common/config.py
index 4fee052b7..e47530397 100755
--- a/kolla/common/config.py
+++ b/kolla/common/config.py
@@ -19,18 +19,16 @@ from oslo_config import types
from kolla.version import version_info as version
-BASE_OS_DISTRO = ['centos', 'rhel', 'ubuntu', 'debian']
+BASE_OS_DISTRO = ['centos', 'debian', 'ubuntu']
BASE_ARCH = ['x86_64', 'aarch64']
DEFAULT_BASE_TAGS = {
'centos': {'name': 'quay.io/centos/centos', 'tag': 'stream8'},
- 'rhel': {'name': 'registry.access.redhat.com/ubi8', 'tag': 'latest'},
'debian': {'name': 'debian', 'tag': 'bullseye'},
'ubuntu': {'name': 'ubuntu', 'tag': '20.04'},
}
# NOTE(hrw): has to match PRETTY_NAME in /etc/os-release
DISTRO_PRETTY_NAME = {
'centos': 'CentOS Stream 8',
- 'rhel': 'Red Hat Enterprise Linux 8',
'debian': 'Debian GNU/Linux 11 (bullseye)',
'ubuntu': 'Ubuntu 20.04',
}
@@ -42,7 +40,7 @@ DELOREAN = "https://trunk.rdoproject.org/centos8-wallaby/" \
DELOREAN_DEPS = "https://trunk.rdoproject.org/centos8-wallaby/" \
"delorean-deps.repo"
-INSTALL_TYPE_CHOICES = ['binary', 'source', 'rdo', 'rhos']
+INSTALL_TYPE_CHOICES = ['binary', 'source']
# TODO(mandre) check for file integrity instead of downloading from an HTTPS
# source
diff --git a/kolla/image/build.py b/kolla/image/build.py
index c017d1143..fc897bdd2 100755
--- a/kolla/image/build.py
+++ b/kolla/image/build.py
@@ -657,59 +657,29 @@ class KollaWorker(object):
conf.rpm_setup_config if repo_file is not None])
self.rpm_setup = self.build_rpm_setup(rpm_setup_config)
- rh_base = ['centos', 'rhel']
- rh_type = ['source', 'binary', 'rdo', 'rhos']
- deb_base = ['ubuntu', 'debian']
- deb_type = ['source', 'binary']
-
- if self.base in rh_base:
+ if self.base in ['centos']:
self.conf.distro_python_version = "3.6"
+ self.distro_package_manager = 'dnf'
+ self.base_package_type = 'rpm'
elif self.base in ['debian']:
self.conf.distro_python_version = "3.9"
+ self.distro_package_manager = 'apt'
+ self.base_package_type = 'deb'
elif self.base in ['ubuntu']:
self.conf.distro_python_version = "3.8"
+ self.distro_package_manager = 'apt'
+ self.base_package_type = 'deb'
else:
# Assume worst
self.conf.distro_python_version = "3.6"
if self.conf.distro_package_manager is not None:
- package_manager = self.conf.distro_package_manager
- elif self.base in rh_base:
- package_manager = 'dnf'
- elif self.base in deb_base:
- package_manager = 'apt'
- self.distro_package_manager = package_manager
+ self.distro_package_manager = self.conf.distro_package_manager
- self.clean_package_cache = self.conf.clean_package_cache
-
- # Determine base packaging type for use in Dockerfiles.
if self.conf.base_package_type:
self.base_package_type = self.conf.base_package_type
- elif self.base in rh_base:
- self.base_package_type = 'rpm'
- elif self.base in deb_base:
- self.base_package_type = 'deb'
-
- if not ((self.base in rh_base and self.install_type in rh_type) or
- (self.base in deb_base and self.install_type in deb_type)):
- raise exception.KollaMismatchBaseTypeException(
- '{} is unavailable for {}'.format(self.install_type, self.base)
- )
- if self.install_type == 'binary':
- self.install_metatype = 'rdo'
- elif self.install_type == 'source':
- self.install_metatype = 'mixed'
- elif self.install_type == 'rdo':
- self.install_type = 'binary'
- self.install_metatype = 'rdo'
- elif self.install_type == 'rhos':
- self.install_type = 'binary'
- self.install_metatype = 'rhos'
- else:
- raise exception.KollaUnknownBuildTypeException(
- 'Unknown install type'
- )
+ self.clean_package_cache = self.conf.clean_package_cache
if (self.install_type == 'binary' and self.base == 'debian' and
self.base_arch != 'x86_64'):
@@ -904,7 +874,6 @@ class KollaWorker(object):
'debian_arch': self.debian_arch,
'docker_healthchecks': self.docker_healthchecks,
'supported_distro_name': supported_distro_name,
- 'install_metatype': self.install_metatype,
'image_prefix': self.image_prefix,
'infra_image_prefix': self.infra_image_prefix,
'install_type': self.install_type,
diff --git a/kolla/template/repos.yaml b/kolla/template/repos.yaml
index 2733e0a90..d0ea99cbd 100644
--- a/kolla/template/repos.yaml
+++ b/kolla/template/repos.yaml
@@ -37,12 +37,6 @@ centos-aarch64:
rabbitmq: "rabbitmq_rabbitmq-server"
td-agent: "treasuredata"
-rhel:
- erlang: "centos-rabbitmq-38"
- hacluster: "ha"
- opstools: "centos-opstools"
- rabbitmq: "centos-rabbitmq-38"
-
# NOTE(mnasiadka): Erlang repo - Debian Buster/Bullseye needs to use bionic as per RabbitMQ docs
debian:
elasticsearch: "deb https://artifacts.elastic.co/packages/oss-7.x/apt stable main"
diff --git a/kolla/tests/test_build.py b/kolla/tests/test_build.py
index 422dfcd73..0200fadd7 100644
--- a/kolla/tests/test_build.py
+++ b/kolla/tests/test_build.py
@@ -18,7 +18,6 @@ import sys
from unittest import mock
from kolla.cmd import build as build_cmd
-from kolla import exception
from kolla.image import build
from kolla.tests import base
@@ -361,14 +360,11 @@ class KollaWorkerTest(base.TestCase):
self.mock_client = patcher.start()
def test_supported_base_type(self):
- rh_base = ['centos', 'rhel']
- rh_type = ['source', 'binary', 'rdo', 'rhos']
- deb_base = ['ubuntu', 'debian']
- deb_type = ['source', 'binary']
+ build_base = ['centos', 'debian', 'ubuntu']
+ build_type = ['source', 'binary']
for base_distro, install_type in itertools.chain(
- itertools.product(rh_base, rh_type),
- itertools.product(deb_base, deb_type)):
+ itertools.product(build_base, build_type)):
self.conf.set_override('base', base_distro)
if base_distro == 'debian' and install_type == 'binary':
self.conf.set_override('base_arch', 'x86_64')
@@ -376,14 +372,6 @@ class KollaWorkerTest(base.TestCase):
# should no exception raised
build.KollaWorker(self.conf)
- def test_unsupported_base_type(self):
- for base_distro, install_type in itertools.product(
- ['ubuntu', 'debian'], ['rdo', 'rhos']):
- self.conf.set_override('base', base_distro)
- self.conf.set_override('install_type', install_type)
- self.assertRaises(exception.KollaMismatchBaseTypeException,
- build.KollaWorker, self.conf)
-
def test_build_image_list_adds_plugins(self):
self.conf.set_override('install_type', 'source')
@@ -534,20 +522,6 @@ class KollaWorkerTest(base.TestCase):
kolla = build.KollaWorker(self.conf)
self.assertEqual('3.9', kolla.distro_python_version)
- def test_build_distro_python_version_rhel80(self):
- """check distro_python_version for RHEL8.0"""
- self.conf.set_override('base', 'rhel')
- self.conf.set_override('base_tag', '8.0')
- kolla = build.KollaWorker(self.conf)
- self.assertEqual('3.6', kolla.distro_python_version)
-
- def test_build_distro_python_version_rhel8(self):
- """check distro_python_version for RHEL8"""
- self.conf.set_override('base', 'rhel')
- self.conf.set_override('base_tag', '8')
- kolla = build.KollaWorker(self.conf)
- self.assertEqual('3.6', kolla.distro_python_version)
-
def test_build_distro_python_version_ubuntu(self):
"""check distro_python_version for Ubuntu"""
self.conf.set_override('base', 'ubuntu')
@@ -567,20 +541,6 @@ class KollaWorkerTest(base.TestCase):
kolla = build.KollaWorker(self.conf)
self.assertEqual('foo', kolla.distro_package_manager)
- def test_build_distro_package_manager_rhel8(self):
- """check distro_package_manager dnf for rhel8"""
- self.conf.set_override('base', 'rhel')
- self.conf.set_override('base_tag', '8')
- kolla = build.KollaWorker(self.conf)
- self.assertEqual('dnf', kolla.distro_package_manager)
-
- def test_build_distro_package_manager_rhel8_minor(self):
- """check distro_package_manager dnf for rhel8"""
- self.conf.set_override('base', 'rhel')
- self.conf.set_override('base_tag', '8.1.2')
- kolla = build.KollaWorker(self.conf)
- self.assertEqual('dnf', kolla.distro_package_manager)
-
def test_build_distro_package_manager_debian(self):
"""check distro_package_manager apt for debian"""
self.conf.set_override('base', 'debian')
@@ -600,12 +560,6 @@ class KollaWorkerTest(base.TestCase):
kolla = build.KollaWorker(self.conf)
self.assertEqual('pip', kolla.base_package_type)
- def test_base_package_type_rhel(self):
- """check base_package_type rpm for rhel"""
- self.conf.set_override('base', 'rhel')
- kolla = build.KollaWorker(self.conf)
- self.assertEqual('rpm', kolla.base_package_type)
-
def test_base_package_type_debian(self):
"""check base_package_type deb for debian"""
self.conf.set_override('base', 'debian')
diff --git a/kolla/tests/test_methods.py b/kolla/tests/test_methods.py
index 65d54a687..1ff8ec30f 100644
--- a/kolla/tests/test_methods.py
+++ b/kolla/tests/test_methods.py
@@ -22,17 +22,6 @@ class MethodsTest(base.TestCase):
expectCmd = 'apt-get -y install --no-install-recommends package2.deb'
self.assertEqual(expectCmd, result.split("&&")[1].strip())
- def test_enable_repos_rhel(self):
- template_vars = {
- 'base_arch': 'x86_64',
- 'base_distro': 'rhel',
- 'base_package_type': 'rpm',
- }
-
- result = methods.handle_repos(template_vars, ['grafana'], 'enable')
- expectCmd = ''
- self.assertEqual(expectCmd, result)
-
def test_enable_repos_centos(self):
template_vars = {
'base_arch': 'x86_64',