[SOLVED] Using a direct Python script to install an application

Share your tips or issues concerning the WAPT Console or WAPT Agent here
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
User avatar
d3sys
Messages: 11
Registered: December 20, 2019 - 10:37 PM
Contact :

January 20, 2020 - 6:05 PM

Hello,
I admit I'm too lazy to search given the number of results and don't know how to properly formulate my request :roll: hence this new topic.

We're looking to install an application whose silent deployment is done via a Python script. I'd like to know exactly how to integrate it into the WAPT console without causing any damage, given the sensitive production environment... :geek:
Last edited by d3sys on 03 Apr 2020 - 22:02, edited 1 time.
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

January 22, 2020 - 1:53 PM

Hello d3sys
d3sys wrote: Jan 20, 2020 - 6:05 PM I admit I'm too lazy to search given the number of results and don't know how to properly formulate my request, :roll: hence the new topic.

We're looking to install an application whose silent deployment is done via a Python script. I'd like to know exactly how to integrate it into the WAPT console without causing any damage, given the sensitive production environment... :geek:
If you have another program that requires a Python environment, it's best to install the corresponding Python package (tis-python 2.7 or tis-python 3.6) because the WAPT Python version can change (in fact, it will soon change from version 2.7 to version 3.6 before the latest release in April). Therefore, your other Python programs should not depend on the WAPT Python version.

If you want to run a Python installation script, you must run it with the executable file itself (other than waptpython.exe), such as c:\python27\bin\python.exe mypythonscript.py. If you run a Python script that you haven't audited directly within the context of setup.py, you risk corrupting the setup.py execution environment (overwriting libraries of different versions, etc.). It is therefore important to do so in a separate context, hence the need to launch another Python interpreter.

Furthermore, if your installation script launches pip3.exe, you must remember that you will need a network connection available at the time of installation (which is not necessarily available in the context of waptexit when the machine shuts down).

In any case, without knowing the script in question, it's difficult to say more. I think there have been other posts on the forum about this.

Sincerely,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
User avatar
d3sys
Messages: 11
Registered: December 20, 2019 - 10:37 PM
Contact :

January 22, 2020 - 3:34 PM

If you want to run a Python installation script, you must run it using the executable file in question (other than waptpython.exe), such as c:\python27\bin\python.exe mypythonscript.py
I think that's it. Basically, to explain everything, the software developer planned regular updates, but these updates always require user intervention. So, to overcome this problem, they developed a script (in Python) that would allow us to silently and automatically deploy their updates via Wapt.
I'm testing the solution and will keep you informed.
User avatar
d3sys
Messages: 11
Registered: December 20, 2019 - 10:37 PM
Contact :

April 3, 2020 - 9:58 PM

I spoke with the software developers and in their new version they have included installation parameters that work very well with WAPT, so thank you very much!
Locked