opengrok #0

Supports: trusty


Installs the opengrok source code search and cross-reference engine

Currently configured as a standalone tomcat6 service. Opengrok is space, cpu, and i/o intensive service.

"A wicked fast source browser"

OpenGrok is a fast and usable source code search and cross reference engine. It helps you search, cross-reference and navigate your source tree. It can understand various program file formats and version control histories like Mercurial, Git, SCCS, RCS, CVS, Subversion, Teamware, ClearCase, Perforce, Monotone and Bazaar. In other words it lets you grok (profoundly understand) source code and is developed in the open, hence the name OpenGrok. It is written in Java.

To deploy:

juju bootstrap
juju deploy opengrok
juju expose opengrok

Then do a juju status to determine the IP of the service, and gvfs-open http://IPADDRESS:8080/source (open browser by mime type).

The opengrok charm uses a standalone tomcat6 instance and is very space, I/O, and CPU intensive. It is not recommended to co-op this service with an existing servlet engine unless you really know what you're doing. A "large" instance is recommended for anything more than a 100MB source code.

To configure: juju set opengrok og_content='{

      "url"   : "lp:juju",
      "alias" : "juju"

Or use the deploy.yaml as a template: juju set opengrok --config deploy.yaml

Only bzr, lp, & git repos are supported at this time. You can add as many repos as you wish, see deploy.yaml for example. Config format is simple JSON array, to add more entries simply duplicate the { "url" : "value", "alias" : "value"} and separate them with a ",". Both fields are required as opposed to developing heuristics to determine unique project names, we require you define it upfront. Otherwise, lp:foo/precise/opengrok/trunk and lp:/foo/quantal/opengrok/trunk both checkout a directory named trunk and there's no way to determine which project was actually cloned.

The indexer will automatically kick off to update the project and database after deploy has completed and whenever a new configuration is provided via the juju interface.

To check on the status of the indexer

juju ssh opengrok/INSTANCE_ID initctl status opengrok-index

opengrok-index start/running, process 10090

A daily cronjob is installed to update the indexes.

When reporting bugs please be sure to include: /var/log/juju/opengrok-common.log

Known Issues: * To maintain idempotent contract, config-changed is completely synchronous. Meaning it will not exit until all specified branches have been cloned and the indexing has completed. config-changed may abort due to an unspecified deadline timer, there is no way to extend this timer. Should you encounter this, 1) file a bug 2) ssh into the instance and clone/index the tree directly. * cloning & indexing Linux kernels (~30 mins) may hit this issue. * To update these "off config" trees: - juju ssh opengrok/N - sudo -i - initctl start --no-wait opengrok-index

  • While only git and bzr are supported by config-changed. You can ssh in and install any VCS you wish and clone into $grok_src. config-changed skips over any existing directories and the charm never destroys user data in $grok_src.

  • A bug was discovered with the history index building and has been disabled in the meanwhile by this charm. Tracked upstream by:

    NOTE: a dedicated opensolaris login is required to update bugs. OpenID is unsupported.

  • Updating existing sandboxes: currently this is a manual affair, eventually a cron job will exist that will walk sandboxes, pull them and kickoff an update

Links: * Stable opengrok-charm: lp:~peter-petrakis/charms/precise/opengrok/trunk * Developemnt opengrok-charm: lp:~peter-petrakis/charms/precise/opengrok/devel * Homepage: * BugTracker: * Binary: * Code: hg clone ssh:// opengrok-dev



(string) Location where opengrok generated indexes live.
(string) Location where user supplied code lives, always preserved.
(string) List of bzr, lp, or git repos using JSON arrays for opengrok to pull and index once. Example syntax: og_content='{ "repos":[ { "url" : "lp:juju", "alias" : "juju"}, {..., ...}, {..., ...} ] }' Where url is the repo link and alias is the directory name to create on it's behalf, both must be set.
{ "repos":[ { "url" : "lp:juju", "alias" : "juju" } ] }