Skip to content
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

Docker script refactoring and rewrite to Python #3402

Merged
merged 19 commits into from
Feb 19, 2021

Conversation

vladak
Copy link
Member

@vladak vladak commented Dec 14, 2020

This change rafactors the scripts used for Docker. The initial motivation was to avoid the non-existent-configuration exception thrown by the web app during the initial startup of a container based on the opengrok image.

Some notable changes:

  • no special casing between initial and non-initial indexing
  • the sequence goes like this:
    1. deploy
    2. bare config is created (to avoid above mentioned exception)
    3. indexer is started in the background (waits for the Tomcat to come up before it enters the infinite loop)
    4. Tomcat is started on foreground
  • to preserve the locking I added filelock to the indexer program

This is a step towards #3221.

Eventually the start.sh script can be rewritten to Python and use native interfaces to opengrok-sync, opengrok-deploy.

I used the opportunity to overhaul everything - the main Docker program is now based on the opengrok-sync and rewritten into Python.

@vladak vladak force-pushed the tools_docker_single branch from f1c0740 to 3d75857 Compare February 8, 2021 15:28
@vladak vladak force-pushed the tools_docker_single branch from 8c2ec3a to 4e363f9 Compare February 8, 2021 15:33
@vladak
Copy link
Member Author

vladak commented Feb 8, 2021

I used the opportunity and changed start.sh to use opengrok-sync and then rewritten it to Python. The way it works now is that the sync runs the mirroring/indexing/... in parallel for each projects and once this is all done, it will print the logs for each project to the console.

@vladak vladak changed the title refactor to avoid special casing Docker script refactoring and rewrite to Python Feb 8, 2021
@vladak
Copy link
Member Author

vladak commented Feb 13, 2021

Incidentally, #3421 describes a use case when project's repositories set is changed. This change does not support such use case even though it can be easily added.

@vladak vladak merged commit 9bb1a66 into oracle:master Feb 19, 2021
@vladak vladak deleted the tools_docker_single branch February 19, 2021 13:14
@vladak
Copy link
Member Author

vladak commented Feb 19, 2021

thanks @ahornace !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants