Merge "Improve pip install process for offline deployment."
This commit is contained in:
commit
e068a3fb3d
@ -258,6 +258,7 @@ RUN {{ macros.install_packages(base_centos_yum_repo_packages | customizable("cen
|
|||||||
'ncurses',
|
'ncurses',
|
||||||
'procps-ng',
|
'procps-ng',
|
||||||
'python3',
|
'python3',
|
||||||
|
'python3-pip',
|
||||||
'socat',
|
'socat',
|
||||||
'sudo',
|
'sudo',
|
||||||
'tar',
|
'tar',
|
||||||
@ -329,6 +330,7 @@ COPY apt_preferences /etc/apt/preferences.d/kolla-custom
|
|||||||
'open-iscsi',
|
'open-iscsi',
|
||||||
'procps',
|
'procps',
|
||||||
'python3',
|
'python3',
|
||||||
|
'python3-pip',
|
||||||
'socat',
|
'socat',
|
||||||
'sudo',
|
'sudo',
|
||||||
'tgt']
|
'tgt']
|
||||||
|
@ -29,7 +29,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
|||||||
'elasticsearch-curator'
|
'elasticsearch-curator'
|
||||||
] %}
|
] %}
|
||||||
|
|
||||||
RUN {{ macros.install_pip(elasticsearch_curator_pip_packages | customizable("pip_packages"), constraints=false, pip_version="pip3") }} \
|
RUN {{ macros.install_pip(elasticsearch_curator_pip_packages | customizable("pip_packages"), constraints=false) }} \
|
||||||
&& mkdir -p /etc/elasticsearch-curator \
|
&& mkdir -p /etc/elasticsearch-curator \
|
||||||
&& chown -R elasticsearch: /etc/elasticsearch-curator
|
&& chown -R elasticsearch: /etc/elasticsearch-curator
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
|||||||
] %}
|
] %}
|
||||||
|
|
||||||
{{ macros.install_packages(gnocchi_base_packages | customizable("packages")) }}
|
{{ macros.install_packages(gnocchi_base_packages | customizable("packages")) }}
|
||||||
RUN {{ macros.install_pip(gnocchi_base_pip_packages | customizable("pip_packages"), constraints=false, pip_version="pip3") }}
|
RUN {{ macros.install_pip(gnocchi_base_pip_packages | customizable("pip_packages"), constraints=false) }}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif install_type == 'source' %}
|
{% elif install_type == 'source' %}
|
||||||
|
@ -55,10 +55,6 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{{ macros.install_packages(kolla_toolbox_packages | customizable("packages")) }}
|
{{ macros.install_packages(kolla_toolbox_packages | customizable("packages")) }}
|
||||||
|
|
||||||
{% block kolla_toolbox_source_install_python_pip %}
|
|
||||||
{{ macros.get_pip() }}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% set kolla_toolbox_pip_virtualenv_packages = [
|
{% set kolla_toolbox_pip_virtualenv_packages = [
|
||||||
'virtualenv'
|
'virtualenv'
|
||||||
] %}
|
] %}
|
||||||
|
@ -32,18 +32,9 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro get_pip() %}
|
{% macro install_pip(packages, constraints = true) %}
|
||||||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
|
||||||
&& python3 get-pip.py \
|
|
||||||
&& rm get-pip.py
|
|
||||||
{% endmacro %}
|
|
||||||
|
|
||||||
{% macro install_pip(packages, constraints = true, pip_version = pip) %}
|
|
||||||
{%- if packages is sequence and packages|length > 0 -%}
|
{%- if packages is sequence and packages|length > 0 -%}
|
||||||
{%- if not pip_version -%}
|
python{{ distro_python_version }} -m pip --no-cache-dir install --upgrade{{ ' ' }}
|
||||||
{%- set pip_version = 'pip' -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{{ pip_version }} --no-cache-dir install --upgrade{{ ' ' }}
|
|
||||||
{%- if constraints %}-c /requirements/upper-constraints.txt {% endif -%}
|
{%- if constraints %}-c /requirements/upper-constraints.txt {% endif -%}
|
||||||
{{ packages | join(' ') }}
|
{{ packages | join(' ') }}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
|
@ -196,10 +196,6 @@ ENV DEBIAN_FRONTEND noninteractive
|
|||||||
|
|
||||||
{{ macros.install_packages(openstack_base_packages | customizable("packages")) }}
|
{{ macros.install_packages(openstack_base_packages | customizable("packages")) }}
|
||||||
|
|
||||||
{% block source_install_python_pip %}
|
|
||||||
{{ macros.get_pip() }}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% set openstack_base_pip_packages = [
|
{% set openstack_base_pip_packages = [
|
||||||
'Babel',
|
'Babel',
|
||||||
'Mako',
|
'Mako',
|
||||||
|
@ -20,7 +20,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
|||||||
]
|
]
|
||||||
%}
|
%}
|
||||||
|
|
||||||
RUN {{ macros.install_pip(openvswitch_netcontrold_pip_packages | customizable("pip_packages"), constraints = false, pip_version = "pip3") }}
|
RUN {{ macros.install_pip(openvswitch_netcontrold_pip_packages | customizable("pip_packages"), constraints = false) }}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user