Some experiences of installing Kallithea on Windows

Mads Kiilerich mads at kiilerich.com
Wed Mar 30 20:26:24 UTC 2016


On 03/29/2016 09:25 PM, Konstantin Veretennicov wrote:
> Hi,
>
> I was setting up Kallithea for our small team, to replace hgweb.cgi installation
> that didn't cut it anymore, especially when it came to code review.
> Email + hgweb are very flexible and you can go a surprisingly long way with just
> that. But they're not enough for tracking which changes are still to be reviewed
> or integrated.
>
> Since our infrastructure is all Windows, Kallithea had to be installed on
> Windows Server 2012 R2 (*duck*).
>
> I got an experimental installation inside virtualenv up and running fairly
> quickly. We did evaluation with the team and I proceeded to "production"
> install. The main thing to solve was making it work with our existing Active
> Directory accounts.
>
> So I made a fatal decision: decided to put Kallithea behind some proxy with
> Windows Authentication support and configure container auth. That way I hoped to
> get a single'ish sign-on. My initial attempt was with IIS and ISAPI WSGI.

So you were following 
http://docs.kallithea-scm.org/en/latest/installation_iis.html ?

> I soon
> discovered that it meant pywin32 dependency, which is no friend of virtualenv -
> so there goes virtualenv. Anyway, when everything that had to be installed and
> configured was finally installed and configured (including ISAPI support in IIS,
> application pool settings, etc.), all this managed to produce was mysterious
> death of IIS application pool process whenever a request was sent to it. What
> made me abandon this track was complete lack of diagnostics: apart from Windows
> Event Log talking of sudden crash of w3wp.exe - nothing of substance.

Did you use |win32traceutil| as mentioned in the documentation?

> So, anyway... finally I got to the point where my wrong initial assumption
> became obvious :) - the assumption that Mercurial will authenticate against this
> setup. But Mercurial client doesn't do Windows Authentication, only Basic.
> Which (as I immediately remembered) I already discovered 5 years ago while
> setting up our original hgweb...
>
> I still fiddled a bit with IIS Basic Authentication, which validates
> plaintext credentials against Active Directory, but it didn't work out
> right away. For some reason Mercurial client got served login page instead of
> repo data. There was probably some mistake here on my part that could be
> debugged with a bit of effort, but at this point I was quickly losing steam.
> Also it looked like a dead-end anyway, because even if it worked I was only
> getting plaintext auth. So why not remove proxy from the picture and
> authenticate with AD over LDAP.
>
> Here the first hurdle was to get python-ldap binaries for Python 2.7 x64, which,
> in a moment of weakness, I just grabbed from Gohlke.

Why was that weakness?

> Then I had to figure out
> correct LDAP settings. I managed that with the help of documentation, some trial
> and error and my lucky rabbit foot. I think the key setting for me was "LDAP
> Filter". Luckily, the Active Directory notes in Kallithea LDAP documentation
> matched our own "Small Business Server" LDAP layout.

What part of the documentation left you having to do trial and error? 
How could it have helped you?

> The last steps were piece(s) of cake, punching a hole in Windows firewall and
> making Kallithea an NT Service with the help of wsgisvc. Here I wasn't sure
> which folders need which permissions, so I left it running under (overpowered)
> "Local System" account, which is wsgisvc's default.
>
>
> I post this here mainly as a reminder to self to make a documentation PR with a
> warning "Don't waste your time putting Kallithea behind Windows Authentication".

That doesn't sounds like a helpful advice. But it would be nice to get 
the documentation improved to help with the problems you encountered and 
to set the expectations right and mention the pros and cons.

/Mads
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sfconservancy.org/pipermail/kallithea-general/attachments/20160330/1fde8edd/attachment.html>


More information about the kallithea-general mailing list