# Local Test Deployment

The fastest way to validate runner logic and end-to-end flows is to run a local, Spring-based event runner. You can then exercise your sagas and endpoints through the runner’s REST API. Follow the tasks below to get a local run working.

## Prepare the Test Environment

* [ ] Install a Java runtime (and/or JDK) compatible with your build setup: [Java](https://www.java.com)
* [ ] Install [Gradle](https://gradle.org/) and confirm it is available on your PATH
* [ ] Clone (or download) the [Sandbox repository](https://github.com/rierino-open/sandbox) (requires the credentials included with your Rierino license)
* [ ] Connect to your VPN if your backing services (e.g. MongoDB) are only reachable from an internal network

## Enter Required Parameters

* [ ] Change into one of the local execution folders: `local/runner/spring`, `local/runner/samza`, or `local/controller`
* [ ] Update `gradle.properties` (or set equivalent environment variables)
  * [ ] Set Maven credentials (they match your Rierino repository access credentials)
  * [ ] Set the Rierino version if you are testing against a specific release
* [ ] Update `application.properties`
  * [ ] Add/remove/adjust runner elements at the end of the file using the runner IDs and types you want to test (the default `runner-admin_rpc-0001` and `runner-admin_crud-0001` entries are core admin runners)
  * [ ] Change `server.port` if you want to avoid port conflicts
* [ ] Update `values.properties`
  * [ ] Set `rierino.system.mongodb.devops_main.uri` to your MongoDB URI (example: `mongodb://host:port`). If you are not using MongoDB, contact Rierino for alternative configuration loading options.
  * [ ] Add any non-secret properties referenced as `${{...}}` in your elements
* [ ] Update `secret.properties`
  * [ ] Add any secret properties referenced as `#{{...}}` in your elements

## Run Application

* [ ] Run the Gradle command in `run.sh` (make sure `gradle` is on your PATH)
* [ ] Validate the runner is reachable
  * [ ] Health check example: `http://localhost:1235/actuator/health`
  * [ ] Test saga flow example: `http://localhost:1235/api/rpc/Hello`

Once it is running, you can call any endpoints exposed by the runners you enabled from your local test environment.
