getsentry/sentry-docs

Add example of specifying plugins in requirements.txt

elicwhite opened this issue · 5 comments

Currently the installation with docker page: https://docs.getsentry.com/on-premise/server/installation/docker/

says

On top of that, we have a requirements.txt file for installing plugins.

and links to

https://docs.getsentry.com/on-premise/server/plugins/

which does not explain how to use the requirements.txt file for installing plugins. It would be ideal to have an example that explained how to install plugins and pin versions.

How does this file work? I still can't find documentation on how to install the github sso auth plugin inside of Docker.

in case anyone else stumbles over this:
you have to add https://github.com/getsentry/sentry-auth-google/archive/52020f577f587595fea55f5d05520f1473deaad1.zip to requirements.txt

Explanation:
the Dockerfile for the onbuild images like sentry:9.0-onbuild does pip install -r requirements.txt (see https://github.com/getsentry/docker-sentry/blob/f648178adf33bec68be47550a82850e18deb0cd8/9.0/onbuild/Dockerfile#L10 )
Note: This only works for the onbuild images

So the requirements.txt is a pip thing and not a sentry feature. Therefore add the value you see in any sentry plugin install info like pip install https://github.com/getsentry/sentry-auth-google/archive/master.zip

Also see getsentry/sentry-auth-google#27 (comment) on how to use the requirements.txt

Hi @hpurmann ,
As @philicious said:

... the requirements.txt is a pip thing and not a sentry feature. Therefore add the value you see in any sentry plugin install info ...

So I clicked on links for my favorite plugins from this page collected these values from plugins' github pages:
sentry-redmine sentry-gitlab sentry-slack sentry-github
Now my requirements.txt looks like this:

[root@sentry onpremise]# cat requirements.txt 
# Add plugins here
sentry-redmine
sentry-gitlab
sentry-slack
sentry-github

And it seems working:

[root@sentry onpremise]# make build
...
Installing collected packages: sentry-redmine, python-gitlab, sentry-gitlab, sentry-slack, sentry-github
  Running setup.py install for sentry-redmine: started
    Running setup.py install for sentry-redmine: finished with status 'done'
  Running setup.py install for python-gitlab: started
    Running setup.py install for python-gitlab: finished with status 'done'
  Running setup.py install for sentry-gitlab: started
    Running setup.py install for sentry-gitlab: finished with status 'done'
  Running setup.py install for sentry-github: started
    Running setup.py install for sentry-github: finished with status 'done'
Successfully installed python-gitlab-1.7.0 sentry-github-0.1.2 sentry-gitlab-0.2.0 sentry-redmine-0.1.0 sentry-slack-0.5.0
...

I just tried this today (creating custom on-premise sentry image), and the following works for me:

# Add plugins here
pagerduty
asana

Additionally, I didn't need to run to execute pip install -r requirements.txt in the Dockerfile since i used the sentry:onbuild image as the base image. Following is documented here

Hope this helps other people :)

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Accepted, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀