Skip to content

Latest commit

 

History

History
51 lines (45 loc) · 3.25 KB

README.md

File metadata and controls

51 lines (45 loc) · 3.25 KB

Garnet cache as a Windows service

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.

Getting started

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.

Solution structure

CacheService

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.

CacheService.TestClient

A test project for working with/verifying local instance of the Garnet server. This project uses NUnit testing framework.

CacheService.UnitTests

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.

Deployment

Currently, there is only a manual option for deployment. The deployment process consists of the following steps:

  1. Create a release of the cache service. The command can be found here release script.
  2. (Optional) Zip all the release files.
  3. Upload files to a target environment/machine.
  4. 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.

Configuration

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

Configuration options

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)

Azure Key Vault integration

TODO