Skip to content

researchstudio-sat/won-debugbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Debug Bot docker

This bot can be used to test if connections can be established with the atoms you are creating and if messages can be sent via those connections. For each atom created by you, the Bot will generate a connection request and a random socket hint message. Additionally, some actions can be triggered by sending text messages on those connections. Check supported actions for more information.

The Debug Bot is a Spring Boot Application.

Running the bot

Prerequisites

  • Java 8 JDK or higher installed (openJDK 12 is currently not supported and won't work)
  • Maven framework set up

On the command line

cd won-debugbot
export WON_NODE_URI="https://hackathonnode.matchat.org/won"
mvn clean package
java -jar target/bot.jar

In Intellij Idea

  1. Create a run configuration for the class won.bot.skeleton.EchoBotApp
  2. Add the environment variables
  • WON_NODE_URI pointing to your node uri (e.g. https://hackathonnode.matchat.org/won without quotes)

to your run configuration.

  1. Run your configuration

If you get a message indicating your keysize is restricted on startup (JCE unlimited strength encryption policy is not enabled, WoN applications will not work. Please consult the setup guide.), refer to Enabling Unlimited Strength Jurisdiction Policy to increase the allowed key size.

In Docker

  • with Dockerfile docker command to run or build idk yadayadayada
  • from Docker Hub docker pull blablabla

Now create an debug-atom to see the bot in action. to create a debug atom you have to click "Turn on Debugmode" in the Footer

EXTRACTED FROM won-bot README.md Changes pending

Make sure this location contains the relevant property files, and you have specified the values of the properties relevant for the system being tested, i.e.:

  • in node-uri-source.properties
    • won.node.uris - specify values of nodes being tested - the bot will react to atoms published on those nodes
  • in owner.properties
    • specify default node data (node.default.host/scheme/port) - the bot will create its own atoms on that node
    • make sure both a path to keystore and truststore (keystore/truststore.location) and their password (keystore/truststore.password) is specified. For additional details on the necessary keys and certificates, refer to the Web of Needs installation notes.

NOTE: Use a separate keystore (and key pair) for your bot, especially if you are running another owner application locally - this will result in the node not delivering messages correctly because the queues used for delivery are defined based on certificates. If multiple applications from the same source share a certificate, there will be errors.

NOTE: For the same reason as above, do not run several bot applications at the same time, - stop one before running another or separate their configurations.

NOTE: Keystore and truststore paths have to be specified, but the files themselves do not have to exist initially, they will be created automatically. If you registered to a node using a different certificate before, the keystore and truststore need to be deleted to be able to register correctly again.

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •