Skip to content

Instantly share code, notes, and snippets.

@eladmeidar
Last active December 28, 2015 00:59
Show Gist options
  • Save eladmeidar/7417514 to your computer and use it in GitHub Desktop.
Save eladmeidar/7417514 to your computer and use it in GitHub Desktop.

Server Rotator - Bascout

Server Rotator

Goal

Create a web application that will manage and monitor the operations of Sidekiq servers in Amazon / Rackspace.

Components

Gems

Rails - Version 4 Mongoid fog Sidekiq Bootstrap Less

Models

Server

The server model describes servers in context.

  Field           |	Type	    | Description
  id              | integer	  | primary key
  name            | string	  | automatically generated name upon creating a new server
  ip_address      | string    | Server’s IP
  created_at      | datetime	| Automatically generated name upon creating a new server
  active	        | boolean	  | describing if the server is active or not
  destroyed_at	  | datetime	| when a server is destroyed, #active is updated to false and a datetime is set on the destroyed_at field
  jobs_processed	| integer	  | reflect the number of jobs processed by a server
  jobs_threshold	| integer	  | jobs threshold for destruction

User

User model created by using Devise.

Stories

  • User should be able to log in
  • User should be able to view the list of currently active servers
  • User should be able to rotate a specific server
  • User should be able to rotate a group of servers
  • User should be able to rotate all servers
  • User should be able to see server’s current jobs processed
@mikesjewett
Copy link

Hey Elad, I took a stab at modifying this to be consistent with the other project checkpoints, in terms of format. I'm not sure if I nailed everything though, so please comment as you see fit. I think it could definitely use some more explanation around how AWS, Fog and Mongo come into the picture. Also, I used the term "restart" rather than "rotate" because I think people are more accustomed to that term. Let me know if I'm missing something though. Here's my fork:

https://gist.github.com/mikesjewett/7552743

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment