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

deploy does not work under docker context #4

Open
kfatehi opened this issue Sep 1, 2014 · 13 comments
Open

deploy does not work under docker context #4

kfatehi opened this issue Sep 1, 2014 · 13 comments

Comments

@kfatehi
Copy link
Member

kfatehi commented Sep 1, 2014

The worker's deploy step does not run within the context of the docker container

@jaredly
Copy link
Member

jaredly commented Sep 1, 2014

strange. Is that for all deploy steps? (e.g. does the custom scripts deploy step run?)

@kfatehi
Copy link
Member Author

kfatehi commented Sep 1, 2014

Custom scripts deploy works correctly because it uses an object (cmd, args).

When we use an object with cmd and args, it uses docker. But heroku uses
the function form.

@kfatehi kfatehi changed the title deploy does not worth under docker context deploy does not work under docker context Sep 2, 2014
@jaredly
Copy link
Member

jaredly commented Sep 4, 2014

Oh man! Now I totally understand what's going on, also with Strider-CD/strider-docker-runner#17

Strider-docker-runner works by proxying the runCmd function into the docker container, instead of just using child_process.spawn, and so plugins using the provided runCmd will have the desired effects inside of the docker container. However, plugins using child_process.spawn and friends directly will not have the desired effect, because things will be executed outside of the docker context.

I'm not entirely sure how to address this. My assumption is that the strider-gitlab issue comes from wanting SSH key files to be present on the filesystem (this is what gitane does iirc), and they're not, because they're written to the host system, not the docker one.

Perhaps one solution would be to setup volume sharing with the host system? I don't know.

@kfatehi
Copy link
Member Author

kfatehi commented Sep 5, 2014

Wow, yeah, sounds annoying. I doubt ssh key files from the filesystem are used -- if so they should stop being used (I just patched this in strider-ssh-deploy a few days ago). As far as the spawn stuff... yeah, that's tricky... @niallo thoughts?

@kfatehi
Copy link
Member Author

kfatehi commented Sep 5, 2014

adding refs to other related bugs, since this is the closest we've come to knowing how to fix it:

Strider-CD/strider-docker-runner#18

https://github.com/meric426/strider-gitlab/issues/8

@niallo
Copy link
Member

niallo commented Sep 5, 2014

Plugins should use a plugin-specific way of running a command in the
correct neuron net and not use child_process directly (unless they
explicitly need that).

On Thursday, September 4, 2014, Keyvan Fatehi [email protected]
wrote:

adding refs to other related bugs, since this is the closest we've come to
knowing how to fix it:

Strider-CD/strider-docker-runner#18
Strider-CD/strider-docker-runner#18

meric426/strider-gitlab#8
https://github.com/meric426/strider-gitlab/issues/8


Reply to this email directly or view it on GitHub
#4 (comment)
.

Niall O'Higgins
W: http://niallohiggins.com
E: [email protected]
T: @niallohiggins

@jaredly
Copy link
Member

jaredly commented Sep 5, 2014

@niallo git+ssh uses gitane, which uses child_process directly https://github.com/niallo/Gitane/blob/master/index.js#L6

@niallo
Copy link
Member

niallo commented Sep 6, 2014

:( It needs to be patched to accept a function.

On Fri, Sep 5, 2014 at 10:56 AM, Jared Forsyth [email protected]
wrote:

@niallo https://github.com/niallo git+ssh uses gitane, which uses
child_process directly
https://github.com/niallo/Gitane/blob/master/index.js#L6


Reply to this email directly or view it on GitHub
#4 (comment)
.

Niall O'Higgins
W: http://niallohiggins.com
E: [email protected]
T: @niallohiggins

@kfatehi
Copy link
Member Author

kfatehi commented Oct 15, 2014

@niallo @jaredly 1.6.0 can't go out until we do whatever this neuron-net function patching thingy we're talking about here :D

if you guys just drop a bunch of line-number links and stuff i'm sure i can do it... but i dont quite know where to start at the moment.

@jaredly
Copy link
Member

jaredly commented Oct 15, 2014

just PRd gitane for accepting a function. niallo/Gitane#4
@keyvanfatehi basically find plugins that use the child_process.spawn function directly, and change them so they can use a passed-in spawn function

@kfatehi
Copy link
Member Author

kfatehi commented Oct 15, 2014

@jaredly thanks Jared!!

@knownasilya
Copy link
Member

@niallo does gitane need to be bumped and published?

@niallo
Copy link
Member

niallo commented Oct 16, 2014

I think so, yes.

On Thursday, October 16, 2014, Ilya Radchenko [email protected]
wrote:

@niallo https://github.com/niallo does gitane need to be bumped and
published?


Reply to this email directly or view it on GitHub
#4 (comment)
.

Niall O'Higgins
W: http://niallohiggins.com
E: [email protected]
T: @niallohiggins

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

4 participants