symphonyoss / vote-bot

Apache License 2.0
5 stars 5 forks source link

Vote Bot Prod Log Watcher Vote Bot Dev Log Watcher

The bot provides vote capabilities on proposals amongst a defined list of users over a relay chat.

Build

Type mvn package.

When the build completes, the ZIP file containing all bot logic can be found at vote-bot-service/target/vote-bot-service-0.9.1-SNAPSHOT-appassembler.zip.

Openshift

In order to run these commands you need to have access to the Openshift YAML definitions, which are managed by Foundation Staff.

Deploy to Openshift

. ./env-dev.sh
curl -s https://raw.githubusercontent.com/symphonyoss/contrib-toolbox/master/scripts/oc-deploy.sh | bash

Make sure the following vars are included in env-dev.sh.

export OC_TOKEN=<your oc token>
export OC_PROJECT=botfarm
export OC_BINARY_FOLDER="vote-bot-service/target/oc"
# Choose between votebot-dev or votebot-prod
export OC_BUILD_CONFIG_NAME="votebot-dev"
export OC_ENDPOINT="https://api.pro-us-east-1.openshift.com"
export OC_PROJECT_NAME="ssf-dev"
export ESCO_USER_VOTE=""
export ESCO_USER_LIST=""
export OC_TEMPLATE_PROCESS_ARGS="-p ESCO_USER_LIST=$ESCO_USER_LIST -p ESCO_USER_VOTE=$ESCO_USER_VOTE"

When configuring the environment variables via Travis CI settings, make sure to escape ' ', '(' and ')' chars, adding a '\' before.

Reset Openshift environment

To delete all existing Openshift resources, simply invoke oc delete all -l app=votebot-dev (secrets, which are managed by Foundation staff, will not be removed)

PROPOSAL

To create a bot that can support generic voting capabilities over the Symphony network. The initial contribution is built to specifically support proposals over a relay chat, but it can be expanded to support wide variety of voting types.

The current contributed feature set of the solution includes:

Future work:

RATIONALE

Voting concepts are common in many social engagements. Having a solution that can manage and record voting events is applicable to wide variety of use cases on a social network.

CORE DEVELOPERS

Owner: Frank Tarsillo and Friends