2

In Bonobo Git server 5.2.0.0 I changed the "Repository directory" to something like D:\Git_Repositories.

But, It will search for repositories only directly under that folder and will not propagate inside it for folders inside it.

For example:

D:\Git_Repositories\PROJECT_A_Repos\Repository_1
D:\Git_Repositories\PROJECT_A_Repos\Repository_2
etc.

Can that be done somehow?
(Without creating a new Bonobo application for each repository directory)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Elyahu
  • 226
  • 1
  • 2
  • 15

3 Answers3

2

Can that be done somehow ?

Under the current implementation, no:
The Bonobo.Git.Server/Git/IGitRepositoryLocator.cs#IGitRepositoryLocator is used in Bonobo.Git.Server/Git/GitService/GitServiceExecutor.cs#ExecuteServiceByName() as so:

args += " \"" + repoLocator.GetRepositoryDirectoryPath(repositoryName).FullName + "\"";

But nothing prevent you to add more intelligence in Bonobo.Git.Server/Git/ConfigurationBasedRepositoryLocator.cs#GetRepositoryDirectoryPath(), making sure to find a subfolder name repository+".git" instead of blindly combining the name of the repo to a fixed base folder.


The OP Elyahu ended up (in the comments) with:

I just created another Bonobo site that used the other folder as repositories container.
Bonobo basic site is less than 40MB

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Eventually U just created another Bonobo site. It was much quicker and allowed to be more control adjust. Thanks – Elyahu Aug 08 '16 at 07:49
  • @Elyahu So what did you do? – VonC Aug 08 '16 at 07:50
  • as I said. I just created another Bonobo site that used the other folder as repositories container. Bonobo basic site is less than 40MB – Elyahu Aug 08 '16 at 07:55
  • 1
    @Elyahu OK. I have included your comment in the answer for more visibility. – VonC Aug 08 '16 at 08:00
0

Another solution can be to make a LINK to another directory

From the directory: C:\inetpub\wwwroot\Bonobo.Git.Server\App_Data enter the following command: MKLINK /D Repositories D:\\Repositories

(for info on MKLINK see: https://technet.microsoft.com/en-us/library/cc753194(v=ws.11).aspx )

Luuk
  • 12,245
  • 5
  • 22
  • 33
0

My problem required 3 separate repositories that could be locked down by AD group. These repositories also required both a physical separation and logical separation per company policy. The solution I came up with is as follows.

First and foremost, I did away with the whole "Virtual Application" implementation and opted to host each instances on IIS w/one IP address by creating new IIS web sites bound to the machines IP address using Site Bindings via host name so IIS could resolve to the proper instance. Accordingly - this required 3 internal DNS entries. If working locally you could probably get away with editing your LMHost file.

Example:

  • Instance 1 = git1.domain.com
  • Instance 2 = git2.domain.com
  • Instance 3 = git3.domain.com

Once these 3 bindings were created, I simply modified the web.config for AD Windows authentication using our AD groups to map users to Teams.

As for the repositories, I placed them in a completely different directory outside of the web apps and changed the settings in the Bonobo WebApp to point to the appropriate repository for that instance.

Example:

  • Instance 1 = Repo Path: D:\Repositories\Repo1, Security (ADGroup1, GitAdmin)
  • Instance 2 = Repo Path: D:\Repositories\Repo2, Security (ADGroup2, GitAdmin)
  • Instance 3 = Repo Path: D:\Repositories\Repo3, Security (ADGroup3, GitAdmin)

The only draw back is that I am required to manage three websites versus just one. I'm actually not that concerned as it perfectly meets the requirements of company policies of having physical and logical isolation of the various repositories.

That said - I do think it would be wise for this project's sponser to consider supporting multiple repository paths because this is probably more common with organizations supporting multiple repository disk locations

Sean
  • 21
  • 2