Git Product home page Git Product logo

ecs-slack-notifications's Introduction

Switch to Yoki API

I created Yoki a supplementary ECS API. It utilizes the same idea as ecs-slack-notifications but it also provides much better functionality and notifications. Please consider using Yoki going forward. Thanks.

ecs-slack-notifications (DEPRECIATED)

No further development will be done on this app. See note above.

Based on the AWS example for handling ECS events https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_cwet_handling.html

Installation

  1. Requires changes from serverless/serverless#4694. Install serverless 1.27.0 or higher.
npm install -g serverless@^1.27.0
  1. Install python requirements serverless plugin in the app directory.
npm install serverless-python-requirements
npm install serverless-dynamodb-autoscaling
  1. Create a Slack application and copy the token. The app needs the following permission scopes:
  • chat:write

OR:

  • channels:read
  • chat:write:bot
  1. Create .env.yml in the app directory
$ cat .env.yml
lambda:
  environment:
    SLACK_API_TOKEN: "xoxa-11111111111-1111111111111-1111111111111-abcd3abcd3abcd3abcd3abcd3abcd3123"
    SLACK_VERIFICATION_TOKEN: "asdf1234asdf"
    SLACK_CHANNEL: "ecs-notifications"
    INCLUDED_CLUSTERS: "all"  # notifications for all clusters
    SERVICE_GROUPS_TABLE: "ecs-slack-ServiceGroups"
  1. Install the app on aws
sls deploy
  1. Create Slack Deploy Slash Command (optional) Create a slash command /ecs-deploy in the Slack app. Set the Request URL to the API Gateway created by serverless.
  • Go to API Gateway and select dev-ecs-slack
  • Under stages get the Invoke URL from POST method under /deploy
  1. Configure service groups (optional) Create items in dynamodb table ecs-slack-ServiceGroups to configure service groups. Example:
{
  "group": "myapp",
  "services": [
    "myapp",
    "myapp-worker-1",
    "myapp-worker-2"
  ]
}

Then to trigger a deployment in slack run: /ecs-deploy <cluster_name> myapp <reference> -g

ecs-slack-notifications's People

Contributors

boroivanov avatar fractos avatar rt-alex avatar

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.