> For the complete documentation index, see [llms.txt](https://docs.fractalworks.io/joule/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fractalworks.io/joule/use-case-examples/running-examples.md).

# Running examples

***

## Getting the examples running locally <a href="#start-quote-generator" id="start-quote-generator"></a>

Once the infrastructure is running it's time to start running the use case. All the configurations have been provided so its simply the task of updating a single `app.env` file under the `conf` directory.  The initial use cases have been pre-configured and ready to run. All you will need to do is the following

* Start Joule processor/s
* Start event simulator

***

## Single Joule Processor

This method will fire up a single Joule processing unit using the base start and stop scripts.

### Start Joule

Start up the Joule process. Joule will use the `conf/app.env` configuration as its executing use case.

```bash
./bin/startJoule.sh
```

### Start Quote generator <a href="#start-quote-generator" id="start-quote-generator"></a>

By starting the quote simulator events will be published to Kafka ready for Joule to consume and process

```bash
./bin/startQuotePublisher.sh
```

### Shutting down processes

To stop the running processes just execute the below under the directory of which you started the processes

```bash
/bin/stopQuotePublisher.sh
/bin/stopJoule.sh
```

### Clean up environment

Once you have run the example and viewed the results you can cleanup the environment by running the below script.

```bash
./bin/cleanup.sh
```

***

## Joule Cluster

This method will fire up a set of Joule processing units using the base scripts along with wrapper scripts to generate, start and stop joule processes. Note this is a very loose definition of a cluster , its simply a set of processes executing within a local environment without all the frills of cluster management and tooling.&#x20;

### Setup Cluster

Create a set of joule process directories ready for futher configurations.

```bash
./bin/setupJouleCluster.sh -j 3
```

#### Notes

If you have enabled the rest api the port will need to be incremented for each process in the `joule.properties` file.

```
joule.rest.port=7070
```

### Start Cluster

This is sequentially start each process within there own local directory. Logging and data will be generated locally to the process directory.

```bash
./bin/startJouleCluster.sh
```

### Stop Cluster

This is sequentially stop each process within there own local directory.&#x20;

```bash
./bin/stopJouleCluster.sh
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.fractalworks.io/joule/use-case-examples/running-examples.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
