Skip to content

A Slackbot which runs Docker images and commands via a /docker

License

Notifications You must be signed in to change notification settings

adjohn/dockerbot-serverless

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker-Slackbot - a serverless Docker slackbot

Gitter

Easily run Docker from Slack with a /docker command!

Usage:

/docker busybox uname -a

Developed as a demo & example for the IOpipe library, which simplifies the development, sharing, and lifecycle-management of functional, cross-cloud serverless apps.


Installation

  1. Add the following Docker API authentication files into functions/dockercmd/cfg/: ca.pem, cert.pem, key.pem.

    For convenience, we recommend using docker-machine or Rackspace Carina to create these keys. Rackspace Carina is a beta service offering free, out-of-box Docker Swarm clusters with a downloadable zip file containing these keys.

  2. Run npm install in the directory functions/dockercmd/.

  3. Edit project.json to specify your AWS Lambda Execution role ARN.

  4. Run apex deploy or manually deploy on AWS Lambda. (Download Apex)

  5. Access the portal for Amazon's API Gateway service and click Create API.

  6. Click "Import from Swagger", then "Select Swagger File". Choose the swagger.json file at the root of this repository and click Import.

  7. Click Actions -> Deploy API and choose Deployment Stage, "[New Stage]" and specify a stage name (i.e. "prod").

  8. From the Stage Editor copy the "Invoke URL" from the top of the page.

  9. Navigate to Slack's Custom Integrations page.

  10. Click Slack Commands.

  11. Click Add Configuration.

  12. Under, "Choose a Command", specify the slash-command you would like to trigger this plugin. We recommend /docker or /docker-run.

  13. Paste the "Invoke URL" from AWS API Gateway into Slack's URL field.

  14. Specify Method, GET.

  15. Click Save Integration.


License

Apache 2.0; Copyright 2016, IOpipe, Inc.

About

A Slackbot which runs Docker images and commands via a /docker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • JavaScript 100.0%