1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/README.md

102 lines
5.0 KiB
Markdown
Raw Normal View History

2016-12-05 10:55:11 +01:00
# Unleash
2014-11-10 16:25:22 +01:00
2016-11-07 09:54:07 +01:00
[![Build Status](https://travis-ci.org/Unleash/unleash.svg?branch=master)](https://travis-ci.org/Unleash/unleash)
2016-11-10 21:15:16 +01:00
[![Coverage Status](https://coveralls.io/repos/github/Unleash/unleash/badge.svg?branch=master)](https://coveralls.io/github/Unleash/unleash?branch=master)
2016-11-10 21:20:18 +01:00
[![Dependency Status](https://david-dm.org/Unleash/unleash.svg)](https://david-dm.org/Unleash/unleash)
2017-06-28 14:11:32 +02:00
[![devDependency Status](https://david-dm.org/Unleash/unleash/dev-status.svg)](https://david-dm.org/Unleash/unleash?type=dev)
2017-11-13 19:21:30 +01:00
[![Greenkeeper badge](https://badges.greenkeeper.io/Unleash/unleash.svg)](https://greenkeeper.io/)
2018-01-15 09:15:19 +01:00
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
2014-11-10 16:39:17 +01:00
2016-12-03 13:23:08 +01:00
Unleash is a feature toggle system, that gives you a great overview over all feature toggles across
all your applications and services. It comes with official client implementations for Java, Node.js and Go.
2016-12-03 13:23:08 +01:00
The main motivation for doing feature toggling is to decouple the process for deploying code to production
and releasing new features. This helps reducing risk, and allow us to easily manage which features to enable
2017-01-13 07:22:55 +01:00
> Feature toggles decouple **deployment** of code from **release** of new features
2016-12-03 13:23:08 +01:00
This repo contains the unleash-server, which contains the admin UI and a place to ask for the status of features.
In order to make use of unleash you will also need a client implementation.
2017-02-15 17:31:37 +01:00
<img src="https://github.com/Unleash/unleash/raw/master/docs/assets/dashboard.png" alt="Unleash UI" width="600" />
2016-12-23 11:20:51 +01:00
[Online demo version available on heroku](https://unleash.herokuapp.com/#/features).
2016-12-23 11:20:51 +01:00
2016-12-03 13:23:08 +01:00
## Activation strategies
2017-01-13 07:22:55 +01:00
It's fine to have a system for turning stuff on and off. But some times we want more granular control,
2016-12-03 13:23:08 +01:00
we want to decide who to the toggle should be enabled for. This is where activation strategies comes in to
2017-01-13 07:22:55 +01:00
the picture. Activation strategies take arbitrary config and allows us to enable a toggle in various ways.
2016-12-03 13:23:08 +01:00
Common activation strategies includes:
- Active For users with a specified userId
- GradualRollout to X-percent of our users
- Active for our beta users
- Active only for application instances running on host x.
2016-12-03 13:25:50 +01:00
Read more about activation strategies in [docs/activation-strategies.md](./docs/activation-strategies.md)
2016-12-03 13:23:08 +01:00
## Client implementations
We have offical SDK's for Java, Node.js and Go. And we will be happy to add implementations in other langugages written by you! These libraries makes it very easy to use Unleash in you application.
2017-12-05 08:47:13 +01:00
- [unleash/unleash-client-java](https://github.com/unleash/unleash-client-java)
- [unleash/unleash-client-node](https://github.com/unleash/unleash-client-node)
- [unleash/unleash-client-go](https://github.com/unleash/unleash-client-go)
Clients written by awesome enthusiasts:
- [stiano/unleash-client-dotnet](https://github.com/stiano/unleash-client-dotnet) (.Net Core)
- [onybo/unleash-client-core](https://github.com/onybo/unleash-client-core) (.Net Core)
- [aes/unleash-client-python](https://github.com/aes/unleash-client-python) (Python 3)
2017-11-30 21:48:58 +01:00
2017-12-05 08:49:53 +01:00
### The Client API
The client SDKs provides a simple abstraction making it easy to check feature toggles in your application. The code snippet below shows how you would use `Unleash` in Java.
2016-12-03 13:23:08 +01:00
```java
if (unleash.isEnabled("AwesomeFeature")) {
2016-12-03 13:23:08 +01:00
//do some magic
} else {
//do old boring stuff
}
```
2016-12-02 17:47:13 +01:00
# Running Unleash
## Requirements
2017-01-13 07:22:55 +01:00
You will need a __PostgreSQL__ 9.3+ database instance to be able to run Unleash.
2016-12-02 17:47:13 +01:00
2017-01-13 07:22:55 +01:00
When starting Unleash you must specify a database URI (can be set as environment variable DATABASE_URL)
which includes a username and password, which has the rights to migrate the database.
2016-12-02 17:47:13 +01:00
_Unleash_ will, at startup, check whether database migration is needed, and perform necessary migrations.
2018-02-10 09:37:19 +01:00
## Using Unleash
2016-12-05 10:55:11 +01:00
**The simplest way to get started:**
(database-url can also be set as a environment variable: DATABASE_URL)
2016-12-02 17:47:13 +01:00
```bash
$ npm install unleash-server -g
2017-01-13 07:22:55 +01:00
$ unleash -d postgres://unleash_user:password@localhost:5432/unleash -p 4242
2016-12-02 17:47:13 +01:00
2017-02-25 08:52:41 +01:00
Unleash started on http://localhost:4242
2016-12-02 17:47:13 +01:00
```
2018-02-10 09:37:19 +01:00
You can also require Unleash as a lib (recommended) and expand it with more options. Read more about this feature in the [getting started guide](./docs/getting-started.md).
### Securing Unleash
Unleash also have extension points where you can integrate Unleash with your authentication provider (OAuth 2.0). Read more about [securing unleash](./docs/securing-unleash.md).
2016-12-02 17:47:13 +01:00
2016-11-30 23:56:33 +01:00
## Run with docker
2016-12-05 09:40:34 +01:00
We have made a separate project which runs unleash inside docker. Please see [unleash-docker](https://github.com/Unleash/unleash-docker)
2017-02-25 14:26:46 +01:00
# Developer Guide
If you want to contribute to this project you are encouraged to send issue request, or provide pull-requests.
Please read the [unleash developer guide](./docs/developer-guide.md) to learn more on how you can contribute.
# I want to learn more
2017-02-25 14:27:48 +01:00
- [Blog: Unleash your features gradually!](http://bytes.schibsted.com/unleash-features-gradually/)
- [Presentation: Unleash your features gradually!](http://ivarconr.github.io/feature-toggles-presentation/sch-dev-lunch-2017/#1)
2017-02-25 14:26:46 +01:00
- http://martinfowler.com/bliki/FeatureToggle.html