Rocket.chat: Integrate with Cog

Created on 13 Sep 2016  路  13Comments  路  Source: RocketChat/Rocket.Chat

Cog by Operable is a new chat bot written by the author of Hubot.

It is better than alternatives like Hubot or Lita because it allows for various permission levels for users and scripts, something that every significant organization will need. https://blog.operable.io/introducing-cog-8a682e42a25a#.snxcg4t85

"First, we wanted to remove some of the concerns that kept teams from adopting ChatOps. We often heard that companies were uncomfortable with the security ramifications of ChatOps, so we built a fine grained access control mechanism to let you automate even mission critical workflows in chat, with complete control over who can run them and exactly what arguments they can pass to them. We added an audit logging facility so that you can keep track of all the actions that are performed on Cog, and who performed them."

As an additional feature it also allows you to compose commands: "So we built that for ChatOps and allow you to build command pipelines that combine tools to solve complex problems that are not reasonable to handle in a single command."

Cog runs in docker containers. One to coordinate and then one container per script.

integration / plugin Bots

Most helpful comment

Just as an heads up, I haven't forgotten about this, but I plan to do this implementation as part of my daily job, so I'm waiting for a good time slot yet.

All 13 comments

+1

@engelgabriel Any progress on that? Having Cog would be a huge benefit for my team.

Just to get a feeling for the estimated effort, what tasks to we need to accomplish to integrate Cog with Rocket.Chat? What had to be done with Huebot before to integrate it?

@kiview ... here is a rough workflow - it has nothing to do with existing hubot, unfortunately (or fortunately - no baggage).

  1. First, we need the assistance of one or more Elixir / Erlang coding guru.

  2. Then:

Follow this issue:

https://github.com/operable/cog/issues/875

And this one:

https://github.com/operable/cog/issues/925

We need the implementation of the following interfaces in Elixir:

Cog.Chat.RocketChat.Connector
Cog.Chat.RocketChat.Provider
(perhaps also for Room, User, Message)

And then a tested PR created for https://github.com/operable/cog project, placing the code there in a rocketchat directory:

https://github.com/operable/cog/tree/master/lib/cog/chat

There might be other hookups required, but if a tested PR hits the repo - the operable team will likely assist in the remaining effort.

  1. In the implementation of the adapter interfaces in (2), open a secured websocket connection to the Rocket.Chat server and use our RealTime API:

https://rocket.chat/docs/developer-guides/realtime-api

Thanks a lot for this detailed explanation.
There is already an issue over at Cog as well: https://github.com/operable/cog/issues/1059

I've talked with the Cog developers in their Slack channel yesterday and they told me as well to start with those modules:
The Adapter:
https://github.com/operable/cog/blob/master/lib/cog/chat/adapter.ex

As well as the renderer:
https://github.com/operable/greenbar/blob/master/lib/greenbar/renderers/slack.ex

It seem's we might be ablet to use a lot of the existing slack renderer, since the Rocket.Chat syntax is quite similar in a lot of aspects I think?

The Cog team also said they are willing once we run into problems implementing this.

I have next to none experience with Elixir but I know some Haskell and the concepts seem quite similar in a lot of areas. Maybe I'll be able to provide at least a starting point for further development

@kiview Good job! && Looking forward to seeing that :)

+1

Just as an heads up, I haven't forgotten about this, but I plan to do this implementation as part of my daily job, so I'm waiting for a good time slot yet.

@kiview Awesome, if you need assistance with any of the APIs (ddp and rest) then hit me up on the demo server.

@kiview Any demo able progress so far :)?

Keep us posted, theres a small conversation going about it on their end as well - https://github.com/operable/cog/issues/1059

Might be worth trying to co-ordinate something with them as everyone on both sides seems keen to get this going

Hey @diegodorgam or @JSzaszvari - do you know if this would still be worth doing? I looked for the Cog docs and it's all 404s now. The repo has a bit of activity though. Happy to put it on the roadmap if there's still an appetite.

@timkinnane whilst cog is a awesome idea the project has had minimal updates and seems well on its way too being abandoned unfortunately. I would say this can probably be closed off as it's not worth someone's time due to the slowdown of cogs development over the past year

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Buzzele picture Buzzele  路  3Comments

mddvul22 picture mddvul22  路  3Comments

djeber picture djeber  路  3Comments

lunitic picture lunitic  路  3Comments

amayer5125 picture amayer5125  路  3Comments