Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

include cli with with flapjack-diner #43

Open
someword opened this issue Oct 21, 2014 · 8 comments
Open

include cli with with flapjack-diner #43

someword opened this issue Oct 21, 2014 · 8 comments

Comments

@someword
Copy link

Having a cli included with flapjack-diner would be pretty nice. Initially just supporting enabling/disabling maintenance mode would be great to have the framework in place and allow others to add to it as the need arises.

We have been using jwoods flapjack-client which wraps flapjack-diner for this until now. The flapjack-client will need some work to be compatible with the new flapjack-diner and I thought the time may be better spent getting a cli closer to the source to ensure future compatibility.

In our application deploy process we make extensive use of setting/ending maintenance modes from the client. For each potentially affected service the clients check if that service is in a maint mode and then schedules a new one before doing the deploy and at the end of the deploy the maint mode is cleared if the status check are currently OK.

Additionally we have scripts that self check that status of specific checks and then do one thing or another depending on if it's OK or CRITICAL.

@ghost
Copy link

ghost commented Oct 21, 2014

👍

Ideally everything will use the API as a source, even the Flapjack web interface and associated command line tools, and this fits into that broader vision. Commonly used scripts could also be included if they're useful to the wider community as well.

@Sarah-E-Greene
Copy link

Sounds great. There's also maintenance creation in the flapjack server commands, which should also be merged into here.

@Sarah-E-Greene
Copy link

I've now had a look at jswood's flapjack-client tool, and it's very nice. It's definitely something we should be listing on flapjack.io when it's compatible with v1 (and then v2).

I've forked the project to flapjack/flapjack-client, and started upgrading it to use the v1 API.

@ghicks-rmn
Copy link

Might be a little late to this discussion, but I've built a CLI that we've been using internally (we've called it "syrup" here) based on flapjack-diner 1.0, which already uses the JSON API. It can manage contacts, media, notification rules, etc; it can also query for entity and check data. I'm hoping to clean it up and release it soon, we've been using it heavily here and had very good results.

We've been planning on open-sourcing it and expanding on it, I've talked a bit with @auxesis about it. I'll try to get it publicly available soon.

@Sarah-E-Greene
Copy link

That'd be great - we're certainly very interested in it.

@ghicks-rmn
Copy link

@Hobbsee @ali-graham Is there a targeted supported version of Ruby for flapjack-diner? I can't find anything in the docs or gemfiles, the Flapjack omnibus package is using something like 2.1.2 but Syrup is working on 1.9 in its current iteration.

I'm asking primarily because certain Rubocop linting recommendations limit compatibility with old versions - I don't want to apply them to my code if it'll break compatibility with versions that Diner or Flapjack would otherwise support.

@ghost
Copy link

ghost commented Dec 9, 2014

Currently targeting 1.9+, as that's the Flapjack Ruby version requirement, and 1.8 has been end-of-lifed. We do prefer hash-rockets over the new syntax :)

@ghicks-rmn
Copy link

https://github.com/RetailMeNot/flapjack-syrup Released today! I'm the project maintainer, let me know if y'all have any comments.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants