Skip to content

Instantly share code, notes, and snippets.

@DaveRandom
Last active July 21, 2017 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DaveRandom/f21618aa75053667d45f3ee9b696df1b to your computer and use it in GitHub Desktop.
Save DaveRandom/f21618aa75053667d45f3ee9b696df1b to your computer and use it in GitHub Desktop.
Adding projects to OpenGrok on lxr.room11.org

Adding projects to OpenGrok on lxr.room11.org

Connecting to the server

SSH to lxr.room11.org. The server requires public key authentication, contact a room owner to have your key added.

Adding a project

Check out the sources from git into /srv/sources. The directory name will appear in the OpenGrok web interface, so choose a sensible directory name! Please use https:// URLs for the remote where possible.

If you are adding multiple branches of the same project, check the project out into two separate directories. By convention, the directories should be named project-name@branch-name, e.g. php-src@master, php-src@7.2 etc.

Indexing

TL;DR be patient, it will happen by itself.

In general it's best to let indexing happen automatically - it happens once an hour and unless the project you added is huge, it won't take very long.

If you need to manually trigger a re-index, execute /opt/room11-opengrok/bin/cronjob. This script has an flock guard, so if it returns immediately it means there is already an index in progress.

IMPORTANT: If you kill the cronjob script it will not stop the indexing process, because the actual indexing process is owned by the docker daemon. It will, however, release the flock created by the cronjob, and allow a second indexing process to start, which at best will burn CPU unnecessarily and at worst will corrupt the index. In other words, if you start an index then let it finish!

Adding people

Add newly created users to the wheel group to give the sudo permissions. Only do this for people you trust!

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