Skip to content
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

Methods for PIP and NPM #45

Closed
gudbergur opened this issue Feb 10, 2012 · 17 comments
Closed

Methods for PIP and NPM #45

gudbergur opened this issue Feb 10, 2012 · 17 comments

Comments

@gudbergur
Copy link
Contributor

I'm using Cuisine to deploy an app using both PIP for python packages and NPM for node packages and I'm wondering what your thoughts are on the plan regarding these. Do you write your own methods to ensure these packages in Fabric and use them alongside Cuisine or is this something that should be integrated into Cuisine?

@josephmc5
Copy link
Contributor

I wrote a function to install pip packages. I can commit it if people are interested. It's pretty simple right now.

@gudbergur
Copy link
Contributor Author

I also got a set of methods to install these packages and I think this is something alot of people use - so I'm wondering if this is something that should be part of Cuisine's core or it should be seperate project

@gudbergur
Copy link
Contributor Author

In Puppet for example there's no support for this stuff in the core

@sebastien
Copy link
Owner

@gudbergur @josephmc5 It would be great to have PIP/NPM and any other type of specific package installation method. What I suggest is to name the functions this way:

package_python_pip_*
package_node_npm_*

You can past the code in this issue and I'll integrate it, or send me a patch.

@schacki
Copy link

schacki commented Feb 14, 2012

i have written the code for pip and easy_install with install, upgrade, ensure, remove functions. i am happy to provide that code.
just encountered one issue during testing: depending on the system setup you might need to run these with sudo and will not be able to run without, or you do not have sudo rights and will get an error otherwise.
so either we use the mode_sudo, mode_user etc, or we run run without and catch the permission denied and then if errored, run again with sudo. any preferences

@sebastien
Copy link
Owner

Could you share a gist with the code? thanks!

@schacki
Copy link

schacki commented Mar 1, 2012

please finde the code here: https://gist.github.com/1950506
@sebastien this code is equivalent to the diff file that i send to you

@wutali
Copy link

wutali commented Jul 5, 2012

Is this issue closed?

I want to write some codes for pip install and some feature of Cuisine.
If these feature is not implemented yet, I would add this feature to Cuisine.

And I'm thinking about virtualenv generator.
This cookbook (https://github.com/opscode-cookbooks/python) is awesome for Python environment.
I will convert these feature for Cuisine.

How about it?

@wutali
Copy link

wutali commented Jul 12, 2012

I wrote an example code for this issue.

https://gist.github.com/3096986

@schacki
Copy link

schacki commented Jul 12, 2012

i am not sure, if you follow the syntax/naming convention that sebastien had in mind (at least I had a different understanding as you can see in my gist https://gist.github.com/1950506, but I think @sebastien needs to make the call here.

@sebastien
Copy link
Owner

I think the best would be to name the functions pip_package_{install|ensure|update|remove} (and conversely easyinstall_{install|ensure|update|remove} and use the @dispatch decorator.

@schacki sorry for not having integrated this yet, but I haven't found the time to test it yet.
@wutali maybe you could merge both @schacki's code and yours, clean it up and submit a pull request?

@wutali
Copy link

wutali commented Jul 13, 2012

@sebastien OK! I will clean up @schacki and my code.

By the way, I want to add virtualenv and some useful feature for Python.
Should this feature be separated another project or main cuisine project?

@sebastien
Copy link
Owner

@wutali the best would be to put the virtualenv and python-specific functions in a separate module, to keep cuisine small -- but you can let me know and maybe some functions would be useful for cuisine's core.

@schacki
Copy link

schacki commented Jul 13, 2012

@Sebastion: you had the idea to have some kind of contrib folder,where such
things could be stored?!

On Friday, July 13, 2012, Sébastien Pierre wrote:

@wutali the best would be to put the virtualenv and python-specific
functions in a separate module, to keep cuisine small -- but you can let me
know and maybe some functions would be useful for cuisine's core.


Reply to this email directly or view it on GitHub:
#45 (comment)

@sebastien
Copy link
Owner

Yes, exactly -- provided the modules have a clear purpose and are generic enough.

@schacki
Copy link

schacki commented Aug 17, 2012

hi sebastien, i am planning to use such kind of code again, will you integrate it any time soon, or do i need to include it in my deployment scripts?

@sebastien
Copy link
Owner

I'm closing the issue as the @dispatch mechanism would support that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants