All Projects → jc1518 → Huggies

jc1518 / Huggies

Licence: Apache-2.0 license
Huggies is a plug and play automation tool for AWS Elastic Beanstalk

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to Huggies

Generator Hubot
Hubot generator for Yeoman
Stars: ✭ 150 (+1053.85%)
Mutual labels:  hubot
ansible-hubot
💬 Ansible role for Hubot
Stars: ✭ 63 (+384.62%)
Mutual labels:  hubot
docker-lemp
A single container LEMP complete fullstack with latest release of PHP7.4.33, 8.0.26 & 8.1.13/8.2RC and MySQL, nginx, PostgreSQL, phalcon, swoole, mailcatcher, beanstalkd, elasticsearch, memcached, redis, adminer and all you ever need; on top alpine3.15
Stars: ✭ 106 (+715.38%)
Mutual labels:  beanstalkd
Hubot Matteruser
Hubot adapter for Mattermost using Web API and Websockets
Stars: ✭ 175 (+1246.15%)
Mutual labels:  hubot
Sactive Bot
😈 An extensible chat bot framework. sactive-bot is an evolution of the open source hubot project. - https://www.shipengqi.top/sactive-bot .
Stars: ✭ 212 (+1530.77%)
Mutual labels:  hubot
beanstalk
Asynchronous Beanstalk Client for PHP.
Stars: ✭ 62 (+376.92%)
Mutual labels:  beanstalkd
Hubot Natural
Natural Language Processing Chatbot for RocketChat
Stars: ✭ 136 (+946.15%)
Mutual labels:  hubot
lua-resty-beanstalkd
non-blocking beanstalkd client lib for ngx_lua
Stars: ✭ 58 (+346.15%)
Mutual labels:  beanstalkd
beanstalkd-cli
A simple cli interface for managing beanstalkd queues.
Stars: ✭ 28 (+115.38%)
Mutual labels:  beanstalkd
orange
基于beanstalkd实现多进程处理消息队列的框架
Stars: ✭ 19 (+46.15%)
Mutual labels:  beanstalkd
Pull Review
✅ Assign pull request reviewers intelligently.
Stars: ✭ 179 (+1276.92%)
Mutual labels:  hubot
Hubot Slack
Slack Developer Kit for Hubot
Stars: ✭ 2,260 (+17284.62%)
Mutual labels:  hubot
hubot-analytics
📈 A hubot script to get google analytics reports
Stars: ✭ 16 (+23.08%)
Mutual labels:  hubot
Hubot Telegram
Hubot adapter for Telegram
Stars: ✭ 152 (+1069.23%)
Mutual labels:  hubot
gubot
A hubot like bot written in golang which is langage agnostic and cloud agnostic
Stars: ✭ 29 (+123.08%)
Mutual labels:  hubot
Hubot Grafana
📈🤖 Query Grafana dashboards
Stars: ✭ 141 (+984.62%)
Mutual labels:  hubot
hubot-github-repo-event-notifier
Notifies about any GitHub repo event available via webhook.
Stars: ✭ 58 (+346.15%)
Mutual labels:  hubot
hubot-seen
A hubot script that tracks when/where users were last seen.
Stars: ✭ 25 (+92.31%)
Mutual labels:  hubot
evolution
proposals for changes and user-visible enhancements to Hubot
Stars: ✭ 42 (+223.08%)
Mutual labels:  hubot
hubot-schedule
A hubot script to schedule a message in both cron-style and datetime-based format pattern
Stars: ✭ 46 (+253.85%)
Mutual labels:  hubot

Huggies

Overview

Huggies is a side project that I started when working for the NAPI team which pronounced as ['næpɪ], and that is why I named it as Huggies ;)

The team's environments are mostly on AWS Elastic Beanstalk. In general, Elastic Beanstalk is a good tool as it abstracts the complexicity of managing Elastic Load Balancer, Autoscaling group, Route 53 etc. It allows developers to focus on the codes, instead of worrying much about the running environments. But there were still a few pain points that I observed the team was sufferring:

  • Hard to start or stop environments
  • Hard to manage the environments scheduled scaling
  • Elastic Beanstalk does not support spot instance

Huggies is built on Hubot framework, it is a plug and play tool which solves the above the pain points.

Watch the two video demo if you are interested:

Design

huggies

Features

  • Support both Slack and RESTful API
  • Role based user management
  • Start/stop single Elastic Beanstalk environment
  • Start/stop multiple Elastic Beanstalk environments
  • Show Elastic Beanstalk environment details
  • Use spot instances for Elastic Beanstalk environments
  • Report activities in Slack channel
  • Monitor spot instance request status, and automatically adjust bid price
  • Custom scale up/down schedule
  • Support multiple AWS accounts and regions
  • Check the monthly/weekly/daily/hourly AWS cost (via CloudHealth)
  • Find out the oncall stuff (via OpsGenie)

Install

git clone https://github.com/jc1518/Huggies.git
cd Huggies
npm install

Setup your environment variables in envvars

source lib/envvars; bin/hubot --adapter slack

Usage

Main help

Usage:
    `aws cost ?` - See CloudHealth subcommands
    `aws eb ?  ` - See AWS Elastic Beanstalk subcommands
    `ops ?     ` - See Opsgenie subcommands

AWS cost help (require CloudHealth)

Usage:
    `aws cost saving` - show month to date saving
    `aws cost <monthly|weekly|daily|hourly>` - show AWS monthly/weekly/daily/hourly cost 

AWS Elastic Beanstalk help

Usage:
    `aws eb start <environment[@min:max]>` - start Elastic Beanstalk environment
    `aws eb stop <environment>` - stop Elastic Beanstalk environment
    `aws eb show <environment>` - show Elastic Beanstalk environment info
    `aws eb spot-on <environment> <instance_type> <bid_price>` - enable spot instance for Elastic Beanstalk environment
    `aws eb spot-off <environment>` - disable spot instance for Elastic Beanstalk environment
    `aws eb spot-show all` - show spot request status and spot instance enabled environments
    `aws eb autostart-<on|off|show> <environment>[@hh:mm]` - turn on/off or show autostart for Elastic Beanstalk environment
    `aws eb autostop-<on|off|show> <environment>[@hh:mm]` - turn on/off or show autostop for Elastic Beanstalk environment

Ops help (require OpsGenie)

Usage:
    `ops who is oncall` - See who is the poor guy this week

FAQ

  • How to grant Slack user access?
    Add slack user's email in slackusers.js file, role are the environment names seperated with comma or Admin which has access to all environments.

  • How to manage RESTful API users?
    Add user in apiusers.js, role are the environment names seperated with comma or Admin which has access to all environments. The inline passwords are encrypted. Use encrypt.js to encrypt the password string when create new users.

  • How to consolidate multiple environments into one?
    Add the consolidated environments in ebenvs.js. e.g Consolidate myapp-dev, myapp-uat into myapp-nonprod. So 'aws eb start myapp-nonprod' can start both myapp-dev and myapp-uat in one shot.

  • How to start/stop environment via RESTful API?
    Examples:
    curl -X POST -H "Content-Type: application/json" -d '{"username":"your_username","password":"your_password","server":"your_environment"}' http://huggies_server_ip:8080/aws/eb/start
    curl -X POST -H "Content-Type: application/json" -d '{"username":"your_username","password":"your_password","server":"your_environmet"}' http://huggies_server_ip:8080/aws/eb/stop

  • How to enable/disable spot instance for environment via RESTful API?
    Examples:
    curl -X POST -H "Content-Type: application/json" -d '{"username":"your_username","password":"your_password","server":"your_environment","instance":"instance_type","price":"bid_price"}' http://huggies_server_ip:8080/aws/eb/spoton
    curl -X POST -H "Content-Type: application/json" -d '{"username":"your_username","password":"your_password","server":"your_environmet"}' http://huggies_server_ip:8080/aws/eb/spotoff

  • How to monitor spot instance request?
    Setup a cron job, e.g * * * * * /usr/local/src/node-v4.4.7-linux-x64/bin/node /home/ec2-user/huggies/lib/bid_monitor.js

  • How Huggies makes Elastic Beanstalk support spot instance?
    Check the details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].