Denis is a Slack bot. He can respond to commands and manage DNS zones, capable of things like adding A or CNAME records.
It was created as the solution to a development team having to keep track of numerous IP addresses for development APIs and servers, so we wanted a way to quickly point subdomains at them. It's still very basic at the moment, but Denis is a good kid and is eager to learn new tricks from your pull requests.
-
npm install denis-bot
-
Create a Bot integration in Slack
-
Copy the Slack token and add it to
config/config.json
underslack.apiKey
, or pass it asSLACK_API_TOKEN
environment variable -
Configure your provider in
config/config.json
-
Launch Denis with
npm start
-
Done. Be cool with Denis!
Denis reponds to commands that begin with a mention to his username. In the examples we'll use denis
as his username, but it'll work with whatever username you set for your bot. He currently knows only two things:
Command:
@denis: what is my-site.domain.com?
Response:
I can tell you that my-site.domain.com is a A record pointing to 1.2.3.4.
Command:
@denis: redirect my-new-site.domain.com to 2.3.4.5
Response:
:tada: Done! I've created a A record pointing my-new-site.domain.com to 2.3.4.5.
It detects whether the value you're pointing to is an IP address or another domain, and based on that creates either an A or a CNAME record respectively.
Denis was built to support multiple DNS providers. Currently, only CloudFlare is supported, but you can add your own provider by creating a class for it under providers/
— if you do, please make sure you contribute back and send a PR!
© 2016 Eduardo Bouças. Logo by Erik Kuroow.