Hubot with Rocket.chat - node.js

I am trying to integrate Hubot with rocketchat and make Hubot talk with rocketchat.
The sources I am referring to are:
https://hubot.github.com/docs/
https://github.com/RocketChat/hubot-rocketchat
I have installed Nodejs and in Node.js command prompt I did:
mkdir myhubot
cd myhubot
yo hubot
Questions I have:
How do I understand if rocketchat is integrated with Hubot?
If I have not integrated rocketchat, how should I do it? (I did refer to https://github.com/RocketChat/hubot-rocketchat). Here, I want to understand how and where to set environment variables. Also, how exactly do I run Docker here?
When I do docker export ROCKETCHAT_ROOM='https: //spree.chat/channel/'
It returns: "Cowardly refusing to save to a terminal. Use the -o flag or redirect."
How can I resolve this?
Here is the screenshot:

1.) Rocket.chat have "Internal hubot" which is integraded and contain some simplest Hubot scripts. Ideal for testing and introduction to Hubot. You can find these scripts in rocketchat/programs/server/npm/node_modules/meteor/rocketchat_internal-hubot/node_modules/hubot-scripts/src/scripts/.
If you wanna use more complex scripts, you must use external Hubot.
2.) Setup "Environment Variables" are different for each platform. For example, if you want set ROCKETCHAT_ROOM to support, you must use something like env ROCKETCHAT_ROOM=support. But this only applies to Linux OS. For Docker syntax is -e ROCKETCHAT_ROOM=support. If you running external Hubot on Windows, you probably must use something different.
3.) ROCKETCHAT_ROOM variable is not for URL of your channel. You must put here name of your chat room.

Related

Is there a way to create Origen commands for the entire linux install?

I am familiar with how to create application commands from this doc. I wonder if there is a way to configure site-wide commands that would fetch a particular application and change the CWD to the cloned application. Or would this be more in the rake solution space?
thx
I don't think anything really belongs in the rake solution space.
Origen does support the concept of creating a plugin which adds global commands - http://origen-sdk.org/origen/guides/plugins/creating/#Sharing_Global_Commands
The procedure is to create a regular Origen plugin, and then configure it with a global command launcher as in this example - https://github.com/Origen-SDK/origen_sim/blob/master/config/application.rb#L32
Then gem install my_plugin to your global Ruby environment. Then, anywhere in your environment, including outside of application workspaces, you will be able to run origen my_plugin_command.

How can i make an application installed from sourse to be able to work as "enviroment variable" in linux command line

For personal preference reasons , and updating simplicity, i prefer the installation location /opt (when i install from source).
But for example if i install node or ffmpeg to /opt (./configure --prefix=/opt) the commands are not available in command line, but if i wouldn't use the prefix it would.
I should be creating i guess a script but i have no idea to which location and how.
Some more detail: I have installed nginx server in /opt/ , and i have created an executable script in /etc/init.d/ and its working fine, but i have no idea how to do that with node or ffmpeg since as far as i know they are not service but something more like "environment variables".
Any solution appreciated, thanks.

how to run npm/grunt command from jenkins

I'm new to this area and was trying to run the following commands from jenkins:
npm install
grunt quickStart
So far I've a jenkins running on a window machine as a window service and I've also installed NodeJs plugin for jenkins.
However, I'm stuck and quit confused following instructions here, its asking me to to add one or mode nodeJs installation and I could not find those setting and not even sure if I even need them in the first place.
Here is the bit that's asking me to do:
I cannot see this setting for the jenkins job I create. Is there an easy way to run those command in jenkins from a .bat or .sh script, a .bat would be recomended since I'm on window machine.
Note : I've already checked out a project using git in jenkins!!!
Thanks
"its asking me to to add one or mode nodeJs installation and I could not find those setting and not even sure if I even need them in the first place."
I don't think you need that I have pointed jenkins to the node installation folder an nothing more.., for this you go to Manage Jenkins->Configure System->NodeJS->NodeJS installations.. type in any name you like and point to where the node home folder is.
...cannot see this setting for the jenkins job I create...
Once you have configure that in your jenkins configuration you should have that configuration available like so:
...Is there an easy way to run those command in jenkins from a .bat or .sh script, a .bat would be recomended since I'm on window machine
I'm sorry don't get what commands are you referring to...
so summarizing :
you have to tell jenkins where you have your node installation
use that configuration in your jobs
hope this helps...
The way I made it, was trough execute shell, as the build tool for nodejs is npm, I simply wrote a shell script that instructs jenkins to run npm install in the workspace directory inside jenkins where it clones the git repository and then to zip and move the package if successful to another folder.

Running Azure node.js Tools on Ubuntu

I have followed these instructions.
And as far as I can tell I have successfully installed node.js azure tools. No error - nothing to suggest it failed.
However, I cannot, and the documentation says, simple run "azure"...
Maybe there is something I am missing with node.js?
There are a few problems you may be experiencing.
First of all, I would ensure you are running Node.js v0.6.20. You can do this by opening the command prompt and running:
node -v
You should have v0.6.20 echoed back.
If this doesn't work, you may be missing a path variable to Node.js or the NPM cache. Verify the Environment variables exist by running [in the command prompt]:
path
you should see two paths:
%appdata%\npm
[x64 Machine]
%programfiles(x86)%\nodejs\
[x86 Machine]
%programfiles%\nodejs\
If this doesn't work, I would check to ensure that the azure module was loaded into the %appdata%\npm\node_modules directory.
It could be the PATH issue. In my case, the azure program is located at ~/.npm-global/bin.
run "export PATH=$PATH:~/.npm-global/bin". Or just add to bash source file

Setting up VCAP (cloudfoundry) without a script

I would like to setup VCAP without a script on my linux box (mostly for learning, but also for controlling which packages get installed). I want to do it for a production like system (so it's not my own linux box, but a server that I use for demo purposes)
I am using Ubuntu 10.04 and I have rvm 1.10 installed). I already asked this question on cloudfoundry support (http://support.cloudfoundry.com/entries/21004021-single-node-vcap-setup-without-a-script-chef-etc)
Really apprecaite your input
Looks like your post on the CF forums was updated. As mentioned there, documentation for self-install doesn't exist. Your best bet is to use the existing install scripts, read through what they're doing, and perform the process manually.
The original install script: https://raw.github.com/cloudfoundry/vcap/master/setup/install
The new Chef-based install script, which will replace the original script: https://github.com/cloudfoundry/vcap/blob/master/dev_setup/bin/vcap_dev_setup

Resources