diff options
author | Joey Hess <joey@kitenet.net> | 2014-06-16 18:34:51 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-06-16 18:34:51 -0400 |
commit | 43f5e9d3eb748eeb60250366c23a3cfb494ab9b7 (patch) | |
tree | 315fbde1d0ba075919faf6540e39a06c7acd99b4 /doc/todo/windows_git-annex_service | |
parent | ef4de5d79b8ef1dbd1749f5e1e56e112eb9cd10d (diff) |
split out windows service todo
Diffstat (limited to 'doc/todo/windows_git-annex_service')
10 files changed, 130 insertions, 0 deletions
diff --git a/doc/todo/windows_git-annex_service/comment_11_c3af14453e99dae5425deaa26ca7310e._comment b/doc/todo/windows_git-annex_service/comment_11_c3af14453e99dae5425deaa26ca7310e._comment new file mode 100644 index 000000000..83e2ba514 --- /dev/null +++ b/doc/todo/windows_git-annex_service/comment_11_c3af14453e99dae5425deaa26ca7310e._comment @@ -0,0 +1,14 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawm9ocq1Kb0WL-cz-LPpvd2Xm-q8tIQvqXA" + nickname="Dominik" + subject="running as service" + date="2014-05-13T17:40:57Z" + content=""" +Hey, just tried git-annex on windows. Love the idea, but the windows port still seems to be a work in progress. I thought I'd check in here and see if i could help. Maybe this is a start: + +You can setup any executable file as a windows service using Sc.exe included in the Windows Resource Kit. +https://support.microsoft.com/kb/251192?SmcNavTabIndex=1 +Its pretty easy and straightforward + +Another option would be installing the service using nsis, here is one possible plugin that should do the trick: http://nsis.sourceforge.net/NSIS_Simple_Service_Plugin +"""]] diff --git a/doc/todo/windows_git-annex_service/comment_12_d3d91ddc00bc275455022d86b779b148._comment b/doc/todo/windows_git-annex_service/comment_12_d3d91ddc00bc275455022d86b779b148._comment new file mode 100644 index 000000000..df4545911 --- /dev/null +++ b/doc/todo/windows_git-annex_service/comment_12_d3d91ddc00bc275455022d86b779b148._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="108.236.230.124" + subject="comment 12" + date="2014-05-15T20:36:09Z" + content=""" +@Dominik, thanks for the links. Now that the webapp handles prompting for ssh passwords, the console is entirely vestigial and I'd like to get rid of it. The sc commands seems possible to use; there are also haskell libraries for building windows services. + +The tricky part is that multiple git-annex assistant processes can be running, if there are multiple local repositories. This seems to be hard to do as a service. +"""]] diff --git a/doc/todo/windows_git-annex_service/comment_13_59fbe4d07cdbeb786bae792f9c709ddd._comment b/doc/todo/windows_git-annex_service/comment_13_59fbe4d07cdbeb786bae792f9c709ddd._comment new file mode 100644 index 000000000..3d630ed0c --- /dev/null +++ b/doc/todo/windows_git-annex_service/comment_13_59fbe4d07cdbeb786bae792f9c709ddd._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="http://johan.kiviniemi.name/" + nickname="Johan" + subject="comment 13" + date="2014-05-16T02:27:51Z" + content=""" +“The tricky part is that multiple git-annex assistant processes can be running, if there are multiple local repositories.” + +This would probably mean a lot of work, but it might be nice if there was just a single git-annex assistant per user which could take care of multiple local repos. The UI would be nicer, too, since the status of and notifications from every repository could be shown in the same place. +"""]] diff --git a/doc/todo/windows_git-annex_service/comment_14_79fc0ff98c5bba2ed616e52e5a58e28f._comment b/doc/todo/windows_git-annex_service/comment_14_79fc0ff98c5bba2ed616e52e5a58e28f._comment new file mode 100644 index 000000000..9d7fb9ff0 --- /dev/null +++ b/doc/todo/windows_git-annex_service/comment_14_79fc0ff98c5bba2ed616e52e5a58e28f._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawm9ocq1Kb0WL-cz-LPpvd2Xm-q8tIQvqXA" + nickname="Dominik" + subject="multiple git-annex assistant processes" + date="2014-05-16T23:05:28Z" + content=""" +shouldn't be a problem though if all processes are spawned from the same service though, right? Or what problems did you have in mind? +"""]] diff --git a/doc/todo/windows_git-annex_service/comment_15_fcd34607116183cc1a764fb307eabe0a._comment b/doc/todo/windows_git-annex_service/comment_15_fcd34607116183cc1a764fb307eabe0a._comment new file mode 100644 index 000000000..57505d1d9 --- /dev/null +++ b/doc/todo/windows_git-annex_service/comment_15_fcd34607116183cc1a764fb307eabe0a._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="108.236.230.124" + subject="comment 15" + date="2014-06-04T20:49:26Z" + content=""" +`sc` can only be used by the administrator. That is problimatic. + +Also, in order for sc to be used, the program has to have support for it. It cannot be any arbitrary program. win32-service adds such support. However, I have not been able to get programs using win32-service to build: <https://github.com/mikesteele81/Win32-services/issues/3> +"""]] diff --git a/doc/todo/windows_git-annex_service/comment_16_6a6424f23772e57f1adb1807ca8b93fa._comment b/doc/todo/windows_git-annex_service/comment_16_6a6424f23772e57f1adb1807ca8b93fa._comment new file mode 100644 index 000000000..53b705d05 --- /dev/null +++ b/doc/todo/windows_git-annex_service/comment_16_6a6424f23772e57f1adb1807ca8b93fa._comment @@ -0,0 +1,14 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="108.236.230.124" + subject="service not needed" + date="2014-06-04T21:16:06Z" + content=""" +Seems that all I need to do is pass -optl-mwindows when building git-annex; this will produce a binary that does not open a console window when started from the start menu, but still runs in the background. So it will work as the webapp. + +**However**, it can't be used at the command line. So, I think I should make a git-annex-webapp shim that's built that way and starts the real webapp. + +But, some work needs to be done, because when run this way, git-annex can't write to stdout or stderr, which it tries to do, and so crashes on startup. + +Also, when git-annex is built that way and tries to run git.. windows helpfully opens a command.exe to display any output git might have. So we get lots of flickering command.exe windows. +"""]] diff --git a/doc/todo/windows_git-annex_service/comment_17_62a1a33c2aaf4b0b8a0149ec526907d7._comment b/doc/todo/windows_git-annex_service/comment_17_62a1a33c2aaf4b0b8a0149ec526907d7._comment new file mode 100644 index 000000000..520e50154 --- /dev/null +++ b/doc/todo/windows_git-annex_service/comment_17_62a1a33c2aaf4b0b8a0149ec526907d7._comment @@ -0,0 +1,16 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawm9ocq1Kb0WL-cz-LPpvd2Xm-q8tIQvqXA" + nickname="Dominik" + subject="comment 17" + date="2014-06-05T16:42:02Z" + content=""" +Actually you can create a service from any program or batch file using srvany.exe from the windows resource kit: http://support.microsoft.com/kb/137890. An alternative would be the Non-Sucking Service Manager http://nssm.cc/ +Also nsis has some plugins for creating services, but i havent tried any of them: http://nsis.sourceforge.net/How_do_I_start/stop/create/remove/check_a_service + +Upsides: +1) You don't have to touch your code or change anything in the compilation just to create the service +2) git-annex will still work fine from the console +Downside: You'd have to include an extra binary or plugin in your installer for creating the service + +But I'm pretty sure that none of the commandline calls would pop up in a new window that way, but if you need the verbose mode, you could still start the webapp from console instead as service and everything will show as expected +"""]] diff --git a/doc/todo/windows_git-annex_service/comment_18_3a408492107ca6f120b631ce8c41faef._comment b/doc/todo/windows_git-annex_service/comment_18_3a408492107ca6f120b631ce8c41faef._comment new file mode 100644 index 000000000..494e3f43a --- /dev/null +++ b/doc/todo/windows_git-annex_service/comment_18_3a408492107ca6f120b631ce8c41faef._comment @@ -0,0 +1,23 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="108.236.230.124" + subject="nssm notes" + date="2014-06-10T18:16:00Z" + content=""" +* Have to install and run nssm as an administrator. (It may be possible to get it to run as a non-administrator user if the admin sets it up. I haven't succeeded.) +* `nssm install git-annex` +* Set path to git-annex, and set Arguments to: `assistant --autostart` +* In Exit tab, change Restart to \"No action\" +* In Process tab, uncheck \"Console window\" +* Repositories to start up have to be listed in `C:\Documents and Settings\LocalService\.config\git-annex\autostart` + (rather than the normal user home directory) + +After all that it works! Even opening git-annex webapp from the menu avoids the console window (it appears briefly but then goes away). + +Most of this setup could be boiled down to a command line invocation, which git-annex could do at install time. However, it would still need to be run by the admin. Luckily the git-annex installation process already only works as admin (and I guess I could close the bug about that if it gets a legitimate reason to need admin..) + +Some changes in git-annex would improve this. + +* Maybe have a way to specify the user that git-annex is running on behalf of, and look in that user's home directory, rather than LocalService. (Other parts of the webapp UI, like adding a new repository, also use LocalService as the home directory, which is confusing). +* Starting the webapp for the first time to create a repository still opens a console window, so find a workaround for this. +"""]] diff --git a/doc/todo/windows_git-annex_service/comment_19_c6cbc8fe9218f90c661cd1026658c939._comment b/doc/todo/windows_git-annex_service/comment_19_c6cbc8fe9218f90c661cd1026658c939._comment new file mode 100644 index 000000000..ec3cf7b09 --- /dev/null +++ b/doc/todo/windows_git-annex_service/comment_19_c6cbc8fe9218f90c661cd1026658c939._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="https://www.google.com/accounts/o8/id?id=AItOawm9ocq1Kb0WL-cz-LPpvd2Xm-q8tIQvqXA" + nickname="Dominik" + subject="comment 19" + date="2014-06-10T18:24:22Z" + content=""" +That sounds great! I'll try it out on windows 8 aswell once i get around to it. +"""]] diff --git a/doc/todo/windows_git-annex_service/comment_20_ca245781a37db5546da3f7204adbeebb._comment b/doc/todo/windows_git-annex_service/comment_20_ca245781a37db5546da3f7204adbeebb._comment new file mode 100644 index 000000000..badb5308a --- /dev/null +++ b/doc/todo/windows_git-annex_service/comment_20_ca245781a37db5546da3f7204adbeebb._comment @@ -0,0 +1,17 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="108.236.230.124" + subject="comment 20" + date="2014-06-10T19:11:57Z" + content=""" +This seems pretty close to a command line to install the service with nssm. + +<pre> +nssm install git-annex 'C:\Program Files\Git\cmd\git-annex.exe' assistant --autostart +nssm set git-annex AppExit 0 Ignore +nssm set git-annex AppExit 1 Ignore +nssm set git-annex AppDirectory C:\ +nssm set git-annex AppNoConsole 1 +nssm start git-annex +</pre> +"""]] |