Bump up pkg versions in kolla-toolbox
Currently we use Ansible 2.2 in kolla_toolbox, while lowest supported version is 2.6 - bumping up to 2.8. * Use upper constrains in Dockerfile.j2, instead of pinning them in here - Ansible is pinned to 2.8.* * Add no_log=True in kolla_keystone_user * Add endpoint_type as a param in kolla_keystone_service - now AnsibleModule requires all options to be defined, otherwise it throws an UnsupportedParameter error * Add openstack_release variable in kolla/common/config.py which is used for fetching upper-constraints.txt for desired release Change-Id: I2cb0ea2fde1b408d48b39bf7a54b898e850d31aa
This commit is contained in:
parent
bc717cba72
commit
e3108d93c6
@ -60,20 +60,22 @@ RUN {{ macros.install_pip(kolla_toolbox_pip_virtualenv_packages|customizable("pi
|
|||||||
ENV PATH {{ virtualenv_path }}/bin:$PATH
|
ENV PATH {{ virtualenv_path }}/bin:$PATH
|
||||||
|
|
||||||
{% set kolla_toolbox_pip_packages = [
|
{% set kolla_toolbox_pip_packages = [
|
||||||
'ansible==2.2.0.0',
|
'ansible==2.8.*',
|
||||||
'"cmd2<0.9.0"',
|
'cmd2',
|
||||||
'influxdb',
|
'influxdb',
|
||||||
'mysqlclient',
|
'mysqlclient',
|
||||||
'os-client-config==1.29.0',
|
'os-client-config',
|
||||||
'pbr==4.0.0',
|
'pbr',
|
||||||
'pymongo',
|
'pymongo',
|
||||||
'python-openstackclient==3.14.0',
|
'python-openstackclient',
|
||||||
'pytz',
|
'pytz',
|
||||||
'pyudev',
|
'pyudev',
|
||||||
'shade==1.27.1'
|
'shade'
|
||||||
] %}
|
] %}
|
||||||
|
|
||||||
RUN {{ macros.install_pip(kolla_toolbox_pip_packages | customizable("pip_packages"), constraints=false) }} \
|
RUN mkdir -p /requirements \
|
||||||
|
&& curl -sSL -o /requirements/upper-constraints.txt https://opendev.org/openstack/requirements/raw/branch/{{openstack_release}}/upper-constraints.txt \
|
||||||
|
&& {{ macros.install_pip(kolla_toolbox_pip_packages | customizable("pip_packages")) }} \
|
||||||
&& mkdir -p /etc/ansible /usr/share/ansible \
|
&& mkdir -p /etc/ansible /usr/share/ansible \
|
||||||
&& echo 'localhost ansible_connection=local ansible_python_interpreter={{ virtualenv_path }}/bin/python' > /etc/ansible/hosts \
|
&& echo 'localhost ansible_connection=local ansible_python_interpreter={{ virtualenv_path }}/bin/python' > /etc/ansible/hosts \
|
||||||
&& sed -i 's| "identity_api_version": "2.0",| "identity_api_version": "3",|' {{ os_client_config }}
|
&& sed -i 's| "identity_api_version": "2.0",| "identity_api_version": "3",|' {{ os_client_config }}
|
||||||
|
@ -37,7 +37,8 @@ def main():
|
|||||||
service_type=dict(required=True, type='str'),
|
service_type=dict(required=True, type='str'),
|
||||||
url=dict(required=True, type='str'),
|
url=dict(required=True, type='str'),
|
||||||
interface=dict(required=True, type='str'),
|
interface=dict(required=True, type='str'),
|
||||||
endpoint_region=dict(required=True, type='str')
|
endpoint_region=dict(required=True, type='str'),
|
||||||
|
endpoint_type=dict(type='str')
|
||||||
)
|
)
|
||||||
module = AnsibleModule(argument_spec)
|
module = AnsibleModule(argument_spec)
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ from ansible.module_utils.openstack import openstack_full_argument_spec
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = openstack_full_argument_spec(
|
argument_spec = openstack_full_argument_spec(
|
||||||
password=dict(required=True, type='str'),
|
password=dict(required=True, type='str', no_log=True),
|
||||||
project=dict(required=True, type='str'),
|
project=dict(required=True, type='str'),
|
||||||
role=dict(required=True, type='str'),
|
role=dict(required=True, type='str'),
|
||||||
user=dict(required=True, type='str')
|
user=dict(required=True, type='str')
|
||||||
|
@ -35,6 +35,7 @@ DISTRO_RELEASE = {
|
|||||||
'debian': 'buster',
|
'debian': 'buster',
|
||||||
'ubuntu': '18.04',
|
'ubuntu': '18.04',
|
||||||
}
|
}
|
||||||
|
OPENSTACK_RELEASE = 'master'
|
||||||
|
|
||||||
# This is noarch repository so we will use it on all architectures
|
# This is noarch repository so we will use it on all architectures
|
||||||
DELOREAN = \
|
DELOREAN = \
|
||||||
@ -269,6 +270,8 @@ _CLI_OPTS = [
|
|||||||
help=('Squash the image layers. WARNING: it will consume lots'
|
help=('Squash the image layers. WARNING: it will consume lots'
|
||||||
' of disk IO. "docker-squash" tool is required, install'
|
' of disk IO. "docker-squash" tool is required, install'
|
||||||
' it by "pip install docker-squash"')),
|
' it by "pip install docker-squash"')),
|
||||||
|
cfg.StrOpt('openstack-release', default=OPENSTACK_RELEASE,
|
||||||
|
help='OpenStack release for building kolla-toolbox'),
|
||||||
]
|
]
|
||||||
|
|
||||||
_BASE_OPTS = [
|
_BASE_OPTS = [
|
||||||
|
@ -672,6 +672,7 @@ class KollaWorker(object):
|
|||||||
elif self.base_arch == 'ppc64le':
|
elif self.base_arch == 'ppc64le':
|
||||||
self.debian_arch = 'ppc64el'
|
self.debian_arch = 'ppc64el'
|
||||||
self.images = list()
|
self.images = list()
|
||||||
|
self.openstack_release = conf.openstack_release
|
||||||
rpm_setup_config = ([repo_file for repo_file in
|
rpm_setup_config = ([repo_file for repo_file in
|
||||||
conf.rpm_setup_config if repo_file is not None])
|
conf.rpm_setup_config if repo_file is not None])
|
||||||
self.rpm_setup = self.build_rpm_setup(rpm_setup_config)
|
self.rpm_setup = self.build_rpm_setup(rpm_setup_config)
|
||||||
@ -918,6 +919,7 @@ class KollaWorker(object):
|
|||||||
'image_prefix': self.image_prefix,
|
'image_prefix': self.image_prefix,
|
||||||
'install_type': self.install_type,
|
'install_type': self.install_type,
|
||||||
'namespace': self.namespace,
|
'namespace': self.namespace,
|
||||||
|
'openstack_release': self.openstack_release,
|
||||||
'tag': self.tag,
|
'tag': self.tag,
|
||||||
'maintainer': self.maintainer,
|
'maintainer': self.maintainer,
|
||||||
'kolla_version': kolla_version,
|
'kolla_version': kolla_version,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user