aboutsummaryrefslogtreecommitdiffstats
path: root/miss_htbt_service/misshtbt.sh
diff options
context:
space:
mode:
authorAlexander Mazuruk <a.mazuruk@samsung.com>2021-02-18 17:24:44 +0100
committerAlexander Mazuruk <a.mazuruk@samsung.com>2021-05-11 01:27:00 +0200
commite22e10e5aa858fe36db2580e072e5b53957117e9 (patch)
tree1560e4dc52ecf9835b34a10bc1f4415b68b2934f /miss_htbt_service/misshtbt.sh
parent031694bad1802a75918b9b97d5c34faac729f0c6 (diff)
Change python baseOS img to integration-python2.2.0
Moved setting PYTHONPATH and PATH to Dockerfile as thats where python version is defined (baseOS image) Switched hardcoded python3.8 to python3. psycopg is recommended to be built from source for production use, yet CI environment does not have the dependencies to build it. To circumvent that, requirements were split into: - requirements-common.txt that should be included for each environment - requirements-docker.txt that force building of psycopg in docker - requirements.txt that use psycopg-binary for ci purposes Benefits from switching over: * minimal {java11,python} images maintained by integration team * using currently "blessed by seccom" versions (:latest tag used) * should limit spread of legal issues across layers * integration images will be the first to have automated compliance documentation * should limit spread of base layers (contributing to deployment footprint - more base layers = more to download, more to store etc...) Issue-ID: INT-1864 Issue-ID: DCAEGEN2-2420 Signed-off-by: Alexander Mazuruk <a.mazuruk@samsung.com> Change-Id: I77be2fd9dd53613a1a6ad26f8f0b506073f1cca6
Diffstat (limited to 'miss_htbt_service/misshtbt.sh')
-rw-r--r--miss_htbt_service/misshtbt.sh16
1 files changed, 5 insertions, 11 deletions
diff --git a/miss_htbt_service/misshtbt.sh b/miss_htbt_service/misshtbt.sh
index c93da98..150eb4f 100644
--- a/miss_htbt_service/misshtbt.sh
+++ b/miss_htbt_service/misshtbt.sh
@@ -19,13 +19,7 @@
# ============LICENSE_END=========================================================
# get to where we are supposed to be for startup
-cd /app/bin
-
-# include path to 3.6+ version of python that has required dependencies included
-export PATH=/usr/local/lib/python3.8/bin:$PATH:/app/bin
-
-# expand search for python modules to include ./mod in runtime dir
-export PYTHONPATH=/usr/local/lib/python3.8/site-packages:./mod:./:$PYTHONPATH:/app/bin
+cd /app/bin || (echo "Failed to cd to /app/bin" && exit 1)
# set location of SSL certificates
export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-bundle.crt
@@ -40,14 +34,14 @@ export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-bundle.crt
#export CBS_HTBT_JSON=../etc/config.json
# want tracing? Use this:
-# python -m trace --trackcalls misshtbtd.py -v
+# python3 -m trace --trackcalls misshtbtd.py -v
# want verbose logging? Use this:
-# python misshtbtd.py -v
+# misshtbtd.py -v
# standard startup? Use this:
-# python misshtbtd.py
+# misshtbtd.py
# unbuffered io for logs and verbose logging? Use this:
-python -u misshtbtd.py -v
+python3 -u misshtbtd.py -v