Skip to content
/ hazel Public

🪶 Easy to use read-only proxy to map objects to URLs

License

Notifications You must be signed in to change notification settings

Noelware/hazel

Repository files navigation

🪶 hazel

Easy to use read-only proxy to map objects to URLs


Hazel is Noelware's microservice to proxy our objects that we publish (like artifacts.noelware.org for all binary artifacts) to URLs that are mapped by their object storage location.

Hazel was originally maintained only by Noel Towa but now is maintained and controlled by the Noelware team.

Installation

Install Script

WARNING -- Please install the scripts first and audit them before running.

# Unix:
$ curl -fsSL https://i.noelware.org/hazel | sh -

# Windows:
$ irm https://i.noelware.org/hazel.ps1 | iex

Docker

Running Hazel as a Docker container is the most recommended way to run the Hazel server with minimal configuration for smaller deployments. You can pull the docker.noelware.org/noelware/hazel image to run the Hazel server.

The image can consist with multiple tags for styles on how to deploy to your environment. We typically build the Hazel images with linux/amd64 and linux/arm64 architectures. Windows containers is not planned at the moment.

  • latest - Uses a specific channel to pull the image from. latest will be the latest stable version, beta will be the latest beta version.

  • alpine - This tag will use Alpine as the base image due to its low size to make Hazel run on low systems without a lot of system resources.

Note

Hazel only holds persistence over files that are served from the local filesystem. If you wish to use other providers, this is not a required step.

You can create a volume with docker volume create:

$ docker volume create hazel

Note

You can substitute hazel with any volume name, but you will have to change hazel to the volume name in later examples if you went with creating a volume with docker volume.

For regular filesystem-mounted directories, you will need to change the ownership of the directory so the server can read & write to it. You can use the chown command to do so:

$ chown -R 1001:1001 <directory>

Now, we can pull the image from Noelware's Container Registry:

$ docker pull docker.noelware.org/noelware/hazel

Now, we can run the container!

# Using -v is an optional step if you're not using the local filesystem.
$ docker run -d -p 8989:8989 --name hazel \
    -e HAZEL_SERVER_NAME=my-hazel-instance \
    -v /var/lib/noelware/hazel/data:my-volume \
    docker.noelware.org/noelware/hazel

Helm Chart

Refer to the Noelware/helm-charts repository for more information.

NixOS

On a NixOS machine, you can use the [nixpkgs-noelware] overlay to install a Hazel server on a NixOS server:

{
    services.hazel.enable = true;
}

It'll use a filesystem mapping in /var/lib/noelware/hazel/data, but can be overwritten with services.hazel.fsPath.

Contributing

Thanks for considering contributing to hazel! Before you boop your heart out on your keyboard ✧ ─=≡Σ((( つ•̀ω•́)つ, we recommend you to do the following:

If you read both if you're a new time contributor, now you can do the following:

  • Fork me! **♡( ⁎ᵕᴗᵕ⁎ )
  • Clone your fork on your machine: git clone https://github.com/your-username/hazel
  • Create a new branch: git checkout -b some-branch-name
  • BOOP THAT KEYBOARD!!!! ♡┉ˏ͛ (❛ 〰 ❛)ˊˎ┉♡
  • Commit your changes onto your branch: git commit -am "add features (。>‿‿<。 )"
  • Push it to the fork you created: git push -u origin some-branch-name
  • Submit a Pull Request and then cry! 。・゚゚・(థ Д థ。)・゚゚・。

License

Hazel is released under the Apache 2.0 License and with love 💜 by Noelware. :3