🏁 Flagsmith

Flagsmith (code) is an open source, fully featured, Feature Flag and Remote Config service. Not sure what a feature flag is or why you'd want a service for managing them? LaunchDarkly has a great post on this:

Feature Flags (Toggles) in DevOps: How These Concepts Relate - LaunchDarky | LaunchDarkly
Feature flags (toggles) are critical to DevOps in how they enable speed, stability, and cross-team collaboration. Learn how to leverage feature flags for DevOps transformation.

We'll also steal their awesome intro to feature flags (though this article is about Flagsmith!):

You might see what we're getting at here – Flagsmith is like fully F/OSS versino of LaunchDarkly (though of course the LD team would probably beg to differ, on feature set basis at least!).

We'll sum it up for the impatient: feature flags let you separate deploying features and enabling features, by standardizing on a means of turning feature integration on and off without redeploying your code.

We love products with Demos, and Flagsmith has one:

Flagsmith Demo | See The Product
See Flagsmith and click around with feature flags with our (free and ungated) interactive demo. Try it now.

🌠 Features

Flagsmith has a ton of features (and they're all turned on):

  • Fully featured Web GUI for managing flags
  • BSD 3-clause license
  • Scheduling of flag setting
  • Managed change requests for flags
  • Segmenting usebase for flagging
  • Environment management (ex. Dev/Staging/Production)
  • Easy deployment with Docker
  • Client SDKs in many programming languages

πŸ€– As described by AI

Flagsmith offers a comprehensive platform for managing feature flags and remote configurations, enabling teams to implement and control features across various environments seamlessly. It supports A/B testing, segment targeting, and feature rollouts, enhancing the development process by allowing real-time adjustments without code deployments.

Flagsmith emphasizes security and flexibility, offering deployment options that cater to different organizational needs. With its open-source nature, Flagsmith encourages community contributions and development, fostering an ecosystem where developers can share improvements, ensuring the platform remains at the forefront of feature flagging technology.

πŸ“Ί Watch this

Flagsmith has a YouTube channel which has some great guides and content on it to check out.

There's a great demo on how to do A/B testing with Flagsmith:

If you're more into live-streamed code and hijinks, you might like this recent video by Eddie Jaoude, with Flagsmith:

πŸ‘Ÿ Getting started

Flagsmith is easy to get started with for a couple reasons:

  • Great docker support, so it's easy to experiment without changing your system too much
  • docker-compose support (you can start Flagsmith and it's dependencies all at once)
  • Kubernetes support for those who use k8s

🐳 Deploying Flagsmith with Docker

Rather than reading what we have to say, you might want to check out the Flagsmith Docker deployment docs:

Docker | Flagsmith Docs
Getting Started with Flagsmith on Docker

Flagsmith has an official docker image and a docker-compose.yml file that is easy to read and use in their repository:

flagsmith/docker-compose.yml at main Β· Flagsmith/flagsmith
Open Source Feature Flagging and Remote Config Service. Host on-prem or use our hosted version at https://flagsmith.com/ - Flagsmith/flagsmith

We've reproduced the Flagsmith relevant parts below (and removed postgres for example, the backing datastore):

version: '3'

    image: flagsmith/flagsmith:latest
      # All environments variables are available here:
      # API: https://docs.flagsmith.com/deployment/locally-api#environment-variables
      # UI: https://docs.flagsmith.com/deployment/locally-frontend#environment-variables

      DATABASE_URL: postgresql://postgres:password@postgres:5432/flagsmith
      USE_POSTGRES_FOR_ANALYTICS: 'true' # Store API and Flag Analytics data in Postgres

      ENVIRONMENT: production # set to 'production' in production.
      DJANGO_ALLOWED_HOSTS: '*' # Change this in production
      ALLOW_ADMIN_INITIATION_VIA_CLI: 'true' # Change this in production
      FLAGSMITH_DOMAIN: localhost:8000 # Change this in production
      DJANGO_SECRET_KEY: secret # Change this in production
      # PREVENT_SIGNUP: 'true' # Uncomment to prevent additional signups
      # ENABLE_ADMIN_ACCESS_USER_PASS: 'true' # Uncomment to enable access to the /admin/ Django backend via your username and password

      # Enable Task Processor

      # For more info on configuring E-Mails - https://docs.flagsmith.com/deployment/locally-api#environment-variables
      # Example SMTP:
      # EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend
      # EMAIL_HOST: mail.example.com
      # SENDER_EMAIL: flagsmith@example.com
      # EMAIL_HOST_USER: flagsmith@example.com
      # EMAIL_HOST_PASSWORD: smtp_account_password
      # EMAIL_PORT: 587 # optional
      # EMAIL_USE_TLS: 'true' # optional
      - 8000:8000
      test: ['CMD-SHELL', 'python /app/scripts/healthcheck.py']
      interval: 2s
      timeout: 2s
      retries: 20
      start_period: 20s
        condition: service_healthy

  # The flagsmith_processor service is only needed if TASK_RUN_METHOD set to TASK_PROCESSOR
  # in the application environment
    image: flagsmith/flagsmith:latest
      DATABASE_URL: postgresql://postgres:password@postgres:5432/flagsmith
        condition: service_healthy
    command: run-task-processor

As you can see there are two main pieces to a Flagsmith installation:

  • Flagsmith main (docker image flagsmith/flagsmith with the default command)
  • Flagsmith task processor (docker image flagsmith/flagsmith run with the command run-task-processor)

This is a pretty standard setup for software that also has a job processor or some sort of async task queue, and it's quite well put together and easy to follow for Flagsmith.

πŸ§‘β€πŸ’» Want to contribute?

Flagsmith is truly free software (BSD 3-clause license), and accepts contributions and bug reports:

Issues Β· Flagsmith/flagsmith
Open Source Feature Flagging and Remote Config Service. Host on-prem or use our hosted version at https://flagsmith.com/ - Issues Β· Flagsmith/flagsmith

There are over 200 issues outstanding (and over 800 closed!) so jump in and help out if you're so inclined.