|
| 1 | +--- |
| 2 | +title: Using Infrahub Enterprise |
| 3 | +--- |
| 4 | + |
| 5 | +This guide explains how to configure the demo environment to use Infrahub Enterprise edition instead of the Community edition. Enterprise edition provides additional features including increased performance, enhanced security, and enterprise support. |
| 6 | + |
| 7 | +## Understanding the editions |
| 8 | + |
| 9 | +Infrahub is available in two editions: |
| 10 | + |
| 11 | +- **Community edition** - The standard open-source version with core functionality |
| 12 | +- **Enterprise edition** - The commercial version with additional enterprise features |
| 13 | + |
| 14 | +The demo environment supports both editions and can be switched between them using a simple configuration change. |
| 15 | + |
| 16 | +## Configuration |
| 17 | + |
| 18 | +Edition selection is controlled by environment variables in the `.env` file at the root of the demo repository. The key variable is `INFRAHUB_ENTERPRISE`: |
| 19 | + |
| 20 | +```bash |
| 21 | +# Community edition (default) |
| 22 | +export INFRAHUB_ENTERPRISE="false" |
| 23 | + |
| 24 | +# Enterprise edition |
| 25 | +export INFRAHUB_ENTERPRISE="true" |
| 26 | +``` |
| 27 | + |
| 28 | +### Environment variables reference |
| 29 | + |
| 30 | +| Variable | Default | Description | |
| 31 | +|----------|---------|-------------| |
| 32 | +| `INFRAHUB_ENTERPRISE` | `false` | Set to `true` to use Enterprise edition | |
| 33 | +| `INFRAHUB_VERSION` | `stable` | Infrahub version to use (for example, `1.5.0b1`, `stable`, `develop`) | |
| 34 | +| `INFRAHUB_ADDRESS` | `http://localhost:8000` | Infrahub API address | |
| 35 | +| `INFRAHUB_API_TOKEN` | (demo token) | API authentication token | |
| 36 | + |
| 37 | +## Switching to Enterprise edition |
| 38 | + |
| 39 | +To switch from Community to Enterprise edition: |
| 40 | + |
| 41 | +### Step 1: update the configuration |
| 42 | + |
| 43 | +Edit the `.env` file in the root of the demo repository: |
| 44 | + |
| 45 | +```bash |
| 46 | +# Change this line from "false" to "true" |
| 47 | +export INFRAHUB_ENTERPRISE="true" |
| 48 | +``` |
| 49 | + |
| 50 | +### Step 2: source the environment file |
| 51 | + |
| 52 | +For the changes to take effect, source the environment file: |
| 53 | + |
| 54 | +```bash |
| 55 | +source .env |
| 56 | +``` |
| 57 | + |
| 58 | +### Step 3: verify the configuration |
| 59 | + |
| 60 | +Check that the Enterprise edition will be used: |
| 61 | + |
| 62 | +```bash |
| 63 | +uv run invoke info |
| 64 | +``` |
| 65 | + |
| 66 | +You should see output similar to: |
| 67 | + |
| 68 | +```bash |
| 69 | +Infrahub Edition: Enterprise |
| 70 | +Version: 1.5.0b1 |
| 71 | +Command: curl -s https://infrahub.opsmill.io/enterprise/1.5.0b1 | ... |
| 72 | +``` |
| 73 | + |
| 74 | +### Step 4: restart Infrahub |
| 75 | + |
| 76 | +To apply the change, destroy the existing environment and start fresh: |
| 77 | + |
| 78 | +```bash |
| 79 | +# Stop and remove all containers and volumes |
| 80 | +uv run invoke destroy |
| 81 | + |
| 82 | +# Start with Enterprise edition |
| 83 | +uv run invoke start |
| 84 | +``` |
| 85 | + |
| 86 | +:::tip |
| 87 | +The `destroy` command removes all containers and data volumes. If you have data you want to preserve, consider exporting it first using `infrahubctl`. |
| 88 | +::: |
| 89 | + |
| 90 | +### Step 5: reload your data |
| 91 | + |
| 92 | +After switching editions, you'll need to reload your schemas and data: |
| 93 | + |
| 94 | +```bash |
| 95 | +# Load schemas |
| 96 | +uv run infrahubctl schema load schemas |
| 97 | + |
| 98 | +# Load menu definitions |
| 99 | +uv run infrahubctl menu load menu |
| 100 | + |
| 101 | +# Load bootstrap data |
| 102 | +uv run infrahubctl object load objects/bootstrap |
| 103 | +``` |
| 104 | + |
| 105 | +Or use the bootstrap script: |
| 106 | + |
| 107 | +```bash |
| 108 | +./scripts/bootstrap.sh |
| 109 | +``` |
| 110 | + |
| 111 | +## Switching back to Community edition |
| 112 | + |
| 113 | +To switch from Enterprise back to Community edition, follow the same process but set `INFRAHUB_ENTERPRISE="false"`: |
| 114 | + |
| 115 | +```bash |
| 116 | +# Edit .env and change to "false" |
| 117 | +source .env |
| 118 | + |
| 119 | +# Verify configuration |
| 120 | +uv run invoke info |
| 121 | + |
| 122 | +# Restart |
| 123 | +uv run invoke destroy |
| 124 | +uv run invoke start |
| 125 | +``` |
| 126 | + |
| 127 | +## How it works |
| 128 | + |
| 129 | +When you run `uv run invoke start`, the system constructs the appropriate Docker Compose command based on your configuration: |
| 130 | + |
| 131 | +**Community edition URL pattern:** |
| 132 | + |
| 133 | +```bash |
| 134 | +https://infrahub.opsmill.io/{VERSION} |
| 135 | +``` |
| 136 | + |
| 137 | +**Enterprise edition URL pattern:** |
| 138 | + |
| 139 | +```bash |
| 140 | +https://infrahub.opsmill.io/enterprise/{VERSION} |
| 141 | +``` |
| 142 | + |
| 143 | +The invoke tasks in `tasks.py` automatically detect the `INFRAHUB_ENTERPRISE` setting and use the correct URL to download the appropriate Docker Compose configuration. |
| 144 | + |
| 145 | +## Checking your current edition |
| 146 | + |
| 147 | +At any time, you can check which edition you're configured to use: |
| 148 | + |
| 149 | +```bash |
| 150 | +source .env && uv run invoke info |
| 151 | +``` |
| 152 | + |
| 153 | +This displays: |
| 154 | + |
| 155 | +- The edition (Community or Enterprise) |
| 156 | +- The version being used |
| 157 | +- The full Docker Compose command |
| 158 | + |
| 159 | +## Enterprise features |
| 160 | + |
| 161 | +Enterprise edition includes additional capabilities not available in Community edition. For details on specific enterprise features, refer to the [Infrahub documentation](https://docs.infrahub.app). |
| 162 | + |
| 163 | +:::info |
| 164 | +Enterprise edition may require valid licensing credentials or enterprise authentication. Contact OpsMill for enterprise licensing information. |
| 165 | +::: |
| 166 | + |
| 167 | +## Troubleshooting |
| 168 | + |
| 169 | +### Changes not taking effect |
| 170 | + |
| 171 | +If you change the `INFRAHUB_ENTERPRISE` setting but the wrong edition starts: |
| 172 | + |
| 173 | +1. Ensure you sourced the `.env` file: `source .env` |
| 174 | +2. Verify the setting with `uv run invoke info` |
| 175 | +3. Make sure you destroyed the old environment before starting: `uv run invoke destroy` |
| 176 | + |
| 177 | +### Environment file not found |
| 178 | + |
| 179 | +If you get errors about missing environment variables: |
| 180 | + |
| 181 | +1. Ensure the `.env` file exists in the root of the demo repository |
| 182 | +2. Make sure you're running commands from the demo repository root |
| 183 | +3. Source the file explicitly: `source .env` |
| 184 | + |
| 185 | +### Version compatibility |
| 186 | + |
| 187 | +Ensure your `INFRAHUB_VERSION` setting is compatible with Enterprise edition. Some development or beta versions may not have Enterprise builds available. |
| 188 | + |
| 189 | +## Best practices |
| 190 | + |
| 191 | +- **Use explicit versions** - Instead of `stable`, specify exact versions like `1.5.0b1` for reproducible environments |
| 192 | +- **Document your choice** - Note which edition you're using in project documentation |
| 193 | +- **Test on Community first** - Validate your schemas and generators on Community edition before deploying to Enterprise |
| 194 | +- **Keep configurations in sync** - If working in a team, ensure everyone uses the same edition for consistency |
| 195 | + |
| 196 | +## Additional resources |
| 197 | + |
| 198 | +- [Infrahub documentation](https://docs.infrahub.app) |
| 199 | +- [OpsMill website](https://opsmill.com) |
| 200 | +- [Enterprise edition details](https://opsmill.com/pricing) |
0 commit comments