-
Notifications
You must be signed in to change notification settings - Fork 778
public OpenGrok demo - autodeploy on push with successful build and test #1740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Need to sort out these things:
|
I think Heroku is clear winner as it provides:
and is quite cheap ($7/month for Hobby version - https://www.heroku.com/pricing). |
According to https://atmos.org/github-services/auto-deployment/ it is not necessary to deploy via Travis. One can deploy from Github directly to Heroku. For that 2 Services are needed:
This seems to be cleaner than deploying via Travis (and does not extend the dependency - Travis can be replaced by different CI in the future) and provides tracking via the deployment objects. |
There is demo.opengrok.org however it would be nice to have this more seamless, ideally with ping-back via webhook to see if the deploy was successful. |
Given that there is Docker image it would be shame not to use it since it wraps most of the complexity in usable package. Initially my idea was to deploy using the existing Travis pipeline however that is not needed - I stumbled upon https://stackoverflow.com/a/38593838/11582827 that recommends to use https://github.com/containrrr/watchtower that polls Docker image status and restarts existing containers with the latest image. So, this basically boils down to couple of things:
|
Hi, is this idea on hold? |
Well, the Docker container works fine, it's just a matter of finding a place to host it and provision for each release. Any suggestions are welcome. |
For the time being I settled on Ubuntu image in Oracle Free Tier OCI (it has only 1 GB RAM so it cannot index anything sizeable due to #3243). It runs the OpenGrok Docker image that is automatically updated by The configuration looks like this:
version: "3"
# More info at https://github.com/oracle/opengrok/docker/
services:
opengrok:
container_name: opengrok-demo
image: opengrok/docker:master
ports:
- "80:8080/tcp"
environment:
SYNC_PERIOD_MINUTES: '10'
READONLY_CONFIG_FILE: '/opengrok/etc/read-only.xml'
CHECK_INDEX: 1
restart: always
# Volumes store your data between container upgrades
volumes:
- '~/opengrok/src/:/opengrok/src/' # source code
- '~/opengrok/etc/:/opengrok/etc/' # folder contains configuration.xml
- '~/opengrok/data/:/opengrok/data/' # index and other things for source code
# Automatically update all images and restart the respective containers.
watchtower:
image: containrrr/watchtower
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --interval 3600 --cleanup --include-stopped --revive-stopped --debug
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.8.0_121" class="java.beans.XMLDecoder">
<object class="org.opengrok.indexer.configuration.Configuration" id="Configuration0">
<!-- enable definitions for historical revisions of files in the Navigate window -->
<void property="ctags">
<string>/usr/local/bin/ctags</string>
</void>
<void property="webappCtags">
<boolean>true</boolean>
</void>
</object>
</java>
Need to get the DNS entry set to point to the IP address. One gotcha about |
For testing purposes it would be nice if we could publish new OpenGrok image for each source level commit, say to |
The demo is running on http://demo.opengrok.org/ |
@vladak I tried to use it, but I always got an error. |
Yeah, it's running on freebie underpowered VM so is struggling. I need to find it a better home. |
As asked in #1736 , there should be a public demo server that indexes OpenGrok code, running the latest
master
.The text was updated successfully, but these errors were encountered: