|
| 1 | +--- |
| 2 | +title: Install and run InfluxDB v1 Enterprise with Docker |
| 3 | +description: Install and run InfluxDB v1 Enterprise using Docker images for meta nodes and data nodes. |
| 4 | +menu: |
| 5 | + enterprise_influxdb_v1: |
| 6 | + name: Install with Docker |
| 7 | + weight: 30 |
| 8 | + parent: Install |
| 9 | +related: |
| 10 | + - /enterprise_influxdb/v1/introduction/installation/docker/docker-troubleshooting/ |
| 11 | +--- |
| 12 | + |
| 13 | +InfluxDB v1 Enterprise provides Docker images for both meta nodes and data nodes to simplify cluster deployment and management. |
| 14 | +Using Docker allows you to quickly set up and run InfluxDB Enterprise clusters with consistent configurations. |
| 15 | + |
| 16 | +> [!Important] |
| 17 | +> #### Enterprise license required |
| 18 | +> You must have a valid license to run InfluxDB Enterprise. |
| 19 | +> Contact <sales@influxdata.com> for licensing information or obtain a 14-day demo license via the [InfluxDB Enterprise portal](https://portal.influxdata.com/users/new). |
| 20 | +
|
| 21 | +## Docker image variants |
| 22 | + |
| 23 | +InfluxDB Enterprise provides two specialized Docker images: |
| 24 | + |
| 25 | +- **`influxdb:meta`**: Enterprise meta node package for clustering |
| 26 | +- **`influxdb:data`**: Enterprise data node package for clustering |
| 27 | + |
| 28 | +## Requirements |
| 29 | + |
| 30 | +- [Docker](https://docs.docker.com/get-docker/) installed and running |
| 31 | +- Valid [InfluxData license key](#enterprise-license-required) |
| 32 | +- Network connectivity between nodes |
| 33 | +- At least 3 meta nodes (odd number recommended) |
| 34 | +- At least 2 data nodes |
| 35 | + |
| 36 | +## Set up an InfluxDB Enterprise cluster with Docker |
| 37 | + |
| 38 | +### 1. Create a Docker network |
| 39 | + |
| 40 | +Create a custom Docker network to allow communication between meta and data nodes: |
| 41 | + |
| 42 | +```bash |
| 43 | +docker network create influxdb |
| 44 | +``` |
| 45 | + |
| 46 | +### 2. Start meta nodes |
| 47 | + |
| 48 | +Start three meta nodes using the `influxdb:meta` image. |
| 49 | +Each meta node requires a unique hostname and the Enterprise license key: |
| 50 | + |
| 51 | +```bash |
| 52 | +# Start first meta node |
| 53 | +docker run -d \ |
| 54 | + --name=influxdb-meta-0 \ |
| 55 | + --network=influxdb \ |
| 56 | + -h influxdb-meta-0 \ |
| 57 | + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ |
| 58 | + influxdb:meta |
| 59 | + |
| 60 | +# Start second meta node |
| 61 | +docker run -d \ |
| 62 | + --name=influxdb-meta-1 \ |
| 63 | + --network=influxdb \ |
| 64 | + -h influxdb-meta-1 \ |
| 65 | + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ |
| 66 | + influxdb:meta |
| 67 | + |
| 68 | +# Start third meta node |
| 69 | +docker run -d \ |
| 70 | + --name=influxdb-meta-2 \ |
| 71 | + --network=influxdb \ |
| 72 | + -h influxdb-meta-2 \ |
| 73 | + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ |
| 74 | + influxdb:meta |
| 75 | +``` |
| 76 | + |
| 77 | +### 3. Configure meta nodes to know each other |
| 78 | + |
| 79 | +From the first meta node, add the other meta nodes to the cluster: |
| 80 | + |
| 81 | +```bash |
| 82 | +# Add the second meta node |
| 83 | +docker exec influxdb-meta-0 \ |
| 84 | + influxd-ctl add-meta influxdb-meta-1:8091 |
| 85 | + |
| 86 | +# Add the third meta node |
| 87 | +docker exec influxdb-meta-0 \ |
| 88 | + influxd-ctl add-meta influxdb-meta-2:8091 |
| 89 | +``` |
| 90 | + |
| 91 | +### 4. Start data nodes |
| 92 | + |
| 93 | +Start two or more data nodes using the `influxdb:data` image: |
| 94 | + |
| 95 | +```bash |
| 96 | +# Start first data node |
| 97 | +docker run -d \ |
| 98 | + --name=influxdb-data-0 \ |
| 99 | + --network=influxdb \ |
| 100 | + -h influxdb-data-0 \ |
| 101 | + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ |
| 102 | + influxdb:data |
| 103 | + |
| 104 | +# Start second data node |
| 105 | +docker run -d \ |
| 106 | + --name=influxdb-data-1 \ |
| 107 | + --network=influxdb \ |
| 108 | + -h influxdb-data-1 \ |
| 109 | + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ |
| 110 | + influxdb:data |
| 111 | +``` |
| 112 | + |
| 113 | +### 5. Add data nodes to the cluster |
| 114 | + |
| 115 | +From the first meta node, register each data node with the cluster: |
| 116 | + |
| 117 | +```bash |
| 118 | +# Add first data node |
| 119 | +docker exec influxdb-meta-0 \ |
| 120 | + influxd-ctl add-data influxdb-data-0:8088 |
| 121 | + |
| 122 | +# Add second data node |
| 123 | +docker exec influxdb-meta-0 \ |
| 124 | + influxd-ctl add-data influxdb-data-1:8088 |
| 125 | +``` |
| 126 | + |
| 127 | +### 6. Verify the cluster |
| 128 | + |
| 129 | +Check that all nodes are properly added to the cluster: |
| 130 | + |
| 131 | +```bash |
| 132 | +docker exec influxdb-meta-0 influxd-ctl show |
| 133 | +``` |
| 134 | + |
| 135 | +Expected output: |
| 136 | +``` |
| 137 | +Data Nodes |
| 138 | +========== |
| 139 | +ID TCP Address Version |
| 140 | +4 influxdb-data-0:8088 1.x.x-cX.X.X |
| 141 | +5 influxdb-data-1:8088 1.x.x-cX.X.X |
| 142 | +
|
| 143 | +Meta Nodes |
| 144 | +========== |
| 145 | +TCP Address Version |
| 146 | +influxdb-meta-0:8091 1.x.x-cX.X.X |
| 147 | +influxdb-meta-1:8091 1.x.x-cX.X.X |
| 148 | +influxdb-meta-2:8091 1.x.x-cX.X.X |
| 149 | +``` |
| 150 | + |
| 151 | +## Configuration options |
| 152 | + |
| 153 | +### Using environment variables |
| 154 | + |
| 155 | +You can configure {{% product-name %}} using environment variables with the format `INFLUXDB_<SECTION>_<NAME>`. |
| 156 | + |
| 157 | +Common environment variables: |
| 158 | +- `INFLUXDB_REPORTING_DISABLED=true` |
| 159 | +- `INFLUXDB_META_DIR=/path/to/metadir` |
| 160 | +- `INFLUXDB_ENTERPRISE_REGISTRATION_ENABLED=true` |
| 161 | +- `INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key` |
| 162 | + |
| 163 | +For all available environment variables, see how to [Configure Enterprise](/enterprise_influxdb/v1/administration/configure/). |
| 164 | + |
| 165 | +### Using configuration files |
| 166 | + |
| 167 | +You can also mount custom configuration files: |
| 168 | + |
| 169 | +```bash |
| 170 | +# Mount custom meta configuration |
| 171 | +docker run -d \ |
| 172 | + --name=influxdb-meta-0 \ |
| 173 | + --network=influxdb \ |
| 174 | + -h influxdb-meta-0 \ |
| 175 | + -v /path/to/influxdb-meta.conf:/etc/influxdb/influxdb-meta.conf \ |
| 176 | + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ |
| 177 | + influxdb:meta |
| 178 | + |
| 179 | +# Mount custom data configuration |
| 180 | +docker run -d \ |
| 181 | + --name=influxdb-data-0 \ |
| 182 | + --network=influxdb \ |
| 183 | + -h influxdb-data-0 \ |
| 184 | + -v /path/to/influxdb.conf:/etc/influxdb/influxdb.conf \ |
| 185 | + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ |
| 186 | + influxdb:data |
| 187 | +``` |
| 188 | + |
| 189 | +## Exposing ports |
| 190 | + |
| 191 | +To access your InfluxDB Enterprise cluster from outside Docker, expose the necessary ports: |
| 192 | + |
| 193 | +```bash |
| 194 | +# Data node with HTTP API port exposed |
| 195 | +docker run -d \ |
| 196 | + --name=influxdb-data-0 \ |
| 197 | + --network=influxdb \ |
| 198 | + -h influxdb-data-0 \ |
| 199 | + -p 8086:8086 \ |
| 200 | + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ |
| 201 | + influxdb:data |
| 202 | +``` |
| 203 | + |
| 204 | +## Persistent data storage |
| 205 | + |
| 206 | +To persist data beyond container lifecycles, mount volumes: |
| 207 | + |
| 208 | +```bash |
| 209 | +# Meta node with persistent storage |
| 210 | +docker run -d \ |
| 211 | + --name=influxdb-meta-0 \ |
| 212 | + --network=influxdb \ |
| 213 | + -h influxdb-meta-0 \ |
| 214 | + -v influxdb-meta-0-data:/var/lib/influxdb \ |
| 215 | + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ |
| 216 | + influxdb:meta |
| 217 | + |
| 218 | +# Data node with persistent storage |
| 219 | +docker run -d \ |
| 220 | + --name=influxdb-data-0 \ |
| 221 | + --network=influxdb \ |
| 222 | + -h influxdb-data-0 \ |
| 223 | + -v influxdb-data-0-data:/var/lib/influxdb \ |
| 224 | + -e INFLUXDB_ENTERPRISE_LICENSE_KEY=your-license-key \ |
| 225 | + influxdb:data |
| 226 | +``` |
| 227 | + |
| 228 | +## Next steps |
| 229 | + |
| 230 | +Once your InfluxDB Enterprise cluster is running: |
| 231 | + |
| 232 | +1. [Set up authentication and authorization](/enterprise_influxdb/v1/administration/configure/security/authentication/) for your cluster. |
| 233 | +2. [Enable TLS encryption](/enterprise_influxdb/v1/guides/enable-tls/) for secure communication. |
| 234 | +3. [Install and set up Chronograf](/enterprise_influxdb/v1/introduction/installation/chrono_install) for cluster management and visualization. |
| 235 | +4. Configure your load balancer to send client traffic to data nodes. For more information, see [Data node installation](/enterprise_influxdb/v1/introduction/installation/data_node_installation/). |
| 236 | +5. [Monitor your cluster](/enterprise_influxdb/v1/administration/monitor/) for performance and reliability. |
| 237 | +6. [Write data with the InfluxDB API](/enterprise_influxdb/v1/guides/write_data/). |
| 238 | +7. [Query data with the InfluxDB API](/enterprise_influxdb/v1/guides/query_data/). |
0 commit comments