Litmus Edge Docker Deployment and Auto-Activation
8 min
auto activation allows you to deploy litmus edge on docker without any manual ui steps by passing environment variables as command line arguments when you run the docker container, litmus edge automatically connects to litmus edge manager (lem), receives a license, accepts the eula, and applies a configuration template this eliminates the need to manually activate each litmus edge instance through the web interface after deployment the following image shows the litmus edge manager ui for providing an activation code and url why auto activation matters auto activation is designed for teams that need to deploy litmus edge at scale or on demand it supports two primary scenarios mass deployment automate the deployment of many litmus edge instances without touching each one individually sandbox environments quickly spin up litmus edge instances for testing or development how auto activation works at container startup, litmus edge reads environment variables passed via docker run if auto activate container=true and accept eula=true are present, litmus edge initiates an activation request to the lem url specified by activation url , using the activation code to identify and authenticate the instance if component config is provided, litmus edge reads all activation configuration from a base64 encoded json payload and ignores all other environment variables upon a successful activation request, lem validates the activation code issues a license to the litmus edge instance applies system configurations, devicehub, flows, connectors, and analytics from an associated template what happens during activation the docker container starts with the required environment variables litmus edge detects auto activate container=true and begins the auto activation sequence if ca cert is provided, that certificate is installed otherwise, litmus edge downloads the certificate from lem litmus edge sends an activation request to lem using activation url and activation code in litmus edge manager, an administrator approves the activation request the eula is acknowledged automatically via accept eula=true activation events are recorded in logs and the system environment variables variable description example value required auto activate container set to true to enable auto activation true required accept eula accepts the end user license agreement must be true true required activation url url endpoint for the lem "https //lem production" required activation code activation code "sxzqe dnk6w yha32 td36n ksawy" required ca cert lem ca certificate when provided, this certificate is installed instead of downloading one from lem protects against activating to a lem with the wrong certificate " begin certificate miidmzc end certificate " optional component config passes all variables in a base64 encoded json payload when specified, all other environment variables are ignored "eyjbvvrpx0fdvel " optional deploying with auto activation you can deploy in two ways deploy either by specifying variables directly in the command line or by passing variables in a json payload deploy with individual variables pass each activation variable separately in the docker run command docker run rm name \<le> d \\ \ sysctl net ipv6 conf all disable ipv6=0 \\ \ cap add=net admin \\ p 8443 443 \\ e auto activate container=true \\ e accept eula=true \\ e activation url="https //development lem" \\ e activation code="5ln53 rrjym nxes9 j35l6 vnsc5" \\ litmusedge std docker 4 04 0 deploy using component config instead of passing variables individually, encode all variables in a base64 encoded json payload and pass them using component config when component config is present, all other environment variables are ignored the json payload before encoding { "auto activate container" true, "accept eula" true, "activation url" "https //sales em la2 space", "activation code" "5ln53 rrjym nxes9 j35l6 vnsc5", "ca cert" " begin certificate miidmzccahugawibagiupgcf448zrbswhvtatffhb+rihw4wd… …mc73if5acwmaxfpueoggjzeyymvkbj6r2byhvphha== end certificate " } pass the base64 encoded payload in the docker run command docker run rm name le d \\ \ cap add=net admin \\ p 8443 443 \\ e component config="eyjbvvrpx0fdvelwqvrfx0nptlrbsu5fuii6dhj1zswiqundrvbux0vvteeionrydwusikfdvelwqvrjt05fvvjmijoiahr0chm6ly8xmc4xny4xmc4ymtyilcjbq1rjvkfusu9ox0npreuioii1q1fnny1lsku5ti1qrvlhuy1yt0vxvs1nntdotij9" \\ litmusedge std docker\ latest