10 Commits

Author SHA1 Message Date
Dmitry Tantsur
a28b8fa5bc Support installing with Python 3 on CentOS 7
RHEL/CentOS 8 dropped support for some older hardware that is still
in use. Since CentOS 7 has Python 3, let's support it for now.

Also fixes an issue with C.UTF-8 locale which does not seem to work on
CentOS 7 (and actually causes a failure with newer python packages).

Change-Id: I1b5797b030ef896ad4b2a95a504a0215ca6ee574
2020-07-31 18:12:28 +02:00
vmud213
541e8587a8 Fixes DIB_IPA_CERT certificate copy issue
When copying the DIB_IPA_CERT certificate to certificate bundle the script
fails due to incorrect print usage in python3

Change-Id: If130594b9ea041409c68498f1ae2239578217d07
2020-07-17 07:13:28 +00:00
Riccardo Pittau
dd4110adc5 Upgrade pip if it's too old
We upgrade pip only if the version is too old to not support the
-c option.

Change-Id: I6e633debb2bf97f397a4b3d252c25e4a41992a8d
2020-02-19 14:10:16 +01:00
Riccardo Pittau
46c78a10c1 Use correct command for Python virtualenv
Using the virtualenv command will generate a virtualenv with the
default python exec for the entire system, that means that even
if DIB_PYTHON is python3, the virtualenv will use python2.
With this change we use the venv embedded command if the version
of Python is 3.x to generate a virtualenv with the correct
Python 3 version.

Change-Id: I8bec32c5e0dae2dee27615146f946a9649f23fd1
2020-01-30 12:12:44 +01:00
Riccardo Pittau
22a12a3a41 Fix pip install pkgs with non-ascii characters in filenames
As found recently, pip with Python 3.6 and forward has some issues
installing tarballs that contain files with non-ascii characters
in their names.
This is due mainly to the fact that the default locale in the
system is set to C [1].
As a workaround, we run the installation of the packages in the
virtualenv forcing C.UTF-8 locale.

[1] https://github.com/pypa/pip/issues/7667

Change-Id: Idfb8b121a43a0bb74844fd63d5c2507d7b888b15
2020-01-30 12:07:32 +01:00
Dmitry Tantsur
19f046112d Update upper-constraints handling
For tinyIPA, migrate the generate_upper_constraints script in-tree.

For DIB, use a source repository with requirements to fetch
upper-constraints. As a nice side effect, it allows depending on
requirements patches in the CI.

Change-Id: I6be51b98adab641cfaa1613306cbdcc3b42de1c2
2019-10-18 12:49:28 +02:00
Dmitry Tantsur
eaaa1118ad DIB: default to installing pip and virtualenv from packages
This reduces the size of the image slightly. We don't need latest
versions since we update pip in our venv anyway.

Change-Id: I7729b8c286c641a7b70a775ffe73f9f1c9dbff2d
2019-10-09 07:50:20 +00:00
Riccardo Pittau
e97643d636 Use pip install-option to specify ipa install location
Change-Id: I7d054442fa2e1595a8d44fa797f078ecf42e31ce
2019-09-25 16:22:16 +02:00
Dmitry Tantsur
6c6fc65cd6 DIB: do not use /tmp for a virtualenv in the source build
We don't (and shouldn't) copy /tmp to the final image.

Also fix the service file permissions - it is not executable.

Change-Id: I75e09662a63768627f8123a7fe7f5d9ca2d942c5
2019-09-23 17:12:28 +02:00
Dmitry Tantsur
944c8525a3 DIB: rename files and paths to match the element name
Apparently, DIB is sensitive to file names, at least the package-install
feature. Let us make sure we use ironic-python-agent-ramdisk, not ironic-agent.

Change-Id: I929c0652c320734ff82dd257180c4b7bd156c478
2019-09-19 07:47:56 +00:00