IBM Security QRadar SOAR

 View Only
Expand all | Collapse all

Upgrade Python 2.7 to 3.x

  • 1.  Upgrade Python 2.7 to 3.x

    Posted Fri July 12, 2019 02:14 PM
    I need to upgrade Python 2.7 that has the Resilient appliance.
    Although it is not supported or recommended, there are many functions that require it and the client is not willing to have a resilient-circuit in another server.

    Suggestion or steps to follow?

    Thank you

    ------------------------------
    Juan Cruz Del Col
    ------------------------------


  • 2.  RE: Upgrade Python 2.7 to 3.x

    Posted Mon July 15, 2019 03:26 AM
    Hi Juan,
    Please take a look at a <g class="gr_ gr_61 gr-alert gr_spell gr_inline_cards gr_disable_anim_appear ContextualSpelling ins-del multiReplace" id="61" data-gr-id="61">virtualenv</g> package (https://pypi.org/project/virtualenv/). You will be able to create several different Python environments.
    Check this 10 minutes tutorial for the tool -https://www.youtube.com/watch?v=N5vscPTWKOk
    BR,
    Alex.

    ------------------------------
    Alexander Saulenko
    ------------------------------



  • 3.  RE: Upgrade Python 2.7 to 3.x

    Posted Mon July 15, 2019 01:08 PM
    @Alexander Saulenko
    I have reviewed the links that you passed, but I can not do the Python version upgrade.
    I understand what you mention about having a virtual environment so as not to affect the core of Resilient. But I do not understand how resilient-circuits would work with it.​



    ------------------------------
    Juan Cruz Del Col
    ------------------------------



  • 4.  RE: Upgrade Python 2.7 to 3.x

    Posted Tue July 16, 2019 04:39 AM
    Hi Juan,

    My understanding (I could be wrong and I hope community members can correct me if it is needed) of the question is the following:
    1. You install python 3 using the make altinstall command to not overwrite existing python installation (https://stackoverflow.com/questions/8087184/installing-python-3-on-rhel)
    2. You install a virtualenv and create different python virtual environments with different resilient-circuits packages
    3. You use different functions and necessary python libraries for each virtual environment.

    To be honest, I have not tested it in my environment but this is my understanding of the concept.
    I hope it helped.

    BR,
    Alex.

    ------------------------------
    Alexander Saulenko
    ------------------------------



  • 5.  RE: Upgrade Python 2.7 to 3.x

    Posted Tue July 16, 2019 10:07 AM
    Thank you very much for the reply.
    The most serious problem is that the "geniuses" of IBM Resilient, provide functions that only work with python3 and the appliance works with python2.7 .... applause to the geniuses!

    After the sarcasm!

    When I try to run the "./configure" it always gives me the same error:

    -bash-4.2$ ./configure
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking for --enable-universalsdk... no
    checking for --with-universal-archs... no
    checking MACHDEP... linux
    checking for --without-gcc... no
    checking for gcc... no
    checking for cc... no
    checking for cl.exe... no
    configure: error: in `/home/resadmin/TEST/Python-3.4.3':
    configure: error: no acceptable C compiler found in $PATH
    See `config.log' for more details
    -bash-4.2$ make
    make: *** No targets specified and no makefile found. Stop.​

    Searching on the web, I found that I should have the "gcc libraries" installed, I've tried it, but it always fails.

    Any suggestions?

    ------------------------------
    Juan Cruz Del Col
    ------------------------------



  • 6.  RE: Upgrade Python 2.7 to 3.x

    Posted Tue July 16, 2019 10:27 AM
    Juan, please review the article: https://tecadmin.net/install-python-3-7-on-centos/

    "This Python installation required GCC compiler on your system. "

    Check if you had installed:
    <hprompt>gcc openssl-devel bzip2-devel libffi-devel</hprompt>

    BR,
    Alex

    ------------------------------
    Alexander Saulenko
    ------------------------------



  • 7.  RE: Upgrade Python 2.7 to 3.x

    IBM Champion
    Posted Tue July 16, 2019 10:27 AM
    I'm guessing you probably don't have gcc installed. I saw this error with another package I was trying to update, and installing gcc fixed the issue.

    If you do have it installed, it's install path is missing from your $PATH

    Try running: which gcc
    If it doesn't work, you probably don't have it.

    Try following this documentation to install:
    https://www.cyberciti.biz/faq/locate-linux-gnu-c-or-gcc-compiler-location/

    ------------------------------
    Jared Fagel
    Cyber Security Analyst Intern
    Public Utility
    ------------------------------



  • 8.  RE: Upgrade Python 2.7 to 3.x

    Posted Tue July 16, 2019 10:44 AM
    "The most serious problem is that the "geniuses" of IBM Resilient, provide functions that only work with python3 and the appliance works with python2.7 .... applause to the geniuses!"

    Also, I have to mention that Resilient extensions (functions) work on an Integration server, not on a Resilient server and in 100% cases IBM recommends to separate them in production on different virtual/physical servers.
    Long story short - you may have several different integration servers (with different Python versions, different functions) which connected to one Resilient server. Please check the Integration server guide for details: https://github.com/ibmresilient/resilient-reference/tree/master/developer_guides

    BR,
    Alex


    ------------------------------
    Alexander Saulenko
    ------------------------------



  • 9.  RE: Upgrade Python 2.7 to 3.x

    Posted Wed July 17, 2019 07:18 AM
    Juan,

    All of the integrations we write are developed to be compatible with both python 2.7 and 3.6+. There are situations where a library we use is restrictive to one version of python or another and we clearly document that limitation. If there's an integration you've encountered which is problematic, please let us know.

    ------------------------------
    Mark Scherfling
    ------------------------------



  • 10.  RE: Upgrade Python 2.7 to 3.x

    Posted Thu December 08, 2022 10:54 AM
    It's December of 2022 and this is STILL an issue.  We deployed a SOAR and SOAR AppHost with an Integration Server on the same host as the AppHost as part of an IBM project lead by IBM Professional Services.

    The version running is still 2.7.  Upgrades from FixCentral rely on Python 2.7.. still.  However, vendors that write apps are being written in Python 3.  Python 3.6 is on the App Host/Integration Server.  However, we're unable to run resilient_circuits.  Currently, working with support but wanted to refresh this post.

    ------------------------------
    Damian Scott
    ------------------------------



  • 11.  RE: Upgrade Python 2.7 to 3.x

    Posted Sat December 10, 2022 11:05 AM
    Hello,
    on the App Host. we're unable to run resilient_circuits.
    i had this problem 3  months ago, after working with support with no value 
    i had to install separate Integration server for resilient circuits



    ------------------------------
    kamal ghanem
    ------------------------------



  • 12.  RE: Upgrade Python 2.7 to 3.x

    Posted Mon December 12, 2022 04:15 AM
    Hi Kamal,

    To make everyone aware. The reason you were not able to install Resilient Circuits on App Host was due to changes in how Python packages are installed in later versions. For you it was the "requests" package that was once managed by pip changed to be managed by yum in App Host 1.9 and above. This caused a problem with managing the same package with pip.

    Development and QA of App Host does not include the use case that Resilient Circuits is installed on the same guest. IBM's recommendation is to have a separate integration server. The same recommendation has been in place for years with regards to Resilient Circuits running on the same guest as SOAR.

    ------------------------------
    BEN WILLIAMS
    ------------------------------



  • 13.  RE: Upgrade Python 2.7 to 3.x

    Posted Wed December 28, 2022 01:17 PM
    Thank you, Ben.  This is useful information.  Any direction on upgrading Python from 2.7.5 to 3.6 on an Integration Server (RH/Centos 7.9)?

    ------------------------------
    Damian Scott
    ------------------------------



  • 14.  RE: Upgrade Python 2.7 to 3.x

    Posted Fri December 30, 2022 04:59 AM
    Hi Damian,

    We only provide guidance on the products that we write.

    An integration server is stood up by a client with one of the supported operating systems The client deploys Python to it. It is only when Resilient Circuits is installed that IBM provides support and we only provide support for Resilient Circuits.

    There are various ways to upgrade Python all of which are documented in various sites on line. Since an integration server was provisioned by a client and an operating system chosen and deployed to it, you may be able to get support from your internal teams.

    There are some threads in the community relating to Python that may be of help to you.

    There are also some threads about virtual env and pyenv. You might want to think of using these tools to test your code on Python 3.x before upgrading production.

    Check your applications to see if they support Python 3.x. Do you need to upgrade them?

    We support Python 3.6.9+ and also 3.9. You might want to consider 3.9? Again, check if the apps you use support 3.9 especially if you are using community apps that are not supported by IBM.

    Thanks,

    ------------------------------
    BEN WILLIAMS
    ------------------------------