First, You will need to install and configure Go on your computer.
Once you have your local environment setup, clone the Refinery repository.
git clone https://github.com/honeycombio/refinery.git
Now that you have the source code, you can build refinery and ensure everything is working by running the command below at the root of the Refinery directory.
go run ./cmd/refinery/main.go -c config_complete.yaml -r rules_complete.yaml
Tests require a local installation of redis. See here for how to get it running.
You can run Refinery tests by running the command below at the root of the Refinery directory.
make test
Refinery uses generated data for licenses and documentation.
The documentation resides in the config/config.meta and config/rules.meta files.
These two files should be edited when information in them needs to change. They provide the base data for generated documentation.
It is not necessary to run the regeneration code licenses or documentation as part of a standard PR for Refinery. They cause a lot of noise and should generally only be run prior to a release.
With the new configuration format redesign in v2.0.0, the workflow for making a configuration requires the following steps:
- Make changes to the YAML tags for a configuration struct.
- Update
config/metadata/configMeta.yamlorconfig/metadata/rulesMeta.yamlto reflect such change. - Run the command below from inside the
./refinery/tools/convert/directory to generate the updatedconfig.md,config_complete.md, andrules.md. These two files are used to generate the official Refinery configuration documentation.make all - The
rules_complete.yamlfile is an example file constructed manually. If there are substantive changes to rules, you should manually updaterules_complete.yaml. - If you add new configurations that expect the environment, they must also be available from the command line. This will only work if you add them within the struct for cmdenv.go.
Please see our general guide for OSS lifecycle and practices.