Charlie,
You can leave the virtual environments running in my experience.
You can do it via systemd or cron job or Docker/Podman. (If you are uncomfortable with cron/systemd, I would highly recommend running Docker/Podman because Apphost is just docker files so it's really easy to get up and running.
In my experience, running it as systemd has worked better and it restarts better on system startup/shutdown/restart
Stackoverflow (Because I don't want to write it all out) -
https://stackoverflow.com/questions/37211115/how-to-enable-a-virtualenv-in-a-systemd-service-unitLet me know if you want to talk about it over a virtual meeting or anything.
I don't work for IBM so this is just my experience running resilient circuits in multiple ways.
------------------------------
Richard Giesige
Security Engineer
Oshkosh Corporation
Oshkosh
------------------------------
Original Message:
Sent: Wed September 21, 2022 09:23 AM
From: Charlie
Subject: How to setup virtual environments integration server for each APP/Plugin - SOAR
Hi Richard, i can't do an app host righ now. In your second option, there will be multiple resilient circuits services running at same time, right? So i have to activate a virtual env, run the service and deactive or can i leave multiple envs active?
------------------------------
Charlie
------------------------------
Original Message:
Sent: Mon September 19, 2022 10:23 AM
From: Richard Giesige
Subject: How to setup virtual environments integration server for each APP/Plugin - SOAR
Chales,
I would highly recommend doing a app host as it makes it much easier to manage in the long run. (https://www.ibm.com/support/pages/build-your-first-qradar-soar-custom-integration-using-app-host) Or even looker at doing docker if you can't setup their app host as it makes the isolation and maintenance much easier.
If you can not do an app host then you will need to setup a virtual environment the standard way using venv and then have a custom cron/systemd service that calls a bash files full path for each app/plugin.
Something like this would have to be done in each specific bash file that you would call for each app:
Bash (app1.sh) file:
source /home/username/Workspace/venv1/bin/activate python /home/username/Workspace/python/resilient-circuits.py
------------------------------
Richard Giesige
Security Engineer
Oshkosh Corporation
Oshkosh