yegor256 / rultor

DevOps team assistant that helps you merge, deploy, and release GitHub-hosted apps and libraries
https://www.rultor.com
Other
561 stars 156 forks source link

Rultor`s Git Use Needs to be Dockerized #1060

Open original-brownbear opened 8 years ago

original-brownbear commented 8 years ago

Currently Rultor runs git commands on the SSH host it connects to, directly on the host. This is not in line with the expected behaviour laid out in the docs here stating:

Your servers must have docker installed. This is the only requirement.

We need to dockerize Git use on the client machine here therefore.

This issue is resolved when

docker run -t --rm -v "${PWD}":"${PWD}" ~/.ssh:"/root/.ssh":ro yegor256/rultor-git git "$@"
docker run -t --rm -v "${PWD}":"${PWD}" -v ~/.ssh:"/root/.ssh":ro -w "${PWD}" yegor256/rultor-git git checkout master
original-brownbear commented 8 years ago

@alex-palevsky this is a bug.

alex-palevsky commented 8 years ago

@alex-palevsky this is a bug.

@original-brownbear added "bug" tag to this issue

alex-palevsky commented 8 years ago

@original-brownbear there is no milestone yet, so I set it to 2.0

alex-palevsky commented 8 years ago

@original-brownbear thank you for the ticket reported, I topped your account for 30 mins, transaction AP-1GU29725RY8374158

original-brownbear commented 8 years ago

@alex-palevsky this is urgent.

alex-palevsky commented 8 years ago

@alex-palevsky this is urgent.

@original-brownbear OK, I put "urgent" label here

alex-palevsky commented 8 years ago

@ail-man it's yours now, please proceed keeping in mind our principles. Feel free to ask any technical questions right here in the ticket. Total fixed cost of this task is 30 mins (see this for more info)

yegor256 commented 8 years ago

@original-brownbear I'm not sure where you're planning to store the private SSH key. currently it stays in ~/.ssh/id_rsa on the host machine. we don't want to have it in the Docker image, for security reasons..

original-brownbear commented 8 years ago

@yegor256 updated the task description, this was worded in an unfortunate way. The container should simply mount the hosts ssh config and done. Either way it wouldn't even know the ssh keys when the image is build. Edited the task description slightly with a better solution to this :) Thanks for pointing this out!

ail-man commented 8 years ago

@alex-palevsky I assume that before the fix I need to setup my environment (I newbee in the project) and run it properly. I try to do it by myself, but it fails. Who can help me with it?

original-brownbear commented 8 years ago

@ail-man please refer to me when it comes to technical questions. Before you do though, please read this: http://www.yegor256.com/2015/02/16/it-is-not-a-school.html

That being said, simply running the build for this project is trivial and explained in the readme:

mvn clean install -Pqulice

... that's it. Helping is not something that will happen here.

ail-man commented 8 years ago

@original-brownbear your answer helps me. I just didn't know where to start. Start is always difficult, but then everything goes easier. PS: maven and everything else I configured. Thanks!

original-brownbear commented 8 years ago

@ail-man any progress here ?

ail-man commented 8 years ago

@original-brownbear unfortunatelly no. I don't quite understand the problem. Please, assign this puzzle to another

original-brownbear commented 8 years ago

@ail-man please ask @alex-palevsky to reassign you

original-brownbear commented 8 years ago

@alex-palevsky assign someone else please.

alex-palevsky commented 8 years ago

@alex-palevsky assign someone else please.

@original-brownbear all right, we'll find someone else for this task

alex-palevsky commented 8 years ago

@dalifreire this is your ticket, please proceed

dalifreire commented 8 years ago

@alex-palevsky I'm a Java developer with no experience with Docker. That documentation is not complete enough for a Java developer (with no experience with Docker) to understand and solve this issue.

@original-brownbear I really tryed to do my best and I created the PR #1073. I think I can finish this issue with some help (maybe you can provide more details about what must be done), or you can ask for @alex-palevsky to assign this task to someone else.

original-brownbear commented 8 years ago

@dalifreire tricky spot. Frankly I feel like the issue description essentially contains the solution, but I admit that without any Docker knowledge this requires some learning on the performers end either way. Your PR doesn't contain much too I'm afraid. I can provide help with concrete questions here, but laying out the solution in more detail would go very much against this I think.

In case you want to get unassigned from this, please ask @alex-palevsky yourself.

dalifreire commented 8 years ago

@original-brownbear Yes, I think the problem isn't your issue description. For me, the problem is assign this issue to someone without Docker knowledge. I think my knowledge is not enough to fix that in 30 minutes.

But if I ask for @alex-palevsky to assign someone else I'll be punished in -30 points from my rating.... :(

original-brownbear commented 8 years ago

@dalifreire I understand you here, but this really isn't my responsibility I'm afraid. This simply is an issue to take up with the PM.

dalifreire commented 8 years ago

@alex-palevsky Could you help us here? I'm a Java developer with no experience with Docker.

dalifreire commented 8 years ago

@original-brownbear Ok, I'll try to do something untill @alex-palevsky return.

What do you mean with "contains the git command"? All the git commands present in the .rultor.yml file (like git commit -am "${tag}") must be moved to the Dockerfile file?

original-brownbear commented 8 years ago

@dalifreire for now we don't need to move the actual scripts for merging and the like to the container, this can be done at a later stage maybe, not needed here.

What we need here is simply to have a bash script that acts exactly like the git binary, so that our git use becomes independent of the host we ssh into. Maybe this example I created a while back helps, it dockerizes the phpunit executable. Bash script Dockerfile Build script Additional details on this in step 1 and 2 here

It should be fairly easy to work from that example and the provided details above, even without Docker and just basic bash knowledge :)

dalifreire commented 8 years ago

@original-brownbear Thanks for your help. I really appreciate that, but I don't have the right skills to do this issue. I'm completely newbie with docker and I don't know how can I do basic things like check that what I'm doing is right, etc...

original-brownbear commented 8 years ago

@dalifreire no problem, please send a separate comment to @alex-palevsky though, otherwise he won't react most likely.

dalifreire commented 8 years ago

@alex-palevsky I don't have the right skills to do this issue. That documentation is not complete enough for a Java developer (with no experience with Docker like me) to understand and solve this issue. Please, finds someone else with the right skills.

alex-palevsky commented 8 years ago

@alex-palevsky I don't have the right skills to do this issue. That documentation is not complete enough for a Java developer (with no experience with Docker like me) to understand and solve this issue. Please, finds someone else with the right skills.

@dalifreire ask project architect to help you

original-brownbear commented 8 years ago

@alex-palevsky this is not urgent anymore.

original-brownbear commented 8 years ago

@alex-palevsky please see comment by @dalifreire again, he's asking you for reassignment.

original-brownbear commented 8 years ago

@alex-palevsky this is not urgent.

alex-palevsky commented 8 years ago

@alex-palevsky this is not urgent anymore.

@original-brownbear thanks, I removed the "urgent" tag

dalifreire commented 8 years ago

@alex-palevsky Assign someone else.

alex-palevsky commented 8 years ago

@alex-palevsky Assign someone else.

@dalifreire 30 points was deducted from your rating

alex-palevsky commented 8 years ago

@alex-palevsky Assign someone else.

@dalifreire someone else will help in this task, no problem at all