All Projects → yusinto → ld-scheduler

yusinto / ld-scheduler

Licence: MIT license
Schedule Launch Darkly flags on or off

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to ld-scheduler

ld-redux
A library to integrate launch darkly with react redux
Stars: ✭ 33 (+135.71%)
Mutual labels:  launch, feature-flags, feature-toggles, flags, feature, launchdarkly, feature-toggle, feature-flag, ldclient, launch-darkly, darkly, ld-redux
Flipper
🐬 Beautiful, performant feature flags for Ruby.
Stars: ✭ 2,732 (+19414.29%)
Mutual labels:  feature-flags, feature-toggles, feature, feature-toggle, feature-flag
jest-launchdarkly-mock
Easily unit test LaunchDarkly feature flagged components with jest
Stars: ✭ 14 (+0%)
Mutual labels:  feature-flags, feature-toggles, flags, feature, launchdarkly
js-sdk
JavaScript frontend SDK for ConfigCat. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
Stars: ✭ 21 (+50%)
Mutual labels:  feature-flags, feature-toggles, feature-toggle, featureflags, feature-flag
flagsmith-js-client
Javascript Client for Flagsmith. Ship features with confidence using feature flags and remote config. Host yourself or use our hosted version at https://www.flagsmith.com/
Stars: ✭ 42 (+200%)
Mutual labels:  feature-flags, feature-toggles, feature-toggle, feature-flag
featurehub
FeatureHub - cloud native feature flags, A/B testing and remote configuration service. Real-time streaming feature updates. Provided with Java, JavaScript, Go, .Net, Android and Flutter SDKs.
Stars: ✭ 136 (+871.43%)
Mutual labels:  feature-flags, feature-toggles, feature-toggle, feature-flag
Unleash
Unleash is the open source feature toggle service.
Stars: ✭ 4,679 (+33321.43%)
Mutual labels:  feature-flags, feature-toggles, feature, feature-toggle
flagsmith
Open Source Feature Flagging and Remote Config Service. Host on-prem or use our hosted version at https://flagsmith.com/
Stars: ✭ 2,309 (+16392.86%)
Mutual labels:  feature-flags, feature-toggles, feature-flag
ruby-server-sdk
LaunchDarkly Server-side SDK for Ruby
Stars: ✭ 25 (+78.57%)
Mutual labels:  feature-flags, feature-toggles, launchdarkly
java-server-sdk
LaunchDarkly Server-Side SDK for Java
Stars: ✭ 71 (+407.14%)
Mutual labels:  feature-flags, feature-toggles, launchdarkly
php-server-sdk
LaunchDarkly Server-side SDK for PHP
Stars: ✭ 31 (+121.43%)
Mutual labels:  feature-flags, feature-toggles, launchdarkly
toggler
toggler is a feature flag service to decouple deployment, feature enrollment and experiments
Stars: ✭ 27 (+92.86%)
Mutual labels:  feature-flags, feature-toggles, feature-toggle
js-client-sdk
LaunchDarkly Client-side SDK for Browser JavaScript
Stars: ✭ 93 (+564.29%)
Mutual labels:  feature-flags, feature-toggles, launchdarkly
php-client
PHP SDK client for Split Software
Stars: ✭ 14 (+0%)
Mutual labels:  feature-flags, feature-toggles, feature-toggle
erlang-server-sdk
LaunchDarkly Server-Side SDK for Erlang/Elixir
Stars: ✭ 16 (+14.29%)
Mutual labels:  feature-flags, feature-toggles, launchdarkly
ios-client-sdk
LaunchDarkly Client-side SDK for iOS (Swift and Obj-C)
Stars: ✭ 45 (+221.43%)
Mutual labels:  feature-flags, feature-toggles, launchdarkly
doorkeeper
A Feature Toggle for PHP
Stars: ✭ 16 (+14.29%)
Mutual labels:  feature-flags, feature-toggles, feature-toggle
unleash-client-java
Unleash client SDK for Java
Stars: ✭ 86 (+514.29%)
Mutual labels:  feature-flags, feature-toggles, feature
unleash-client-ruby
Unleash client SDK for Ruby
Stars: ✭ 43 (+207.14%)
Mutual labels:  feature-flags, feature, feature-toggle
Unleash Client Go
Unleash Client for Go
Stars: ✭ 78 (+457.14%)
Mutual labels:  feature-flags, feature-toggles, feature

ld-scheduler

npm version npm downloads npm npm

A library to schedule launch darkly feature flag deployment

So you use Launch Darkly for feature flagging and a/b testing which is very cool. Why this package then you ask?

Once you have created your feature flags in launch darkly, and then developed and tested your feature, you are now ready to deploy your code to production. You will then also need to turn on your feature flags in production. You can do this at deploy time, either manually through the dashboard or programmatically through the launch darkly rest apis. However, what if your feature needs to be deployed at a later time? You need to decouple the deployment of your app from the deployment of your features. Enter ld-scheduler.

You can now create flags in launch darkly and then set a date and time you want the kill switch to be turned on or off. This decouples your app deployment from feature deployment. No one should stay up past midnight just to turn on/off the kill switch.

  • Schedule feature flags on or off at an exact date and time (useful for zero dark thirty deployments)
  • Decouple code deployment from feature deployment
  • Works with slack! Ld-scheduler posts a message to slack when it successfully updates (or fails to update) your flags!

Installation

yarn add ld-scheduler

or the old school way

npm i --save ld-scheduler

Quickstart

  1. Create a new node project and set it up with babel. You'll need babel-register, babel-polyfill and babel-preset-latest. See here for example.

  2. In your main code file, import ld-scheduler and call the runEveryXSeconds function. If you don't use slack (you should!) you don't have to specify the slack property. By default, ld-scheduler polls launch darkly every 60 seconds:

    import ldScheduler from 'ld-scheduler';
    
    ldScheduler.runEveryXSeconds({
      environment: 'test',
      apiKey: 'your-secret-api-key',
      slack: 'your-slack-webhook-url'
    });
  3. Tag your feature flag. In launch darkly's dashboard, under the Settings tab of your feature flag, under Tags, add one or more "scheduled" tags, each prefixed with an environment name. For example, if you have both a test and production environment, you will need 2 tags: 'test-scheduled' and 'production-scheduled'. Still in the Settings tab, under Description, add the following JSON object:

    {
       "taskType": "killSwitch",
       "value": true,
       "targetDeploymentDateTime": "2017-02-27 22:00 +11:00",
       "description": "Test flag for dev"
    }

    where

    • taskType is killSwitch
    • value is true (kill switch on) or false (kill switch off)
    • targetDeploymentDateTime must be in the format of YYYY-MM-DD HH:mm Z Note: the utc offset is important otherwise moment will use the host's timezone.
    • description is a textual string for the purpose of human readability

    The screenshot below is an example configuration:

    ld-scheduler-flag-settings

  4. Run your project and watch magic happens!

Example

Check example for a fully working example. Remember you'll need to enter your own launch darkly api key and your own slack url (if you use slack).

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].