Local environment
Environment configuration
The installation of grpcio can be challenging, for that reason you might want to use conda. In that case, just go through the following steps
$ conda create --prefix venv
$ conda install --prefix venv pip
$ conda activate venv/
$ pip install -r requirements/dev.txt
Variables configuration
$ export SDM_API_ACCESS_KEY=api-access-key
$ export SDM_API_SECRET_KEY=api-secret-key
$ export SDM_ADMINS=@admin1 # if multiple, use: @admin1 @admin2
BOT PLATFORM variables configuration
See the subsessions about SDM_BOT_PLATFORM specific variables:
SDM_BOT_PLATFORM is slack
$ export SLACK_APP_TOKEN=slack-app-token
$ export SLACK_BOT_TOKEN=slack-bot-token
See Configure Slack
SDM_BOT_PLATFORM is slack-classic
$ export SLACK_TOKEN=slack-token
See Configure Slack Classic Bot
SDM_BOT_PLATFORM is ms-teams
:
$ export SDM_ADMINS=shane@strongdm.com # if multiple, use: user1@domain.com user2@domain.com
$ export AZURE_APP_ID=app-id
$ export AZURE_APP_PASSWORD=app-password
Before initialize errbot, you also need to Configure SDM.
Initialize errbot
$ mv config.py config.py.back
$ pip install errbot[slack]
$ mv config.py.back config.py
Update submodules
$ git submodule init
$ git submodule update
Run the bot
$ pytest # run tests
$ errbot # starts bot