commit | fc1e7739506eb010707cf94ea02e412c8819c154 | [log] [tgz] |
---|---|---|
author | Michal Kobus <mkobus@mirantis.com> | Thu May 16 18:30:48 2019 +0200 |
committer | Michal Kobus <mkobus@mirantis.com> | Tue May 21 14:31:26 2019 +0200 |
tree | cf96648753e1cca81d28f80e0a938defe2defd4b | |
parent | f0046f553c94d7b01030b899a0c74ac6384602d1 [diff] |
Add cache and offload tasks - use uwsgi cache2 as workers shared storage - offload case create/close with uwsgi mules - refactoring Change-Id: I25d44e87e552d701f7851f28dba3e7ffc218399a Related-bug: PROD-30321 (PROD:30321)
Prometheus Alertmanager webhook receiver sending alert notification to Salesforce.
Install Python dependencies:
$ virtualenv venv $ venv/bin/pip install -e . $ source sf_notifier/vars/development
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/bin/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