-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
use pyenv cookbook instead of poise for python install/usage #350
Conversation
@@ -21,14 +21,10 @@ | |||
property :config, [Hash, nil], default: nil | |||
|
|||
action :create do | |||
python_package backend_name do | |||
backend_attributes.each { |attr, value| send(attr, value) } |
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.
This is some ruby/chef patterns that I don't really understand, please let me know what this is doing and how I can emulate this in my changes
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.
This is “just” collecting all the attributes and sending them though. It’s a little terse, and hard to read. So I’m with you here and write something easier to read.
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.
so its another way to set the properties here? if install_options
was set in the backend_attributes
would it overwrite the --no-binary=:all:
property below this? keeping that in mind for how I want to fix this
@@ -25,5 +25,4 @@ | |||
default['graphite']['uwsgi']['carbon'] = '127.0.0.1:2003' | |||
default['graphite']['uwsgi']['listen_http'] = false | |||
default['graphite']['uwsgi']['port'] = 8080 | |||
default['graphite']['uwsgi']['service_type'] = 'runit' |
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.
this is a cleanup as i was thinking about the systemd portions of the cookbook, its not used anywhere. should i remove the change?
|
@@ -19,30 +19,28 @@ | |||
|
|||
package Array(node['graphite']['system_packages']) | |||
|
|||
python_package 'django' do | |||
pyenv_pip 'django' do | |||
virtualenv node['graphite']['base_dir'] |
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.
If we have a library helper we should use that in the resource instead of using node attributes.
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.
I'm kind of unclear on what you're asking, are you saying setting the virtualenv as a library helper and then remove setting all the virtualenv
properties when using the pyenv_pip
resources? Or are you saying using use a library helper to get the node attribute?
If you can get the tests passing, I think this is almost good to go. The next stage would probably be to remove all the recipes from this cookbook! |
working on testing now |
b986dab
to
e75b1b9
Compare
Signed-off-by: jtschelling <[email protected]>
Signed-off-by: jtschelling <[email protected]>
Signed-off-by: jtschelling <[email protected]>
Signed-off-by: jtschelling <[email protected]>
b74bab9
to
5f47e08
Compare
resources/python.rb
Outdated
default_action :install | ||
|
||
property :pyenv_name, String, name_property: true | ||
property :python_version, String, default: '2.7.17' |
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.
If we're releasing a major version can we go to Python 3 + the latest 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.
@jtschelling Can you please address this?
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.
sorry, stuck on getting python 3.8.5 working here and this unfortunately dropped in priority a little for me. troubleshooting it when I can
Generated by 🚫 Danger |
@jtschelling can you please fix the converge errors that seem to happening in the tests? |
Signed-off-by: jtschelling <[email protected]>
…o switch-to-pyenv
Is anyone actively working on this now? I've been updating our wrapper cookbooks and realized we're running up against the same thing. I tried running the tests but am getting a variety of errors depending on the platform. Before I dive too deep, thought I'd check that I'm not duplicating someone's effort. |
Played with the tests a bit, some remarks largely so I don't forget:
|
@swalberg I fell apart here trying to get python 3.8 working (couldn't get graphite to start), and never got back to working on it. Honestly its probably best to open a new PR for this after reading through and choosing some of my changes to include, it really got messy by the end here. I encountered the same problems that you had, in particular the |
@swalberg feel free to open a new PR since @jtschelling isn't going to get to this again soon. We can close this one and refer a new one. Thanks for taking a look! |
What is needed to get this over the line and merged? |
@docwho76 Someone will need to make a new PR based on this and resolve the conflicts and address any new issues that crop up. |
Description
remove poise_python usage (unmaintained) and replaces with sous-chef supported pyenv cookbook https://github.com/sous-chefs/pyenv
Issues Resolved
#349
Check List