kubiko / opengrok-snap

2 stars 1 forks source link

Is there a guide to configure opengrok-snap? #1

Open swmobile opened 4 years ago

swmobile commented 4 years ago

Hard for me to make it works easily

LukeAtTheWorld commented 4 years ago

+1...

kubiko commented 4 years ago

This is a bit tricky, as opengrok does not provide much in sense to create initial source I have created additional snap, with helper script which can be run manually to clone initial source. Mind this supports mainly what I needed. To use it:

$ snap install opengrok-src-updater
$ snap connect opengrok:src-updater  opengrok-src-updater:src-updater

Create a edit file /var/snap/opengrok/common/source.conf Example here: https://paste.ubuntu.com/p/vwN5M9RDK8/ sudo opengrok.update-source

Now you should have initial source created, config file will make it also easy to redeploy if needed without manual git clone....

Now to create first index: sudo opengrok.indexer and to deploy web app sudo opengrok.deploy

Opengrok will automatically sync code every morning based on existing index. (mind this does not add new projects added to /var/snap/opengrok/common/source.conf It uses opengrok's own opengrok.sync which can be also run manually sudo opengrok.sync

Otherwise all opengrok apps should be exposed, what normally would be opengok-<app name> is opengrok.<name of app>

kubiko commented 2 years ago

I have now also update readme here with addition of extra feature and source syncing.

anhtn512 commented 2 years ago

This is a bit tricky, as opengrok does not provide much in sense to create initial source I have created additional snap, with helper script which can be run manually to clone initial source. Mind this supports mainly what I needed. To use it:

$ snap install opengrok-src-updater
$ snap connect opengrok:src-updater  opengrok-src-updater:src-updater

Create a edit file /var/snap/opengrok/common/source.conf Example here: https://paste.ubuntu.com/p/vwN5M9RDK8/ sudo opengrok.update-source

Now you should have initial source created, config file will make it also easy to redeploy if needed without manual git clone....

Now to create first index: sudo opengrok.indexer and to deploy web app sudo opengrok.deploy

Opengrok will automatically sync code every morning based on existing index. (mind this does not add new projects added to /var/snap/opengrok/common/source.conf It uses opengrok's own opengrok.sync which can be also run manually sudo opengrok.sync

Otherwise all opengrok apps should be exposed, what normally would be opengok-<app name> is opengrok.<name of app>

I got an issue when follow your comment. issue in photo bellow image

kubiko commented 2 years ago

@anhtn512 sorry for the late reply. You can ignore opengrok-src-updater snap now, this is no more needed. Once you created /var/snap/opengrok/common/source.conf you will need to run $ sudo opengrok.update-source $ sudo opengrok.index-all $ sudo opengrok.deploy Running with the default configs you should check content of the directory: /var/snap/opengrok/common/webapps/ There you should see source.war and directory source/