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

Add support for Redmine/Gitolite splitted configuration #431

Closed
Hugodby opened this Issue May 4, 2015 · 8 comments

Comments

Projects
None yet
3 participants
@Hugodby

Hugodby commented May 4, 2015

For some reasons I need to have gitolite and redmine on two separates instances.
After some tests I found that the plugin kept trying to connect to localhost even if I changed :ssh_server_domain value.
It appears that 'localhost' is hardcoded in lib/redmine_git_hosting/config/gitolite_base.rb and lib/redmine_git_hosting/gitolite_wrapper.rb. By changing 'localhost' with value from :ssh_server_domain everything works fine.

@n-rodriguez

This comment has been minimized.

Show comment
Hide comment
@n-rodriguez

n-rodriguez May 4, 2015

Member

For some reasons I need to have gitolite and redmine on two separates instances.

This cannot work. See here : http://redmine-git-hosting.io/faq/#can-i-install-gitolite-and-redmine-on-different-servers-

Member

n-rodriguez commented May 4, 2015

For some reasons I need to have gitolite and redmine on two separates instances.

This cannot work. See here : http://redmine-git-hosting.io/faq/#can-i-install-gitolite-and-redmine-on-different-servers-

@n-rodriguez n-rodriguez self-assigned this May 4, 2015

@Hugodby

This comment has been minimized.

Show comment
Hide comment
@Hugodby

Hugodby May 5, 2015

With the pull-request I made, it works fine.
To make it work :

  • Both servers must have redmine and git user with each one using the same UID, e.g. adduser --uid 10001 git.
  • git home directory needs to be available from both servers. You could use NFS.

Everything else is just as in the tutorial.

About the latency, think about cloud computing. It's all about isolate and scale your app. I don't see any problem here.

Hugodby commented May 5, 2015

With the pull-request I made, it works fine.
To make it work :

  • Both servers must have redmine and git user with each one using the same UID, e.g. adduser --uid 10001 git.
  • git home directory needs to be available from both servers. You could use NFS.

Everything else is just as in the tutorial.

About the latency, think about cloud computing. It's all about isolate and scale your app. I don't see any problem here.

@n-rodriguez

This comment has been minimized.

Show comment
Hide comment
@n-rodriguez

n-rodriguez May 5, 2015

Member

About the latency, think about cloud computing. It's all about isolate and scale your app. I don't see any problem here.

Of course it works, but this is not a common configuration. It was a deliberate choice to not provide this feature to not add too much complexity.

Member

n-rodriguez commented May 5, 2015

About the latency, think about cloud computing. It's all about isolate and scale your app. I don't see any problem here.

Of course it works, but this is not a common configuration. It was a deliberate choice to not provide this feature to not add too much complexity.

@Hugodby

This comment has been minimized.

Show comment
Hide comment
@Hugodby

Hugodby May 5, 2015

I understand but that kind of setup will become more and more common.
I'm using Docker and I don't see a better solution than one service per container (one with ssh for gitolite, one with nginx-passenger for redmine).
But it's still a great plugin !

Hugodby commented May 5, 2015

I understand but that kind of setup will become more and more common.
I'm using Docker and I don't see a better solution than one service per container (one with ssh for gitolite, one with nginx-passenger for redmine).
But it's still a great plugin !

@n-rodriguez

This comment has been minimized.

Show comment
Hide comment
@n-rodriguez

n-rodriguez May 5, 2015

Member

Thanks! I'm not against adding this feature... but I still have questions... What about Sidekiq worker?
In a such configuration (2 Dockerized Redmine instances with 1 Dockerized Gitolite with NFS share or Docker mounted volumes) where would you put Sidekiq worker if you decide to use it, knowing that it must acts as a FIFO to keep Gitolite config file consistent across Redmine instances?

Member

n-rodriguez commented May 5, 2015

Thanks! I'm not against adding this feature... but I still have questions... What about Sidekiq worker?
In a such configuration (2 Dockerized Redmine instances with 1 Dockerized Gitolite with NFS share or Docker mounted volumes) where would you put Sidekiq worker if you decide to use it, knowing that it must acts as a FIFO to keep Gitolite config file consistent across Redmine instances?

@Hugodby

This comment has been minimized.

Show comment
Hide comment
@Hugodby

Hugodby May 5, 2015

I'm not familiar with Sidekick, redis... Using Docker you have to isolate every process in a different container. I found that : https://github.com/mperham/sidekiq/wiki/Deployment

Also, I'm deploying 1 redmine/ 1 gitolite, not a centralized gitolite for every redmine. It could be possible to do so but as you said it will involve a lot more complexity to keep Gitolite config file consistent.

Hugodby commented May 5, 2015

I'm not familiar with Sidekick, redis... Using Docker you have to isolate every process in a different container. I found that : https://github.com/mperham/sidekiq/wiki/Deployment

Also, I'm deploying 1 redmine/ 1 gitolite, not a centralized gitolite for every redmine. It could be possible to do so but as you said it will involve a lot more complexity to keep Gitolite config file consistent.

@spiette

This comment has been minimized.

Show comment
Hide comment
@spiette

spiette May 5, 2015

This is great, exactly what I need, thanks!

spiette commented May 5, 2015

This is great, exactly what I need, thanks!

@n-rodriguez n-rodriguez added this to the v1.1.0 milestone May 7, 2015

@n-rodriguez

This comment has been minimized.

Show comment
Hide comment
@n-rodriguez

n-rodriguez Jun 2, 2015

Member

Added in commit 10aec4c

(2 Dockerized Redmine instances with 1 Dockerized Gitolite with NFS share or Docker mounted volumes) where would you put Sidekiq worker if you decide to use it, knowing that it must acts as a FIFO to keep Gitolite config file consistent across Redmine instances?

I answer myself : with 2 more containers :

  • one container with a full Redmine instance within but you only start the Sidekiq worker (not the webserver) AND with the NFS share mounted inside (like the regular Redmine instances)
  • one container with a Redis Server inside.

The Redis container must accessible by all Redmine instances (Webserver + Worker).

This might need a bit of configuration (mostly container communication) but it should work.

Member

n-rodriguez commented Jun 2, 2015

Added in commit 10aec4c

(2 Dockerized Redmine instances with 1 Dockerized Gitolite with NFS share or Docker mounted volumes) where would you put Sidekiq worker if you decide to use it, knowing that it must acts as a FIFO to keep Gitolite config file consistent across Redmine instances?

I answer myself : with 2 more containers :

  • one container with a full Redmine instance within but you only start the Sidekiq worker (not the webserver) AND with the NFS share mounted inside (like the regular Redmine instances)
  • one container with a Redis Server inside.

The Redis container must accessible by all Redmine instances (Webserver + Worker).

This might need a bit of configuration (mostly container communication) but it should work.

@n-rodriguez n-rodriguez closed this Jun 2, 2015

@n-rodriguez n-rodriguez changed the title from Edit :ssh_server_domain has no effects on plugin connections to Add support for Redmine/Gitolite splitted configuration Jun 2, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment