X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/db31bedb109a4d918830a910654685a9f591cf28..63bcdd653f111d752ec11ccb3ab58ee5150478d5:/doc/install/install-arv-git-httpd.html.textile.liquid diff --git a/doc/install/install-arv-git-httpd.html.textile.liquid b/doc/install/install-arv-git-httpd.html.textile.liquid index 964f5a25ac..3d70fc4de9 100644 --- a/doc/install/install-arv-git-httpd.html.textile.liquid +++ b/doc/install/install-arv-git-httpd.html.textile.liquid @@ -78,15 +78,15 @@ git@gitserver:~$ rm .ssh/authorized_keys h2(#gitolite). Install gitolite -Check "https://github.com/sitaramc/gitolite/tags":https://github.com/sitaramc/gitolite/tags for the latest stable version. This guide was tested with @v3.6.4@. _Versions below 3.0 are missing some features needed by Arvados, and should not be used._ +Check "https://github.com/sitaramc/gitolite/tags":https://github.com/sitaramc/gitolite/tags for the latest stable version. This guide was tested with @v3.6.11@. _Versions below 3.0 are missing some features needed by Arvados, and should not be used._ Download and install the version you selected. -
# su git
+
$ sudo -u git -i bash
 git@gitserver:~$ echo 'PATH=$HOME/bin:$PATH' >.profile
 git@gitserver:~$ . .profile
-git@gitserver:~$ git clone --branch v3.6.4 https://github.com/sitaramc/gitolite
+git@gitserver:~$ git clone --branch v3.6.11 https://github.com/sitaramc/gitolite
 ...
 Note: checking out '5d24ae666bfd2fa9093d67c840eb8d686992083f'.
 ...
@@ -176,6 +176,15 @@ Create a configuration file @/var/www/arvados-api/current/config/arvados-clients
 
+
+$ sudo chown git:git /var/www/arvados-api/current/config/arvados-clients.yml
+$ sudo chmod og-rwx /var/www/arvados-api/current/config/arvados-clients.yml
+
+ +h3. Test configuration + +notextile.
$ sudo -u git -i bash -c 'cd /var/www/arvados-api/current && bundle exec script/arvados-git-sync.rb production'
+ h3. Enable the synchronization script The API server package includes a script that retrieves the current set of repository names and permissions from the API, writes them to @arvadosaliases.pl@ in a format usable by gitolite, and triggers gitolite hooks which create new empty repositories if needed. This script should run every 2 to 5 minutes. @@ -189,41 +198,37 @@ Create @/etc/cron.d/arvados-git-sync@ with the following content: h2(#update-config). Update config.yml -Edit the cluster config at @/etc/arvados/config.yml@ . +Edit the cluster config at @config.yml@ .
    Services:
       GitSSH:
-        ExternalURL: git@git.ClusterID.example.com:
+        ExternalURL: "ssh://git@git.ClusterID.example.com"
       GitHTTP:
         ExternalURL: https://git.ClusterID.example.com/
         InternalURLs:
-	  "http://git.ClusterID.example.com:9001": {}
+	  "http://localhost:9001": {}
     Git:
       GitCommand: /var/lib/arvados/git/gitolite/src/gitolite-shell
       GitoliteHome: /var/lib/arvados/git
-      Repositories: /var/lib/arvados/git/repositories	
+      Repositories: /var/lib/arvados/git/repositories
 
-Make sure to include the trailing colon in @Services.GitSSH.ExternalURL@. - h2(#update-nginx). Update nginx configuration -Use a text editor to create a new file @/etc/nginx/conf.d/arvados-git.conf@ with the following configuration. Options that need attention are marked with "TODO". +Use a text editor to create a new file @/etc/nginx/conf.d/arvados-git.conf@ with the following configuration. Options that need attention are marked in red. -

-upstream arvados-git-httpd {
+
upstream arvados-git-httpd {
   server                  127.0.0.1:9001;
 }
 server {
-  listen                  [your public IP address]:443 ssl;
+  listen                  443 ssl;
   server_name             git.ClusterID.example.com;
   proxy_connect_timeout   90s;
   proxy_read_timeout      300s;
 
-  ssl on;
   ssl_certificate         /YOUR/PATH/TO/cert.pem;
   ssl_certificate_key     /YOUR/PATH/TO/cert.key;
 
@@ -269,13 +274,15 @@ h2(#confirm-working). Confirm working installation
 Create 'testrepo' in the Arvados database.
 
 
-
~$ arv --format=uuid repository create --repository '{"name":"testrepo"}'
+
~$ arv --format=uuid repository create --repository '{"name":"myusername/testrepo"}'
 
The arvados-git-sync cron job will notice the new repository record and create a repository on disk. Because it is on a timer (default 5 minutes) you may have to wait a minute or two for it to show up. h3. SSH +Before you do this, go to Workbench and choose *SSH Keys* from the menu, and upload your public key. Arvados uses the public key to identify you when you access the git repo. +
~$ git clone git@git.ClusterID.example.com:username/testrepo.git
 
@@ -283,7 +290,7 @@ h3. SSH h3. HTTP -Set up git credential helpers as described in "install shell server":install-shell-server.html for the "git push" command to use your API token instead of prompting you for a username and password. +Set up git credential helpers as described in "install shell server":install-shell-server.html#config-git for the git command to use your API token instead of prompting you for a username and password.
~$ git clone https://git.ClusterID.example.com/username/testrepo.git