Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 5 additions & 23 deletions applications/flipt/QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,23 @@ Get up and running with Flipt in 5 minutes.
- Helm 3.8+
- kubectl configured

## ⚠️ Prerequisites
## ⚠️ Replicated License

Before you begin, you need a **Replicated development license**:

```bash
# 1. Set your Replicated API token & License
export REPLICATED_API_TOKEN=<your-token>
export REPLICATED_LICENSE_ID=<your-license-id>
```

**Don't have a Replicated account?**

- Sign up at [vendor.replicated.com](https://vendor.replicated.com)
- See [Development License Guide](docs/DEVELOPMENT_LICENSE.md) for detailed instructions
The Replicated SDK requires a development license. See the [Development License Guide](docs/DEVELOPMENT_LICENSE.md) for how to create one.

## Option 1: Manual Helm Install on local machine

If you prefer to run commands manually:

```bash
# Step 1: Update chart dependencies (includes CloudNativePG operator)
cd chart
rm -f Chart.lock # Clean cached files
helm repo add flipt https://helm.flipt.io
helm repo add valkey https://valkey.io/valkey-helm/
helm repo add cnpg https://cloudnative-pg.github.io/charts
helm repo add replicated https://charts.replicated.com
helm repo update
helm dependency update
cd ..
make update-deps

# Step 2: Install Flipt (operator included automatically)
helm install flipt ./chart \
--namespace flipt \
--create-namespace \
--set-file replicated.license=license.yaml \
--wait \
--timeout 10m

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

```bash
export REPLICATED_APP=flipt
export REPLICATED_LICENSE_ID=<license-id>
export REPLICATED_API_TOKEN=<your-api-token>
make release
```

Expand Down
16 changes: 11 additions & 5 deletions applications/flipt/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,21 @@ Error: either license in the config file or integration license id must be speci

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

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

```bash
# Quick setup
export REPLICATED_API_TOKEN=your-token
export REPLICATED_LICENSE_ID=your-license-id
# Download your license (see docs/DEVELOPMENT_LICENSE.md for full setup)
replicated customer download-license \
--app flipt \
--customer "<your-customer-name>" \
--output license.yaml

helm upgrade flipt ./chart \
--namespace flipt \
--set-file replicated.license=license.yaml
```

**Detailed guide:** See [docs/DEVELOPMENT_LICENSE.md](docs/DEVELOPMENT_LICENSE.md)
**Need a license?** See [docs/DEVELOPMENT_LICENSE.md](docs/DEVELOPMENT_LICENSE.md)

---

Expand Down
149 changes: 60 additions & 89 deletions applications/flipt/docs/DEVELOPMENT_LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,6 @@ Flipt integrates with Replicated's SDK to provide:

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

## Quick Start

### Option 1: Automated Setup (Recommended)

```bash
# 1. Set up your Replicated API token
export REPLICATED_API_TOKEN=your-token-here

# 2. Run the setup script
./scripts/setup-dev-license.sh

# 3. Load the license
source .replicated/license.env

# 4. Install Flipt
./scripts/install.sh
```

### Option 2: Using Makefile

```bash
# Set up license and install in one command
export REPLICATED_API_TOKEN=your-token-here
make install-with-license
```

## Prerequisites

### 1. Replicated CLI
Expand Down Expand Up @@ -74,46 +48,44 @@ replicated version
export REPLICATED_API_TOKEN=your-token-here
```

Or add to your shell profile (~/.bashrc, ~/.zshrc):
```bash
echo 'export REPLICATED_API_TOKEN=your-token-here' >> ~/.zshrc
source ~/.zshrc
```

## Manual License Setup

If you prefer manual setup or need more control:
## Creating a Development License

### Step 1: Create a Development Customer

Pick a customer name you'll reuse in subsequent steps:

```bash
CUSTOMER_NAME="dev-$(whoami)"

replicated customer create \
--app flipt \
--name "dev-$(whoami)-$(date +%s)" \
--name "$CUSTOMER_NAME" \
--channel Unstable \
--license-type dev \
--output json > customer.json
--type dev
```

### Step 2: Extract License ID
### Step 2: Download the License

```bash
LICENSE_ID=$(jq -r '.id' customer.json)
echo "License ID: $LICENSE_ID"
replicated customer download-license \
--app flipt \
--customer "$CUSTOMER_NAME" \
--output license.yaml
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No doubt you will find this too but it wants to use the customer id instead of name:

Error: find customer "dev-jwilson": get customer by name: customer "dev-jwilson" is ambiguous, please use customer ID

```

### Step 3: Save License Configuration
### Step 3: Install Flipt with the License

```bash
mkdir -p .replicated
echo "REPLICATED_LICENSE_ID=$LICENSE_ID" > .replicated/license.env
```

### Step 4: Use License
# Update chart dependencies first
make update-deps

```bash
source .replicated/license.env
./scripts/install.sh
# Install with the downloaded license file
helm install flipt ./chart \
--namespace flipt \
--create-namespace \
--set-file replicated.license=license.yaml \
--wait \
--timeout 15m
```

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

### License Expiry

Development licenses may have expiration dates. If your license expires:

1. Delete the old license:
```bash
make clean-license
```

2. Create a new one:
```bash
./scripts/setup-dev-license.sh
```
Development licenses may have expiration dates. If your license expires, create a new one following the steps above.

## Troubleshooting

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

### Error: "license not found"

The license secret may not be created:
The license may not be set correctly:
```bash
# Verify secret exists
kubectl get secret replicated-license -n flipt
# Check the current helm values
helm get values flipt --namespace flipt

# Re-download and apply the license
replicated customer download-license \
--app flipt \
--customer "$CUSTOMER_NAME" \
--output license.yaml

# Recreate if missing
kubectl create secret generic replicated-license \
--from-literal=license="$REPLICATED_LICENSE_ID" \
--namespace flipt
helm upgrade flipt ./chart \
--namespace flipt \
--set-file replicated.license=license.yaml
```

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

```yaml
# Example GitHub Actions
- name: Setup Replicated License
- name: Create Dev Customer
env:
REPLICATED_API_TOKEN: ${{ secrets.REPLICATED_API_TOKEN }}
run: |
./scripts/setup-dev-license.sh
source .replicated/license.env
CUSTOMER_NAME="ci-${{ github.run_id }}"
echo "CUSTOMER_NAME=$CUSTOMER_NAME" >> $GITHUB_ENV

replicated customer create \
--app flipt \
--name "$CUSTOMER_NAME" \
--channel Unstable \
--license-type dev

replicated customer download-license \
--app flipt \
--customer "$CUSTOMER_NAME" \
--output license.yaml

- name: Install Flipt
run: |
source .replicated/license.env
./scripts/install.sh

- name: Cleanup License
make update-deps
helm install flipt ./chart \
--namespace flipt \
--create-namespace \
--set-file replicated.license=license.yaml \
--wait --timeout 15m
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worked as expected in my testing


- name: Cleanup Customer
if: always()
env:
REPLICATED_API_TOKEN: ${{ secrets.REPLICATED_API_TOKEN }}
run: |
make clean-license
```

## Alternative: Disable Replicated SDK

If you absolutely need to run without a license (not recommended for production testing):

```bash
helm install flipt ./chart \
--namespace flipt \
--create-namespace \
--set replicated.enabled=false
replicated customer rm --customer "$CUSTOMER_NAME"
```

**Note:** This disables all Replicated features including support bundles and preflight checks.

## Resources

- [Replicated CLI Documentation](https://docs.replicated.com/reference/replicated-cli)
Expand Down