@@ -13,32 +13,6 @@ Flipt integrates with Replicated's SDK to provide:
1313
1414The 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+
9060replicated 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