-
Notifications
You must be signed in to change notification settings - Fork 2
Getting Started for Developers
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.
-
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
-
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
-
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 iscampfire
)
-
-
From the hpe-oneview-hubot install project dependencies
cd ../hpe-oneview-hubot/
npm install
-
Now copy the hpe-oneview-hubot/oneview-configuration.json into the directory where Hubot was installed
cp oneview-configuration.json ../hubot/
-
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) -
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) -
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
-
Test your bot...
@hubot list all server hardware
If you get a large JSON back, congratulations!