Skip to content

An extremely fast git repository code searcher now can be provisioned over on ARM devices over on balenaCloud.

Notifications You must be signed in to change notification settings

balena-io-experimental/balenahound

Repository files navigation

Balena-Hound

Run your personal hound instance on a Raspberry Pi with auto-indexing repositories

What is Hound?

Hound is an extremely fast source code search engine. The core is based on this article (and code) from Russ Cox: Regular Expression Matching with a Trigram Index. Hound itself is a static React frontend that talks to a Go backend. The backend keeps an up-to-date index for each repository and answers searches through a minimal API.

Source code for Hound, backend and frontend code is here along detailed deployment instructions.

Created a configuration generator

Auto-indexing repositories manually with a Python script at the moment. Additionally, one can configure the script to run as a cron job in order to look for new repositories and generate latest configuration for Hound.

Running Hound on your board

  1. Deploy hound on balenaCloud

  1. Add a new device to your newly created fleet, let it index the repos (Takes time) and it will be ready with message in the console.
running server at http://localhost:80

If you are new to balenaCloud, follow the getting started guide.

By default, Hound will be running on balena's GitHub orgs as a way for you to play around with the instance and test it out. You can easily change this creating a new config.json file using the example config-example.json file.

Configuring your hound

  1. Edit the following dictionaries in the confignator.py file as per your needs. Confignator generates config files for all repositories present in the orgs you specify.
DEFAULT_SETTINGS = {
    "max-concurrent-indexers": 4, 
    "dbpath": "data", 
    "title" : "Hound",
    "health-check-uri" : "/healthz",
}


organizations = [
        "balena-io",
        "balena-io-library",
        "balenalabs",
        "balena-io-playground",
]    
  1. Run confignator.py. Confignator fetches a fresh list of repositories from the GitHub API, hence make sure not to run it repeatedly in order to avoid hitting the rate limit.
python3 confignator.py

This will create a file called config.,json in the root directory. Push a new release to your fleet in order for the hound to run on the latest configuration. Additionally, one can configure the script to run as a cron job in order to look for new repositories and generate latest configuration for Hound.

If you are new to balenaCloud

Get started!

About

An extremely fast git repository code searcher now can be provisioned over on ARM devices over on balenaCloud.

Resources

Stars

Watchers

Forks

Languages