Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Master Bot

Panel
borderColor#7BD9F5
borderWidth2
borderStylesolid

Introduction:

As we proceed with hubots coupled with tools to make our tasks easier in the form of conversations, we realised that there is a need of a framework which should manage other bots. Therefore, conversing with Master Bot will assist you to manage all your other bots.

Master Bot deployment:

Panel

Below are the Bots Available in the BotStore page

Fancy Bullets
id1
typelower-latin

Jenkins

BuildOn

GitHub

GitLab

Jira

UDeploy

Nexus

URelease

Sonar

PCF

Scalr

XLDeploy

Rundeck

XLRelease

InSight

NPM

  • Jenkins
  • BuildOn
  • GitHub
  • GitLab
  • Jira
  • UDeploy
  • Nexus
  • URelease
  • Sonar
  • PCF
  • Scalr
  • XLDeploy
  • Rundeck
  • XLRelease
  • InSight
  • NPM
    1. Install hubot into your server (Refer here)
    2. Pull your desired scripts-<adapter> folder from our github repository
    3. Copy the content of scripts-<adapter> into your <newly_installed_hubot_folder>/scripts
    4. Set the following environment variables:

                 ONBOTS_URL: The url where OnBots services are running

                 AUTH_TOKEN: Personal access token of your adapter(must permissions to get uploaded file content from the adapter)

                 (for genearating this token in slack Click here, for mattermost Click here, for Hipchat Click here)

                 HUBOT_SLACK_TOKEN: To add new app/bot to slack workspace. (for generating this token in slack, Go to https://api.slack.com/apps --> Create New App --> Give app name and Choose Workspace --> "Install your app to your workspace" : use proper permissions(oAuth) and register your apps. you will get token starts with "xoxb-" )

          5.  Install the desired npm-module for your adapter. Master can work with Slack, Hipchat or Mattemost. Execute the following command inside your bot folder:

                npm install hubot-<adapter> (where <adapter> can be slack, hipchat or mattermost. Refer this page to to learn more about how to connect your bot to a chat application.)

              You are all set now. Execute the following to start the bot with your chat adapter:

                ./bin/hubot -a <adapter>

    How it works:

    1)You will need the OnBots services running in Kubernetes master server.

    Warning

    OnBots services needs to interact with the Kubernetes Environment for fetching bots related data and performing management activities. Kubernetes will block the OnBots services from accessing it, if it is deployed in different servers even if ports are allowed in firewall.

    2) Connect it to adapters like Slack, Hipchat or Mattermost

    3) Now you can interact with the bot through commands

    Below are the commands supported by Master Bot:

    CommandsDescription
    getDeployedBotsget list of all deployed bots
    getBotsget bot types available in onBots
    getConfig Template <botname>get Json template for adding a particular type of bot
    addBot <json_fileid>adds a bot with the given configuration in Json file
    getBotDetails <botname>get configuration and other details for a bot
    getLogs <botname>get deployment logs of the given bot
    getChatlog <botname>get chat logs of the given bot
    stop <botname>stop an active bot if it is running

    restart <botname>

    restart the bot with the details stored in mongodb
    getHitmiss <botname>get hit-miss ratio of conversations of the given bot
    getMetrics <botname>get system metrices for the given bot
    editbot <botname> <json_fileid>edit the bot configuration details in mongodb from the given json file
    tail <number_of_lines> <botname>To get last <number_of_lines> of the logs of <botname>
    delete <botname>delete the bot
    container status <botname>give the container status in which the bot is deployed
    helplist all the commands the master can perform


    Image Added → Actions available by default

    Image Added → Actions enriched by OneDevOps | OnBot

    Bots which can be deployed using the Master Bot:

    Panel
    borderColor#7BD9F5
    borderStyledashed

    Below are the Bots Available in OnBots. Click on specific botnames to know more:


    Tip

    Every Bot has default Help command, which will explain users about what the bot can actually do by giving list of Commands and Actions. In case Bot does not understand user commands then bot can guide users with default replies.