@@ -7,52 +7,26 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
7
7
8
8
{% import "macros.j2" as macros with context %}
9
9
10
- {% set venv_path ='/var/lib/kolla/venv' %}
11
-
12
10
{{ macros.configure_user(name='bifrost') }}
13
11
14
12
{# NOTE(mgoddard): EPEL required for nginx #}
15
13
{{ macros.enable_extra_repos(['epel'] ) }}
16
14
17
15
{% set bifrost_base_packages = [
18
- 'cpio'
16
+ 'cpio' ,
19
17
] %}
20
18
21
- {% if base_package_type == 'rpm' %}
22
- {% set bifrost_base_packages = bifrost_base_packages + [
23
- 'python3.12' ,
24
- 'python3.12-devel'
25
- ] %}
26
- {% endif %}
27
-
28
19
{{ macros.install_packages(bifrost_base_packages | customizable("packages")) }}
29
20
30
- {# Ensure we use Python 3.12 on RPM-based systems #}
31
- {% if base_package_type == 'rpm' %}
32
- RUN cd /usr/bin && \
33
- rm -f python3 && \
34
- ln -s python3.12 python3
35
- {% endif %}
36
-
37
- ENV VENV {{ venv_path }}
21
+ ENV VENV /var/lib/kolla/venv
38
22
39
23
{% set bifrost_base_pip_packages = [
40
24
'/bifrost'
41
25
] %}
42
26
43
27
ADD bifrost-base-archive /bifrost-base-source
44
28
COPY build_arg.yml /tmp/build_arg.yml
45
-
46
- RUN mkdir -p /requirements \
47
- && curl -o /requirements/upper-constraints.txt ${UPPER_CONSTRAINTS_FILE:-https://releases.openstack.org/constraints/upper/{{ openstack_release }}} \
48
- && python3 -m venv --system-site-packages {{ venv_path }} \
49
- && KOLLA_DISTRO_PYTHON_VERSION=$(/usr/bin/python3 -c "import sys; print('{}.{}'.format(sys.version_info.major, sys.version_info.minor))") \
50
- && cd {{ venv_path }}/lib \
51
- && rm -f python3 \
52
- && ln -s python${KOLLA_DISTRO_PYTHON_VERSION} python3
53
-
54
29
RUN ln -s bifrost-base-source/* bifrost \
55
- && {{ macros.install_pip(['pip', 'wheel', 'setuptools'] ) }} \
56
30
&& {{ macros.install_pip(bifrost_base_pip_packages | customizable("pip_packages")) }}
57
31
58
32
WORKDIR /bifrost
@@ -63,10 +37,11 @@ ENV ANSIBLE_GATHER_TIMEOUT=30
63
37
{% block bifrost_ansible_install %}
64
38
{% - if base_package_type == 'deb' %}
65
39
RUN apt-get --error-on=any update && \
40
+ bash -c '$VENV/bin/pip install "ansible>=9,<10 " && \
66
41
{%- else %}
67
42
RUN echo " " && \
43
+ bash -c '$VENV/bin/pip install " ansible >=8,<9 " && \
68
44
{%- endif %}
69
- bash -c '$VENV/bin/pip install "ansible>=11,<12 " && \
70
45
$VENV/bin/ansible-galaxy collection install -r /bifrost/ansible-collections-requirements.yml && \
71
46
$VENV/bin/ansible-playbook -vvvv -i /bifrost/playbooks/inventory/target \
72
47
/bifrost/playbooks/install.yaml \
0 commit comments