How to migrate from LaunchDarkly to ConfigCat
· 3 min read
Coming from LaunchDarkly? This post will show you a simple & straight forward way to migrate your feature flags from LaunchDarkly to ConfigCat
Step 1: Get LaunchDarkly Access Token
Please follow the following steps in order to get your token.
- Login to LaunchDarkly
- Navigate to Account settings page by clicking My Profile in the top right menu
- Select the Authorization tab
- Create an access token:
- Once this pops up, just fill in the name and leave the rest as per the image and hit "Save token" (I use the name "migrate-access-token" for better clarity on the usage of the token)
- Once you hit save, you will be presented with this image. Please do copy & save the access token. Hold on to this token. We will be using it later.
Step 2: Get ConfigCat Base64 encoded authorization header
- Login to ConfigCat
- Navigate to your account's public api credentials
- Once there, click on "add credentials" and add any name you want (I used the name "migrate-from-launchdarkly" as the name, for better clarity of the usage of the token)
- Once you hit "generate", copy the Base64 encoded authorization header. This is the only value we need (make sure the value you copy includes
Basic
).
Hold on to this base 64 string. We will be using this string later.
Step 3: Get Your Organisation ID for ConfigCat
This organisation ID will be the organisation that you want to migrate your feature flag to. So, be certain it is the correct organisation ID. To get the ID:
- Navigate to https://app.configcat.com/organization
- Note that the URL will change into:
https://app.configcat.com/organization/xxx
- Your organisation ID is
xxx
Hold on to your ConfigCat organisation ID. We will be using it later
Step 4: Use this repository
This repository makes it easy for you to migrate from LaunchDarkly to ConfigCat using just one command with some configuration.
- Clone this repository to your local
- Run
npm install
to install all dependencies - Copy
.env.sample
file into.env
file in the same location - Fill in the data in
.env
file as you have received in Step 1 to Step 3 above. For example:
LAUNCH_DARKLY_READER_ACCESS_TOKEN=thisisyourtoken
CONFIG_CAT_API_AUTH_HEADER=thisisyourauthheader
CONFIG_CAT_ORG_ID=thisisyourorgid
CONFIG_CAT_PLAN=free
- Run
npm run migrate
on your terminal. - In your ConfigCat site, navigate to products. There you should see
from launchdarkly
config underConfigs
section: - Click on the
from launchdarkly
config and you should see all your feature flags from launchdarkly in here.
Congratulations! You have migrated over from LaunchDarkly to ConfigCat using just one command with some configuration.