Code Monkey home page Code Monkey logo

sns2hipchat's Introduction

(AWS) sns2hipchat Build Status

Simple AWS/SNS HTTP{S} endpoint relay to HipChat

Deploy

Usage

go get -v github.com/jmervine/sns2hipchat
$ sns2hipchat --help

Setting up SNS subscript

  1. Create SNS Topic (via AWS console)
  2. Subscribe SNS Topic to your endpoint (via AWS console)
    1. Select topic
    2. Choose "Subscribe to topic"
    3. Choose "Protocol" (http or https accordingly)
    4. Enter endpoint url, e.g.:
      • http://mysnsendpoint.herokuapp.com/
      • Or with rooms: http://mysnsendpoint.herokuapp.com/?room=1&room=2
  3. Confirm subscription:
    1. Select topic (in AWS Console)
    2. Choose "Request Confirmation"
    3. Choose "Confirm Subscription"
    4. View logs for confirmation url (in terminal), e.g.:
      • heroku logs -a mysnsendpoint | grep "SubscribeURL detected:"
    5. Paste in subscription url from logs

Heroku Deployment

"Deploy to Heroku" button on the top of this README file is recommended way to set up this app to Heroku.

heroku create

If you're not familiar with using Go on Heroku, see Getting Started with Go on Heroku

Configuration

To make this app up and work properly, you need to setup the following environment variables:

See --help or app.json for details.

Required

heroku config:add HIPCHAT_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# The API auth token for your HipChat account

Optional (defaults listed)

heroku config:add HIPCHAT_ROOMs=<ROOMID>,<ROOMID>
# The default HipChat room(s) to send messages to

heroku config:add HIPCHAT_FROM="Amazon SNS"
# The HipChat sender messages come from
# - v1 only, v2 will show the key owner

heroku config:add HIPCHAT_FORMAT=html
# The HipChat message format

heroku config:add HIPCHAT_NOTIFY=true
# Tell HipChat to notify people on sending messages

heroku config:add HIPCHAT_COLOR=yellow
# The HipChat message color

heroku config:add HIPCHAT_HOST=api.hipchat.com
# The HipChat target host

heroku config:add HIPCHAT_API_VERSION=1
# The HipChat API Version

heroku config:add DEBUG=false
# Verbose logging for debugging SNS and hipchat errors

Development

Testing with Docker

$ go get -v github.com/jmervine/dockme

# running units
$ dockme go test ./...

# running in test mode
$ dockme

# then hit http://localhost:3000/test

sns2hipchat's People

Contributors

jmervine avatar

Stargazers

Jonathan Le avatar

Watchers

James Cloos avatar  avatar

sns2hipchat's Issues

Support multiple rooms...

Support more than one room:

  • perhaps specifiying a room from the sns message
  • perhaps mapping messages to room
  • perhaps via /:room_id like I've seen elsewhere

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.