Skip to content

Commit

Permalink
Merge pull request #2164 from openziti/2163-docker-ziti-router-bootst…
Browse files Browse the repository at this point in the history
…rap-fabric-router-wrong-commands

handle generating fabric router config
  • Loading branch information
qrkourier authored Jun 26, 2024
2 parents 9dc574f + 2b7649d commit 691e6d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions dist/dist-packages/linux/openziti-router/bootstrap.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@ function makeConfig() {

# build config command
command=("ziti create config router ${ZITI_ROUTER_TYPE}" \
"--tunnelerMode ${ZITI_ROUTER_MODE}" \
"--routerName ${ZITI_ROUTER_NAME}" \
"--output ${ZITI_ROUTER_CONFIG_FILE}")
"--routerName ${ZITI_ROUTER_NAME}" \
"--output ${ZITI_ROUTER_CONFIG_FILE}")

# mode flag not present in fabric command
if [[ "${ZITI_ROUTER_TYPE}" == edge ]]; then
command+=("--tunnelerMode ${ZITI_ROUTER_MODE}")
fi

# check if ZITI_ROUTER_LAN_INTERFACE is specified and add --lanInterface flag accordingly
if [[ -n "${ZITI_ROUTER_LAN_INTERFACE}" ]]; then
if [[ -n "${ZITI_ROUTER_LAN_INTERFACE:-}" ]]; then
command+=("--lanInterface ${ZITI_ROUTER_LAN_INTERFACE}")
fi

Expand Down
2 changes: 1 addition & 1 deletion dist/docker-images/ziti-router/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ services:
ZITI_BOOTSTRAP_CONFIG: true # make config file from env vars and defaults if "true," overwrite if "force"; requires ZITI_BOOTSTRAP=true
ZITI_BOOTSTRAP_ENROLLMENT: true # enroll with controller if "true," overwrite if "force"; requires ZITI_BOOTSTRAP=true
ZITI_AUTO_RENEW_CERTS: true # renew certs every startup
ZITI_ROUTER_TYPE: edge # edge, fabric
ZITI_ROUTER_TYPE: ${ZITI_ROUTER_TYPE:-edge} # edge or fabric
command: run config.yml
ports:
# ensure this port matches the value of ZITI_ROUTER_PORT in the container
Expand Down

0 comments on commit 691e6d0

Please sign in to comment.