Skip to content

Latest commit

 

History

History
91 lines (75 loc) · 3.34 KB

README.md

File metadata and controls

91 lines (75 loc) · 3.34 KB

Hubble Enterprise Updater

The updater may be run in two modes:

  1. As a service on a dedicated machine that calls the GitHub Enterprise appliance.
  2. As a service on the GitHub Enterprise appliance.
    • Pro: Quick and easy setup. No additional machine required.
    • Con: Requires modifications to the GitHub Enterprise image.
    • Con: Will need to reinstall the service after each upgrade of your GitHub Enterprise appliance.

Setup on a Dedicated Machine

  1. Set up a Linux or macOS machine.
  2. Ensure that Git and Python 3 are installed (for instance, on macOS via homebrew with brew update && brew install python3).
  3. Clone this repository to your machine.
  4. Create a config file in updater/config.py in your local clone (based on updater/config.py.example)
  5. Configure a service or cronjob that executes python3 update-stats.py once per day.

Alternatively, you can set it up via Docker:

  1. Build the Docker image
    $ docker build . --tag hubble-updater
  2. Create a config file in updater/config.py (based on updater/config.py.example)
  3. Configure a service or cron job that executes the Docker container once a day (replace /path/to/config.py and /path/to/key with your paths):
    docker run -it --mount type=bind,source=/path/to/config.py,target=/hubble-updater/config.py --mount type=bind,source=/path/to/key,target=/key hubble-updater

Setup on the GitHub Enterprise Appliance

Installation

  1. Download the latest release from GitHub.
  2. Check the SHA-256 hash of the downloaded package against the value published on the release page:
    sha256sum hubble-enterprise_x.y.z_all.deb
  3. Install the package:
    sudo dpkg -i hubble-enterprise_x.y.z_all.deb
  4. Create a config file in /opt/autodesk/hubble-enterprise/config.py (based on [config.py.example](config.py.example)).
  5. Enable and start the periodic updater process (persistently, survives reboots):
    sudo systemctl enable hubble-enterprise.timer
    sudo systemctl start hubble-enterprise.timer
  6. Optionally, you may trigger the updater process (just once):
    sudo systemctl start hubble-enterprise.service

Upgrading

  1. Remove old versions of the package (if existent):
    sudo apt-get remove hubble-enterprise
  2. Install the new version of the package:
    sudo dpkg -i hubble-enterprise_x.y.z_all.deb
  3. If the systemd files (the service or timer file) have changed, let systemd adapt to the changes:
    sudo systemctl daemon-reexec

Uninstallation

  1. Disable the periodic updater process:
    sudo systemctl disable hubble-enterprise.timer
  2. Remove the package:
    sudo apt-get remove hubble-enterprise

Debugging

The updater’s log is accessible as follows:

journalctl -fu hubble-enterprise.service

Debian Packaging

See the documentation for more instructions.