• Stars
    star
    345
  • Rank 122,165 (Top 3 %)
  • Language
    C#
  • License
    MIT License
  • Created over 8 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tweek - an open source feature manager

Github build status License Slackcode style: prettier

[email protected]

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).
  • [optional] Newer versions of docker-compose support parallel build, so you can use yarn docker-compose build --parallel for faster build.

Using Docker Compose

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

Using Tilt

Tilt is a CLI tool that can be used to create an optimal development environment for multi-container apps such as Tweek. It support automatic rebuilding of images and re-running of containers on files' changes. Additionally, it support more complex live reloading scenarios, like Tweek Editor (React app). Tweek uses Tilt on top of docker-compose for easier and (usually) faster developer experience (compared to Tilt with k8s).

Using Kubernetes

  • Install Skaffold (https://github.com/GoogleContainerTools/skaffold)
  • Run skaffold dev --port-forward=false
  • Wait for the environment to be stable (this will take about 10 mins on the first time due to building all images, afterward it can take about 2 mins 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:8081/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 "Canada" 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 a new key in the editor "my_app/sign_button/is_enabled" with value type "boolean" and default value False.
Add a 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 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 [email protected].

Related projects

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

Additional Resources

More Repositories

1

kamus

An open source, git-ops, zero-trust secret encryption and decryption solution for Kubernetes applications
C#
913
star
2

graphql-to-mongodb

Allows for generic run-time generation of filter types for existing graphql types and parsing client requests to mongodb find queries
TypeScript
314
star
3

oidc-server-mock

Configurable Mock Server for OpenId Connect
C#
204
star
4

python-flask-sklearn-docker-template

A simple example of python api for real time machine learning, using scikit-learn, Flask and Docker
Python
135
star
5

dynamico

Dynamico allows a remote (web-like) code push work-flow for continuous delivery of specific features native or web.
TypeScript
97
star
6

webdriverio-zap-proxy

Demo - how to easily build security testing for Web App, using Zap and Glue
JavaScript
58
star
7

mobsf-ci

All that is required to run MobSF in the ci
Shell
42
star
8

shisell-js

A service agnostic library for building immutable scoped analytic event dispatchers with extra data, identities and lazy filters.
TypeScript
41
star
9

monitored

A utility for monitoring services πŸ”
TypeScript
37
star
10

dqd

Dequeue daemon
Go
35
star
11

wordpress-plugin-tests-template

A template for a Wordpress plugin with tests that are running using Docker
Shell
35
star
12

golang-docker-healthcheck-example

Simple HEALTHCHECK solution for Go Docker container
Dockerfile
34
star
13

owasp-zap-glue-ci-images

Ready to use images of Zap and Glue, especially for CI integration.
Shell
33
star
14

stitch

Stitch is a no-code GraphQL tool for your existing APIs and data sources
TypeScript
29
star
15

docker-compose-jest-runner

This package allows to run tests that use docker-compose and supports multi-stage setup.
TypeScript
28
star
16

containers-security-project

A place for documenting threats and mitigations related to containers orchestrators (Kubernetes, Swarm etc)
Gherkin
25
star
17

Miro

MIRO - Merge it robot!
C#
25
star
18

airbag

Tiny OAuth2 and metrics sidecar for your docker containers
C#
23
star
19

fluent-plugin-kubernetes-log-level

Dynamic filtering of kubernetes logs according to pod labels
Ruby
23
star
20

simple-fake-server

Small and simple http server for mocking and asserting http calls
TypeScript
17
star
21

react-shisell

React binding for Shisell-js
TypeScript
8
star
22

mustache-async.js

Logic-less {{mustache}} templates with async view function Support
JavaScript
8
star
23

helm-charts

Soluto's Helm Charts Repository
Smarty
8
star
24

testcafe-reporter-teamcity

This is a TeamCity reporter plugin for TestCafe.
JavaScript
7
star
25

tweek-clients

clients for https://www.github.com/soluto/tweek
TypeScript
6
star
26

casbin-nats-watcher

Casbin watcher implementation with Nats.io
Go
5
star
27

flowz

Flowz is a library for writing resumable asynchronous code
JavaScript
4
star
28

soluto-kafka

Java
4
star
29

test-ssl-cipher-suites

A ruby script that use NMap to test SSL cipher suites
Ruby
3
star
30

shisell-python

Shisell is a service agnostic abstraction for analytic dispatchers.
Python
3
star
31

nagios-plugins

JavaScript
3
star
32

fetch-jwk

This library provides methods to fetch jwt keys from jwks url
Go
2
star
33

linkerd-disable-injection-mutation-webhook

Go
2
star
34

Tweek.JPad

JPad is the default rules engine for Tweek.
F#
2
star
35

taking-care-of-quizness-ui

JavaScript
2
star
36

congo-examples

JavaScript
1
star
37

react-tweek-shop-example

JavaScript
1
star
38

react-native-tweek-example

Objective-C
1
star
39

tweek-deploy

TypeScript
1
star
40

IdentityServer.Contrib.JsonWebKeyAdapter

A small nuget package allow to work with JsonWebKey instead of X509Certificate.
C#
1
star
41

tweek-authoring-php-client

NOT OFFICIAL - PHP client for Tweek Authoring, auto-generated from swagger
PHP
1
star
42

taking-care-of-quizness-api

JavaScript
1
star