diff --git a/README.md b/README.md index b981ced6d..9aac612ff 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,8 @@ functionality: - `DEPLOY_KERNEL_URL` and `DEPLOY_RAMDISK_URL` provide the default IPA kernel and initramfs images. If they're not set, the images from IPA downloader are used (if present). +- `IRONIC_JSON_RPC_PORT` - port used by the ironic json-rpc service (default to + 6189). The following mountpoints can be passed in to customize run-time functionality: diff --git a/ironic-config/ironic.conf.j2 b/ironic-config/ironic.conf.j2 index 7a0a728f6..d9947e6bf 100644 --- a/ironic-config/ironic.conf.j2 +++ b/ironic-config/ironic.conf.j2 @@ -182,6 +182,7 @@ cipher_suite_versions = 3,17 auth_strategy = http_basic http_basic_auth_user_file = {{ env.IRONIC_RPC_HTPASSWD_FILE }} host_ip = {% if env.LISTEN_ALL_INTERFACES | lower == "true" %}::{% else %}{{ env.IRONIC_IP }}{% endif %} +port = {{ env.IRONIC_JSON_RPC_PORT }} {% if env.IRONIC_TLS_SETUP == "true" %} use_ssl = true cafile = {{ env.IRONIC_CACERT_FILE }} diff --git a/scripts/ironic-common.sh b/scripts/ironic-common.sh index 6349a366f..bf0ccf59f 100644 --- a/scripts/ironic-common.sh +++ b/scripts/ironic-common.sh @@ -24,6 +24,9 @@ export IRONIC_TMP_DATA_DIR="${CUSTOM_DATA_DIR}/tmp" export PROBE_CONF_DIR="${CUSTOM_CONFIG_DIR}/probes" export HTTP_PORT=${HTTP_PORT:-80} +# NOTE(elfosardo): the default port for json_rpc in ironic is 8089, but +# we need to use a different port to avoid conflicts with other services +export IRONIC_JSON_RPC_PORT=${IRONIC_JSON_RPC_PORT:-6189} mkdir -p "${IRONIC_CONF_DIR}" "${PROBE_CONF_DIR}" "${HTTPD_CONF_DIR}" \ "${HTTPD_CONF_DIR_D}" "${DNSMASQ_CONF_DIR}" "${DNSMASQ_TEMP_DIR}" \