2020-10-06 13:14:57 +00:00
# TORch Agent Example
The example creates a Vagrant machine configured with TORch Agent
2020-10-06 13:16:27 +00:00
## Running the Example
2020-10-06 13:14:57 +00:00
2020-10-06 13:16:27 +00:00
#### Install dependencies
2020-10-06 13:14:57 +00:00
2020-10-06 13:32:02 +00:00
* [Install Docker ](https://docs.docker.com/engine/install/ubuntu/ )
* Install `mosquitto_sub`
2020-10-06 13:14:57 +00:00
* `apt install mosquitto-clients`
2020-10-06 13:16:27 +00:00
#### Run the Broker
2020-10-06 13:14:57 +00:00
Add the following line to your `/etc/hosts` file:
```
127.0.0.1 mqtt.example.com
```
Run the broker in a terminal window:
```bash
./run-broker.sh
```
2020-10-06 13:16:27 +00:00
#### Run the Subscriber
2020-10-06 13:14:57 +00:00
In a separate terminal window, run the subscriber:
```bash
./run-subscriber.sh
```
2020-10-06 13:16:27 +00:00
#### Run TORch Agent in Vagrant
2020-10-06 13:14:57 +00:00
Run the Vagrant box in a third terminal window:
```bash
vagrant up
```
2020-10-20 10:26:26 +00:00
You should see that the broker received a connection from the Vagrant box at boot up and the subscriber received the onion hostname. You can use a local `tor` proxy to connect to the vagrant box using SSH and the onion hostname.