torch-agent/example/README.md

53 lines
1.1 KiB
Markdown
Executable File

# TORch Agent Example
The example creates a Vagrant machine configured with TORch Agent
## Running the Example
#### Install dependencies
* [Install Docker](https://docs.docker.com/engine/install/ubuntu/)
* Install `mosquitto_sub`
* `apt install mosquitto-clients`
#### Run the Broker
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
```
#### Run the Subscriber
In a separate terminal window, run the subscriber:
```bash
./run-subscriber.sh
```
#### Run TORch Agent in Vagrant
[Build](..) the latest source into a Debian package and copy it to `example/`
```bash
cd ..
./make-pkg.sh john@doe.com
cp -f build/torch-agent_0.0.4-1_all.deb example/
cd example
```
Run the Vagrant box in a third terminal window:
```bash
vagrant up
```
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.