add base_arch variable for future non-x86 work

This variable will allow to select which target architecture has to be
used.

Partially-Implements: blueprint multiarch-and-arm64-containers

Change-Id: I71ddb7ef57c64d2505cac96724b1ab6772a57d6a
This commit is contained in:
Marcin Juszkiewicz 2017-03-29 11:16:42 +02:00
parent ce716ebe22
commit 658bd38ca5
3 changed files with 10 additions and 0 deletions

View File

@ -19,6 +19,7 @@ from kolla.version import version_info as version
BASE_OS_DISTRO = ['centos', 'rhel', 'ubuntu', 'oraclelinux', 'debian']
BASE_ARCH = ['x86_64']
DISTRO_RELEASE = {
'centos': '7',
'rhel': '7',
@ -154,6 +155,9 @@ _CLI_OPTS = [
help='The base distro image tag'),
cfg.StrOpt('base-image',
help='The base image name. Default is the same with base'),
cfg.StrOpt('base-arch', default='x86_64',
choices=BASE_ARCH,
help='The base architecture.'),
cfg.BoolOpt('debug', short='d', default=False,
help='Turn on debugging log level'),
cfg.DictOpt('build-args',

View File

@ -530,6 +530,7 @@ class KollaWorker(object):
self.base_tag = conf.base_tag
self.install_type = conf.install_type
self.tag = conf.tag
self.base_arch = conf.base_arch
self.images = list()
rpm_setup_config = ([repo_file for repo_file in
conf.rpm_setup_config if repo_file is not None])
@ -699,6 +700,7 @@ class KollaWorker(object):
values = {'base_distro': self.base,
'base_image': self.conf.base_image,
'base_distro_tag': self.base_tag,
'base_arch': self.base_arch,
'supported_distro_release': supported_distro_release,
'install_metatype': self.install_metatype,
'image_prefix': self.image_prefix,

View File

@ -0,0 +1,4 @@
---
features:
- New CLI argument "--base-arch" allows to select which architecture is
targetted by build.