Getting Started for Developers - HewlettPackard/hpe-oneview-hubot GitHub Wiki

NOTES for Windows (Cygwin) installs:

  • Remove 'sudo' from any of the commands, or first run alias sudo=""
  • Start Cygwin as Administrator by right-clicking the icon and selecting Run as administrator...

To get started with this project clone this repo, install node.js and npm and install Hubot.

  1. Clone this repo

    cd $HOME

    cd $USERPROFILE (This is for Windows, but if you're on Linux this will be a no-op, so running both cd commands in this order should work for any OS)

    mkdir git (If not already created)

    cd git

    git clone https://github.com/HewlettPackard/hpe-oneview-hubot.git

    cd hpe-oneview-hubot

  2. Install node.js v7.x and npm v3.10.8: https://docs.npmjs.com/getting-started/installing-node

    For Windows, install node.js

    For Linux:

    curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -

    sudo apt-get install -y nodejs

    If you run into issues with unmet dependencies:

    sudo apt-get install aptitude

    sudo aptitude install -y nodejs

  3. Install Hubot: https://hubot.github.com/docs/. This should be installed in a separate directory from where the oneview-hubot source code was cloned

    sudo npm install -g yo generator-hubot

    mkdir hubot

    cd hubot

    yo hubot

    • Owner: Your email address

    • Bot name: my-bot # but use your own name

    • Description: (default is fine)

    • Bot adapter: slack (default is campfire)

  4. From the hpe-oneview-hubot install project dependencies

    cd ../hpe-oneview-hubot/

    npm install

  5. Now copy the hpe-oneview-hubot/oneview-configuration.json into the directory where Hubot was installed

    cp oneview-configuration.json ../hubot/

  6. Modify the copied oneview-configuration.json to point to your HPE OneView instance

    cd ../hubot/

    vi oneview-configuration.json (Change the applianceIp(s) to point to your HPE OneView instance(s), change the chatRoom value to either the Slack channel or Flowdock/HipChat room you want the bot to participate in)

  7. From the hpe-oneview-hubot directory run gulp watch

    cd ../hpe-oneview-hubot

    gulp watch (If this doesn't work on Cygwin, try restarting the terminal first)

  8. Now from the hubot directory install the project's dependencies

    cd ../hubot/

    npm install ../hpe-oneview-hubot/

    Start hubot bin/hubot

    Hubot should be running now with the HPE OneView script

  9. Test your bot...

    @hubot list all server hardware

    If you get a large JSON back, congratulations!