-
Notifications
You must be signed in to change notification settings - Fork 490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove /opt/graphite prefix and use setuptools #835
base: master
Are you sure you want to change the base?
Conversation
Don't install in /opt/graphite anymore, this is just strange and causes nothing but trouble. Setuptools does not support it either. Switch to setuptools to get rid of following warnings: UserWarning: Unknown distribution option: 'install_requires' UserWarning: Unknown distribution option: 'long_description_content_type'
Codecov Report
@@ Coverage Diff @@
## master #835 +/- ##
==========================================
+ Coverage 50.21% 50.54% +0.32%
==========================================
Files 37 37
Lines 3541 3510 -31
Branches 508 508
==========================================
- Hits 1778 1774 -4
+ Misses 1646 1617 -29
- Partials 117 119 +2
Continue to review full report at Codecov.
|
We should probably also get rid of code snippets like these https://github.com/graphite-project/carbon/blob/master/bin/carbon-cache.py#L19-L26 |
I like this idea, the biggest hurdle for new users imho is how complicated it is to get set up so anything we can do to streamline things is great! We do need to make sure we handle upgrades properly and that the installation/upgrade docs are all clear and accurate. |
Yep, that's a good question. We should provide nice doc to upgrade graphite which still installed in |
Good points, I can take care of the docs, but that can take a while, I'm a
bit busy the next two weeks.
I'll also have to check all example config files for paths.
…On Tue, 8 Jan 2019, 14:32 Denis Zhdanov ***@***.*** wrote:
Yep, that's a good question. We should provide nice doc to upgrade
graphite which still installed in /opt/graphite to new setup.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#835 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACxrWvfbY48obZ5gKxAMj2xzNoSIc7fUks5vBJ3mgaJpZM4Z1ZZb>
.
|
Warning: 'classifiers' should be a list, got type 'tuple'
fallback to sys.prefix if GRAPHITE_ROOT is not set, instead of the directory above the location where the binaries are installed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
(copying over a comment from graphite-project/graphite-web#2409 (comment)) I had another thought about storage dirs ... I think the original idea behind using /opt/graphite is those storage and log dirs, which would be awkward in the python site-packages directory. Maybe the thing to do is divorce them from the graphite application root, and default to /opt/graphite/storage and /opt/graphite/log regardless of the install prefix? And not mention them in setup.py at all? I suppose the downside is they would not be created by install. Just an idea - I suppose I always customize these dirs anyway. |
That could be good solution, @ploxiln |
Yup, I don't think how I did it is the right way. Maybe instead of /opt/graphite use something more FHS compliant like /var/lib/graphite and /var/log/graphite. |
Reverted graphite_root to /opt/graphite. This change is about not installing the python program code in /opt/graphite, can still use /opt/graphite for config and storage. |
bin/carbon-client.py
Outdated
@@ -40,6 +29,8 @@ | |||
from carbon.client import CarbonClientManager # noqa | |||
from carbon import log, events # noqa | |||
|
|||
CONF_DIR = join(sys.prefix, 'conf') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another sys.prefix
that should be /opt/graphite
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(actually, this CONF_DIR
variable is now unused)
This pull request introduces 1 alert when merging 402e115 into 42c1242 - view on LGTM.com new alerts:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I think it's important, will pin it. |
I really want to have this done but don't see that I will have the time anytime soon. |
Hi @piotr1212 , No worries, I assigned you because it's your PR, it's not an obligation for you to finish that. |
This look like a really good cleanup, what is missing to allow progress on the subject ? The hardcoded |
Unfortunately, that 's incompatible change. Probably, still can be done, together with major release. |
This switches from distutils to setuptools and removes the default
/opt/graphite
prefix.I think this should go in a major or at least a minor release (no patch release).
Reasons for removing
/opt/graphite
prefix:root
privileges on many hosts which don't have a /opt partitionGRAPHITE_NO_PREFIX
environment variable.I don't see any reasons for keeping it other than:
If you need to install Graphite in an other location you should use:
--user
switch--user
switch and a customizedPYTHONUSERBASE
more on custom locations
Switch to setuptools gets rid of the following warnings:
UserWarning: Unknown distribution option: 'install_requires'
UserWarning: Unknown distribution option: 'long_description_content_type'
PPA discourages the use of distutils and suggests setuptools. Setuptools has some nice features we can use in future.