cybertec-postgresql / patroni-windows-packaging

Automate installing and launching of Patroni under Windows
Other
14 stars 7 forks source link

Very hard to install without internet access, once installer is copied #70

Open einhverfr opened 5 months ago

einhverfr commented 5 months ago

The PES system does include Python dependencies but there are several problems.

  1. There isn't a tested way to install all the dependencies. I eventually figured out that the dependencies were in the patroni/.patroni-packages folder. Additionally I figured out that pip install --no-index --find-links ./ worked for the whl files but not for the .tgz packages.
  2. It isn't clear how to handle the .tar.gz files. I ended up unpacking with 7zip and unpacking manually.
pashagolub commented 5 months ago

What are the steps to reproduce the bug? Any specific environment maybe?

einhverfr commented 5 months ago

Steps to reproduce:

Install current PES installer on an air-gapped Windows system and try to instal the Python dependencies from scratch. Follow the documentation. Patroni won't start becuase it is missing dependencies which are actually bundled.

Here;s what I figured out is missing:

The rest works pretty well. Though it may be that there is something missing in the documentation in terms of this>

einhverfr commented 5 months ago

Wheel and setuptools are required because there are three dependencies which do not have whl files but instead tar.gz files. And in Windows it is very hard to get this working without an internet connection.

TakashiArakane commented 1 month ago

How about adding the following to the patroni/.patroni-packages folder, and then install them in order with install.ps1? I have also been testing this in an offline environment, and have confirmed that it works as expected with Release V240516. (The versions may vary depending on the timing.)

python -m pip install --upgrade patroni\.patroni-packages\pip-24.0-py3-none-any.whl | Out-Default

pip3 install --no-index --find-links .patroni-pre-packages install
pip3 install --no-index --find-links .patroni-pre-packages setuptools
pip3 install --no-index --find-links .patroni-pre-packages wheel
pashagolub commented 1 month ago

@TakashiArakane sounds great! Why do we need pip wheel?