Skip to content

Commit 8d70d73

Browse files
kriscolemanclaude
andcommitted
fix(flipt): rewrite license docs to use actual CLI commands
The getting started docs referenced non-existent scripts (./scripts/setup-dev-license.sh, ./scripts/install.sh), Makefile targets (install-with-license, clean-license), and env var workflows (.replicated/license.env) that were never created. Replaced with the deterministic flow: create a customer, download the license file via `replicated customer download-license`, and pass it to helm via `--set-file replicated.license=license.yaml`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8165053 commit 8d70d73

3 files changed

Lines changed: 76 additions & 117 deletions

File tree

applications/flipt/QUICKSTART.md

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,23 @@ Get up and running with Flipt in 5 minutes.
88
- Helm 3.8+
99
- kubectl configured
1010

11-
## ⚠️ Prerequisites
11+
## ⚠️ Replicated License
1212

13-
Before you begin, you need a **Replicated development license**:
14-
15-
```bash
16-
# 1. Set your Replicated API token & License
17-
export REPLICATED_API_TOKEN=<your-token>
18-
export REPLICATED_LICENSE_ID=<your-license-id>
19-
```
20-
21-
**Don't have a Replicated account?**
22-
23-
- Sign up at [vendor.replicated.com](https://vendor.replicated.com)
24-
- See [Development License Guide](docs/DEVELOPMENT_LICENSE.md) for detailed instructions
13+
The Replicated SDK requires a development license. See the [Development License Guide](docs/DEVELOPMENT_LICENSE.md) for how to create one.
2514

2615
## Option 1: Manual Helm Install on local machine
2716

2817
If you prefer to run commands manually:
2918

3019
```bash
3120
# Step 1: Update chart dependencies (includes CloudNativePG operator)
32-
cd chart
33-
rm -f Chart.lock # Clean cached files
34-
helm repo add flipt https://helm.flipt.io
35-
helm repo add valkey https://valkey.io/valkey-helm/
36-
helm repo add cnpg https://cloudnative-pg.github.io/charts
37-
helm repo add replicated https://charts.replicated.com
38-
helm repo update
39-
helm dependency update
40-
cd ..
21+
make update-deps
4122

4223
# Step 2: Install Flipt (operator included automatically)
4324
helm install flipt ./chart \
4425
--namespace flipt \
4526
--create-namespace \
27+
--set-file replicated.license=license.yaml \
4628
--wait \
4729
--timeout 10m
4830

@@ -60,7 +42,7 @@ For enterprise deployments with Admin Console:
6042

6143
```bash
6244
export REPLICATED_APP=flipt
63-
export REPLICATED_LICENSE_ID=<license-id>
45+
export REPLICATED_API_TOKEN=<your-api-token>
6446
make release
6547
```
6648

applications/flipt/TROUBLESHOOTING.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,21 @@ Error: either license in the config file or integration license id must be speci
131131

132132
**Cause:** No Replicated license is configured.
133133

134-
**Solution:** Set up a development license:
134+
**Solution:** Download your license file and pass it during install or upgrade:
135135

136136
```bash
137-
# Quick setup
138-
export REPLICATED_API_TOKEN=your-token
139-
export REPLICATED_LICENSE_ID=your-license-id
137+
# Download your license (see docs/DEVELOPMENT_LICENSE.md for full setup)
138+
replicated customer download-license \
139+
--app flipt \
140+
--customer "<your-customer-name>" \
141+
--output license.yaml
142+
143+
helm upgrade flipt ./chart \
144+
--namespace flipt \
145+
--set-file replicated.license=license.yaml
140146
```
141147

142-
**Detailed guide:** See [docs/DEVELOPMENT_LICENSE.md](docs/DEVELOPMENT_LICENSE.md)
148+
**Need a license?** See [docs/DEVELOPMENT_LICENSE.md](docs/DEVELOPMENT_LICENSE.md)
143149

144150
---
145151

applications/flipt/docs/DEVELOPMENT_LICENSE.md

Lines changed: 60 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,6 @@ Flipt integrates with Replicated's SDK to provide:
1313

1414
The Replicated SDK requires a valid license to function, even in development environments.
1515

16-
## Quick Start
17-
18-
### Option 1: Automated Setup (Recommended)
19-
20-
```bash
21-
# 1. Set up your Replicated API token
22-
export REPLICATED_API_TOKEN=your-token-here
23-
24-
# 2. Run the setup script
25-
./scripts/setup-dev-license.sh
26-
27-
# 3. Load the license
28-
source .replicated/license.env
29-
30-
# 4. Install Flipt
31-
./scripts/install.sh
32-
```
33-
34-
### Option 2: Using Makefile
35-
36-
```bash
37-
# Set up license and install in one command
38-
export REPLICATED_API_TOKEN=your-token-here
39-
make install-with-license
40-
```
41-
4216
## Prerequisites
4317

4418
### 1. Replicated CLI
@@ -74,46 +48,44 @@ replicated version
7448
export REPLICATED_API_TOKEN=your-token-here
7549
```
7650

77-
Or add to your shell profile (~/.bashrc, ~/.zshrc):
78-
```bash
79-
echo 'export REPLICATED_API_TOKEN=your-token-here' >> ~/.zshrc
80-
source ~/.zshrc
81-
```
82-
83-
## Manual License Setup
84-
85-
If you prefer manual setup or need more control:
51+
## Creating a Development License
8652

8753
### Step 1: Create a Development Customer
8854

55+
Pick a customer name you'll reuse in subsequent steps:
56+
8957
```bash
58+
CUSTOMER_NAME="dev-$(whoami)"
59+
9060
replicated customer create \
9161
--app flipt \
92-
--name "dev-$(whoami)-$(date +%s)" \
62+
--name "$CUSTOMER_NAME" \
9363
--channel Unstable \
94-
--license-type dev \
95-
--output json > customer.json
64+
--license-type dev
9665
```
9766

98-
### Step 2: Extract License ID
67+
### Step 2: Download the License
9968

10069
```bash
101-
LICENSE_ID=$(jq -r '.id' customer.json)
102-
echo "License ID: $LICENSE_ID"
70+
replicated customer download-license \
71+
--app flipt \
72+
--customer "$CUSTOMER_NAME" \
73+
--output license.yaml
10374
```
10475

105-
### Step 3: Save License Configuration
76+
### Step 3: Install Flipt with the License
10677

10778
```bash
108-
mkdir -p .replicated
109-
echo "REPLICATED_LICENSE_ID=$LICENSE_ID" > .replicated/license.env
110-
```
111-
112-
### Step 4: Use License
79+
# Update chart dependencies first
80+
make update-deps
11381

114-
```bash
115-
source .replicated/license.env
116-
./scripts/install.sh
82+
# Install with the downloaded license file
83+
helm install flipt ./chart \
84+
--namespace flipt \
85+
--create-namespace \
86+
--set-file replicated.license=license.yaml \
87+
--wait \
88+
--timeout 15m
11789
```
11890

11991
## License Management
@@ -137,17 +109,7 @@ replicated customer ls --output json | \
137109

138110
### License Expiry
139111

140-
Development licenses may have expiration dates. If your license expires:
141-
142-
1. Delete the old license:
143-
```bash
144-
make clean-license
145-
```
146-
147-
2. Create a new one:
148-
```bash
149-
./scripts/setup-dev-license.sh
150-
```
112+
Development licenses may have expiration dates. If your license expires, create a new one following the steps above.
151113

152114
## Troubleshooting
153115

@@ -164,15 +126,20 @@ Your API token may be invalid or expired:
164126

165127
### Error: "license not found"
166128

167-
The license secret may not be created:
129+
The license may not be set correctly:
168130
```bash
169-
# Verify secret exists
170-
kubectl get secret replicated-license -n flipt
131+
# Check the current helm values
132+
helm get values flipt --namespace flipt
133+
134+
# Re-download and apply the license
135+
replicated customer download-license \
136+
--app flipt \
137+
--customer "$CUSTOMER_NAME" \
138+
--output license.yaml
171139

172-
# Recreate if missing
173-
kubectl create secret generic replicated-license \
174-
--from-literal=license="$REPLICATED_LICENSE_ID" \
175-
--namespace flipt
140+
helm upgrade flipt ./chart \
141+
--namespace flipt \
142+
--set-file replicated.license=license.yaml
176143
```
177144

178145
### Pod Still Crashing
@@ -193,37 +160,41 @@ For automated testing in CI/CD:
193160

194161
```yaml
195162
# Example GitHub Actions
196-
- name: Setup Replicated License
163+
- name: Create Dev Customer
197164
env:
198165
REPLICATED_API_TOKEN: ${{ secrets.REPLICATED_API_TOKEN }}
199166
run: |
200-
./scripts/setup-dev-license.sh
201-
source .replicated/license.env
167+
CUSTOMER_NAME="ci-${{ github.run_id }}"
168+
echo "CUSTOMER_NAME=$CUSTOMER_NAME" >> $GITHUB_ENV
169+
170+
replicated customer create \
171+
--app flipt \
172+
--name "$CUSTOMER_NAME" \
173+
--channel Unstable \
174+
--license-type dev
175+
176+
replicated customer download-license \
177+
--app flipt \
178+
--customer "$CUSTOMER_NAME" \
179+
--output license.yaml
202180
203181
- name: Install Flipt
204182
run: |
205-
source .replicated/license.env
206-
./scripts/install.sh
207-
208-
- name: Cleanup License
183+
make update-deps
184+
helm install flipt ./chart \
185+
--namespace flipt \
186+
--create-namespace \
187+
--set-file replicated.license=license.yaml \
188+
--wait --timeout 15m
189+
190+
- name: Cleanup Customer
209191
if: always()
192+
env:
193+
REPLICATED_API_TOKEN: ${{ secrets.REPLICATED_API_TOKEN }}
210194
run: |
211-
make clean-license
212-
```
213-
214-
## Alternative: Disable Replicated SDK
215-
216-
If you absolutely need to run without a license (not recommended for production testing):
217-
218-
```bash
219-
helm install flipt ./chart \
220-
--namespace flipt \
221-
--create-namespace \
222-
--set replicated.enabled=false
195+
replicated customer rm --customer "$CUSTOMER_NAME"
223196
```
224197
225-
**Note:** This disables all Replicated features including support bundles and preflight checks.
226-
227198
## Resources
228199
229200
- [Replicated CLI Documentation](https://docs.replicated.com/reference/replicated-cli)

0 commit comments

Comments
 (0)