commit | 5fa5e741d0cc5b820f3f69fa29e4b1d1b0913315 | [log] [tgz] |
---|---|---|
author | Kostiantyn Yevchuk <kyevchuk@mirantis.com> | Tue Oct 18 12:12:08 2022 +0200 |
committer | Kostiantyn Yevchuk <kostiantyn.yevchuk@gmail.com> | Tue Oct 18 12:12:57 2022 +0200 |
tree | f9bf629205c35041d22f167982cb39c68b1f695a | |
parent | 28b37f94fb7a4ad2a418f26b177ea1aa7e230bae [diff] |
FIELD-5380 bump python to 3.10.8, cryptography to 38.0.0, uwsgi to 2.0.20 to fix cves Change-Id: I015647d79d7ddb0d29858f976ef9ba15fda27a32 Related-FIELD: FIELD-5380
Prometheus Alertmanager webhook receiver sending alert notification to Salesforce.
Install Python dependencies:
$ virtualenv venv -p python3 $ source venv/bin/activate (venv)$ source sf_notifier/vars/development (venv)$ pip install --upgrade pip (venv)$ pip install -e .
Add to settings/development.py
credentials for your Salesforce customer (not engineering) account:
SF_CONFIG = { 'AUTH_URL': 'xxx', 'USERNAME': 'xxx', 'PASSWORD': 'xxx', 'ORGANIZATION_ID': 'xxx', 'ENVIRONMENT_ID': 'xxx', 'SANDBOX_ENABLED': True }
You may also specify environment variables to override Python settings:
export SFDC_AUTH_URL="xxx" export SFDC_USERNAME="xxx" export SFDC_PASSWORD="xxx" export SFDC_ORGANIZATION_ID="xxx" export SFDC_ENVIRONMENT_ID="xxx" export SFDC_SANDBOX_ENABLED=true
Run server:
(venv)$ uwsgi --http 127.0.0.1:5000 --wsgi-file sf_notifier/server.py --callable app_dispatch
Check in browser:
http://127.0.0.1:5000/metrics