Tweek - an open source feature manager
Branch: master
Clone or download
Yshayy Update acl-schema.json (#1117)
* Update acl-schema.json

add missing object

* Update package.json
Latest commit 2700f97 Feb 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci 847 update dotnet core services (#848) Jul 1, 2018
.vscode upgrading app metrics to 2.x (#909) Aug 26, 2018
CI use testcafe instead of selenium (#1091) Feb 4, 2019
addons add option to delete context (#1093) Feb 1, 2019
core add option to delete context (#1093) Feb 1, 2019
deployments Jwt policies min ui (#1109) Feb 18, 2019
docs Jwt policies min ui (#1109) Feb 18, 2019
e2e Jwt policies min ui (#1109) Feb 18, 2019
services Update acl-schema.json (#1117) Feb 18, 2019
utils Added code to output basic auth password after keys generation (#1115) Feb 17, 2019
.dockerignore improve tweek-api dockerignore file Aug 3, 2017
.gitattributes Windows: Set the git hooks of publisher to (#996) Nov 20, 2018
.gitignore 847 update dotnet core services (#848) Jul 1, 2018
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Jul 12, 2017
CONTRIBUTING.md small refactors, change admin app name (#1069) Jan 22, 2019
LICENSE Create LICENSE May 20, 2017
README.md Update README.md Jan 23, 2019
Tweek.sln upgrading app metrics to 2.x (#909) Aug 26, 2018
TweekApi.Dockerfile Add skaffold for local development (#1054) Jan 15, 2019
TweekApiSmokeTest.Dockerfile Merge Gateway (#833) Dec 20, 2018
package.json Jwt policies min ui (#1109) Feb 18, 2019
renovate.json Update renovate.json Jul 13, 2017
skaffold.yaml 1078 1079 expose new endpoints (#1084) Jan 29, 2019
yarn.lock upgrade dev dependencies (#1085) Jan 28, 2019

README.md

Codefresh build status License Slack CircleCIcode style: prettier

tweek@soluto.com

What is Tweek?

Tweek is an open source feature management solution for customizing applications and system behavior without deploying new code.

Tweek aims to be a complete open-source alternative to other industry feature/configuration/experiment management solutions such as Facebook's Gatekeeper, LinkedIn's XLNT, Dropbox's Stormcrow and other commercial SaaS solutions...

Features

  • Feature toggles, gradual release
  • Multi-variant experiments, A/B testing
  • Built-in Editor with user friendly UI
  • Hierarchical configurations
  • Advanced targeting of users/groups
  • Dependencies between features
  • Customizable schema/domain model
  • Auditing
  • Integrated storage for saving context
  • Container friendly
  • Integrated OAuth support
  • Pluggable storage backend
  • Simple RESTful api for fetching configurations
  • Scalable

Getting Started

The easiest way to start evaluating Tweek is to run it locally on docker, make sure you have the latest docker (for windows/mac/etc..) version installed (17-06+).

Running Tweek

  • Clone the repo (git clone https://github.com/Soluto/tweek.git)
  • [optional] Pull images, run yarn docker-compose pull --parallel (optional for getting started fast with Tweek as it's skip build)

Using Docker Compose

  • Run (yarn start) - this might take a few minutes for the first time

Using Kubernetes

  • Install Skaffold (https://github.com/GoogleContainerTools/skaffold)
  • Run skaffold dev --port-forward=false
  • Wait for environment to be stable (will take about 10m first time due to building all images, afterward it can take about 2m for environment to stabilize)

Troubleshooting

  • Run ( yarn start --build) to rebuild all images and start Tweek.

Edit your first key

After setting up our environment, we're going to create our first key. Keys in tweek are the most basic building blocks and they represent a container for dynamic value that affect feature behaviors. Our first key, will be a key that is responsible for the color of a "sign up" button.

  • Open http://localhost:8080/login in browser.
  • Login
    • User Basic auth (user: admin-app, password: 8v/iUG0vTH4BtVgkSn3Tng==)
    • Can also use OIDC mock server login button for testing OIDC (user: User, password: pwd)
  • Go to keys page.
  • Click on "Add Key"
  • Type my_app/sign_button/color
  • Set value type to String
  • Add default value "red"
  • Save changes
  • Click on "Add Rule"
  • Set Property to Country (user) and set "=" and "Canada" in the other fields
  • In Rule value set the value "blue"
  • Click "Save changes"

More on keys and paths

Querying Tweek

Use curl/postman/chrome to fire GET Request:

Using the rest api, an application can query Tweek for getting the right set of values for each specific user. More on Tweek Rest api.

Adding context data

Tweek provide UI and rest api for editing context.

  • Go to context
  • Set Identity Type to User
  • Set User id to John
  • Click enter
  • Set value "Candada" for property Country

After that, we can query Tweek API with:

You can also use the api for updating Tweek context:

More on Context.

Gradual Feature Release

Create new key in the editor "my_app/sign_button/is_enabled" with value type "boolean" and default value False.
Add new rule, remove all conditions, set the the rule value to gradual release with 50%. Try querying configuration with different users and You'll have different results.

More on how multi-variant keys work in Tweek. (link)

Deployment to production

FAQ

  • Who's using Tweek?
    Tweek is been used in large scale production deployment at Soluto.
  • How do I generate ssh keys and a pfx file for use in production?
    There's a script for this purpose in utils/generate_keys.sh
  • I found a security vulnerability, should I open an issue about it?
    No. Please send an email to security@soluto.com.

Related projects

Tweek-Clients - Tweek REST clients
Tweek.JPad - Tweek's internal rules engine

Additional Resources