A repository containing an implementation of a windows service containing Garnet server.
Goal of this project is to create a replacement of Redis for other projects. This is also a reason as to why there is an integration with Azure Key Vault.
To get started with this service you will need .NET 8 SDK installed. To verify/work with a secret/key vault, you will need a local instance or a running instance of the Azure Key Vault service.
The main project of the solution. This project is has worker application model. Garnet cache is running as part of GarnetService. In this project there is also logic related to environment and configuration handling.
A test project for working with/verifying local instance of the Garnet server. This project uses NUnit testing framework.
A F# test project containing service's unit tests. This project uses NUnit testing framework and NSubstitute library for mocking. Also, this project/library is marked as a friend assembly by CacheService project, so CacheService.UnitTests is able to see its internal types.
Currently, there is only a manual option for deployment. The deployment process consists of the following steps:
- Create a release of the cache service. The command can be found here release script.
- (Optional) Zip all the release files.
- Upload files to a target environment/machine.
- Run install script that is included in the release.
Note: to install the service, you can use the uninstall script or just remove it through sc.exe utility or GUI in Windows.
This service currently supports configuration of things like host address, port or password (only for dev environment). Also, there is the integration with Azure Key Vault service.
Configuration sources:
- JSON files (appsettings.json)
- Command-line arguments
Option | Description |
---|---|
Environment | Certain parts of the service work only in specific environments (like password configuration). It is possible to override this option through a supported configuration source. |
Host address | By default, host address is 0.0.0.0. |
Port | Default port is the same as a default port for Redis which is 6379. |
Password (in dev) | |
Password (outside of dev) |
TODO