Docker
Flex Docker images are hosted at Docker Hub.
To connect the latest Flex Docker image to a Flink cluster:
- Get a Community or Free trial license. See: Trials and Licenses.
- Create a configuration file (
config.env
) that contains your connection, license, and feature variables. - Start a Docker container using the appropriate Flex image.
Start a Flex instance
- Community
- Enterprise
Below is a sample config.env
file that defines your Flink connection and Flex instance settings. Make sure to include valid license details from your license email. For a full list of supported options, see the environment variables reference.
## Name your Flex installation (this appears in the UI)
FLINK_ENVIRONMENT_NAME=Trade Book (Staging)
## The Flink REST API to connect to:
FLINK_REST_URL=http://jobmanager:8081
## Your license details (Required).
## These parameters can be cut/paste from your license email
LICENSE_ID=1c99v4-f690-4a4f-b144-73de2369444a
LICENSE_CODE=FLEX_COMMUNITY
LICENSEE=My Corp
LICENSE_EXPIRY=2020-09-05
LICENSE_SIGNATURE=15CFFF969111DB6DCA142B6F1E0065F94A614251B80128D52C2CD45993A021AE10E90F57B90FF76CC1B992C16E54BCF1CBE7E5EE3124B3E585BE133774836A6EBB51B55E67EF60F4A435EBEC9F07A26CEABDCF6E3CF4137A33201E7662AF1F7986E57341E0EAEB884BBF320C348D62679F521259DAD1E03F6F79DB53D83CD41B
With your configuration file in place, start Flex using the following command:
docker run -p 3000:3000 --env-file ./config.env -m 2G factorhouse/flex-ce:latest
Once running, Flex will be available at http://localhost:3000
.
The following is a sample config.env
file used to configure Flex. It defines your Kafka cluster connection, license details, and optional feature flags. For a full list of supported options, see the environment variables reference.
## Name your Flex installation (this appears in the UI)
FLINK_ENVIRONMENT_NAME=Trade Book (Staging)
## The Flink REST API to connect to:
FLINK_REST_URL=http://jobmanager:8081
## Your license details (Required).
## These parameters can be cut/paste from your license email
LICENSE_ID=1c99v4-f690-4a4f-b144-73de2369444a
LICENSE_CODE=TRIAL_30D
LICENSEE=My Corp
LICENSE_EXPIRY=2020-09-05
LICENSE_SIGNATURE=15CFFF969111DB6DCA142B6F1E0065F94A614251B80128D52C2CD45993A021AE10E90F57B90FF76CC1B992C16E54BCF1CBE7E5EE3124B3E585BE133774836A6EBB51B55E67EF60F4A435EBEC9F07A26CEABDCF6E3CF4137A33201E7662AF1F7986E57341E0EAEB884BBF320C348D62679F521259DAD1E03F6F79DB53D83CD41B
## Additional Flex Feature Flags (See: RBAC for per user controls):
FLINK_ENVIRONMENT_NAME=Trade Book (Staging)
## Flex Feature Flags (See: RBAC for per user controls):
## Allow users to submit+upload jobs
ALLOW_FLINK_SUBMIT=true
## Allow users to terminate Flink jobs
ALLOW_FLINK_JOB_TERMINATE=true
## Allow users to delete Flink JARs
ALLOW_FLINK_JAR_DELETE=true
## Allow users to edit Flink jobs (configuration, snapshotting etc)
ALLOW_FLINK_JOB_EDIT=true
## ... etc (see guide for more configuration flags).
Start Flex with the configuration file using the command below:
docker run -p 3000:3000 --env-file ./config.env -m 2G factorhouse/flex:latest
After the container starts, Flex will be accessible at http://localhost:3000
.
Accessing files on the host machine
Sometimes Flex needs access to files from the host machine—for example:
- RBAC YAML configuration
- Keystore or Truststore files
- Metadata.xml for SSO integration
You can expose these files to the container using a volume mount:
docker run --volume="$PWD/config:/config" -p 3000:3000 \
--env-file ./config.env -m 4G factorhouse/flex:latest
In config.env
, reference the files using their mounted path:
SSL_TRUSTSTORE_LOCATION=/config/ssl/truststore.jks
Connect Flink within Docker
To connect Flex with a Flink cluster running inside Docker, it's recommended to use a dedicated Docker network. This allows containers to reference each other by hostname.
## Create a docker network to be shared
docker network create factorhouse
## Start a Flink job manager
docker run -d -p 8081:8081 --hostname jobmanager --network factorhouse \
-v ./flink-conf.yaml:/opt/flink/conf/flink-conf.yaml:ro \
flink:1.20.1
## Start a Flex instance
docker run -d -p 3000:3000 --network factorhouse \
--env-file=./config.env \
factorhouse/flex:latest
Make sure to include FLINK_REST_URL=http://jobmanager:8081
in your config.env
file so Flex can connect to the Kafka broker using the internal Docker hostname.