diff --git a/README.md b/README.md index cba0881bb..3fbbae76f 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,8 @@ functionality: - `PROVISIONING_INTERFACE` - interface to use for ironic, dnsmasq(dhcpd) and httpd (default provisioning, this is calculated if the above `PROVISIONING_MACS` is provided) +- `PROVISIONING_IP` - the specific IP to use (instead of calculating it based on + the `PROVISIONING_INTERFACE`) - `DNSMASQ_EXCEPT_INTERFACE` - interfaces to exclude when providing DHCP address (default `lo`) - `HTTP_PORT` - port used by http server (default `80`) @@ -82,6 +84,14 @@ functionality: - `IRONIC_CONDUCTOR_HOST` - Host name of the current conductor (only makes sense to change for a multinode setup). Defaults to the IP address used for provisioning. +- `IRONIC_EXTERNAL_IP` - Optional external IP if Ironic is not accessible on + `PROVISIONING_IP`. +- `IRONIC_EXTERNAL_CALLBACK_URL` - Override Ironic's external callback URL. + Defaults to use `IRONIC_EXTERNAL_IP` if available. +- `IRONIC_EXTERNAL_HTTP_URL` - Override Ironic's external http URL. Defaults to + use `IRONIC_EXTERNAL_IP` if available. +- `IRONIC_INSPECTOR_CALLBACK_ENDPOINT_OVERRIDE` - Override Inspector's callback + URL. Defaults to use `IRONIC_EXTERNAL_IP` if available. The ironic configuration can be overridden by various environment variables. The following can serve as an example: diff --git a/scripts/configure-ironic.sh b/scripts/configure-ironic.sh index 6e36113a0..2fe5e9dff 100755 --- a/scripts/configure-ironic.sh +++ b/scripts/configure-ironic.sh @@ -61,13 +61,13 @@ export IRONIC_BASE_URL=${IRONIC_BASE_URL:-"${IRONIC_SCHEME}://${IRONIC_URL_HOST} export IRONIC_INSPECTOR_BASE_URL=${IRONIC_INSPECTOR_BASE_URL:-"${IRONIC_INSPECTOR_SCHEME}://${IRONIC_URL_HOST}:${IRONIC_INSPECTOR_ACCESS_PORT}"} if [[ -n "$IRONIC_EXTERNAL_IP" ]]; then - export IRONIC_EXTERNAL_CALLBACK_URL="${IRONIC_SCHEME}://${IRONIC_EXTERNAL_IP}:${IRONIC_ACCESS_PORT}" + export IRONIC_EXTERNAL_CALLBACK_URL=${IRONIC_EXTERNAL_CALLBACK_URL:-"${IRONIC_SCHEME}://${IRONIC_EXTERNAL_IP}:${IRONIC_ACCESS_PORT}"} if [[ "$IRONIC_VMEDIA_TLS_SETUP" == "true" ]]; then - export IRONIC_EXTERNAL_HTTP_URL="https://${IRONIC_EXTERNAL_IP}:${VMEDIA_TLS_PORT}" + export IRONIC_EXTERNAL_HTTP_URL=${IRONIC_EXTERNAL_HTTP_URL:-"https://${IRONIC_EXTERNAL_IP}:${VMEDIA_TLS_PORT}"} else - export IRONIC_EXTERNAL_HTTP_URL="http://${IRONIC_EXTERNAL_IP}:${HTTP_PORT}" + export IRONIC_EXTERNAL_HTTP_URL=${IRONIC_EXTERNAL_HTTP_URL:-"http://${IRONIC_EXTERNAL_IP}:${HTTP_PORT}"} fi - export IRONIC_INSPECTOR_CALLBACK_ENDPOINT_OVERRIDE="https://${IRONIC_EXTERNAL_IP}:${IRONIC_INSPECTOR_ACCESS_PORT}" + export IRONIC_INSPECTOR_CALLBACK_ENDPOINT_OVERRIDE=${IRONIC_INSPECTOR_CALLBACK_ENDPOINT_OVERRIDE:-"https://${IRONIC_EXTERNAL_IP}:${IRONIC_INSPECTOR_ACCESS_PORT}"} fi IMAGE_CACHE_PREFIX=/shared/html/images/ironic-python-agent