Merge "Hostname support"
This commit is contained in:
commit
5d6deea816
@ -87,13 +87,13 @@ Global Options
|
|||||||
Specify 'y' if you want to run OpenStack services in debug mode; otherwise, specify 'n'. ['y', 'n']
|
Specify 'y' if you want to run OpenStack services in debug mode; otherwise, specify 'n'. ['y', 'n']
|
||||||
|
|
||||||
**CONFIG_CONTROLLER_HOST**
|
**CONFIG_CONTROLLER_HOST**
|
||||||
IP address of the server on which to install OpenStack services specific to the controller role (for example, API servers or dashboard).
|
Server on which to install OpenStack services specific to the controller role (for example, API servers or dashboard).
|
||||||
|
|
||||||
**CONFIG_COMPUTE_HOSTS**
|
**CONFIG_COMPUTE_HOSTS**
|
||||||
List of IP addresses of the servers on which to install the Compute service.
|
List the servers on which to install the Compute service.
|
||||||
|
|
||||||
**CONFIG_NETWORK_HOSTS**
|
**CONFIG_NETWORK_HOSTS**
|
||||||
List of IP addresses of the server on which to install the network service such as Compute networking (nova network) or OpenStack Networking (neutron).
|
List of servers on which to install the network service such as Compute networking (nova network) or OpenStack Networking (neutron).
|
||||||
|
|
||||||
**CONFIG_VMWARE_BACKEND**
|
**CONFIG_VMWARE_BACKEND**
|
||||||
Specify 'y' if you want to use VMware vCenter as hypervisor and storage; otherwise, specify 'n'. ['y', 'n']
|
Specify 'y' if you want to use VMware vCenter as hypervisor and storage; otherwise, specify 'n'. ['y', 'n']
|
||||||
@ -160,10 +160,10 @@ Global unsupported options
|
|||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
**CONFIG_STORAGE_HOST**
|
**CONFIG_STORAGE_HOST**
|
||||||
(Unsupported!) IP address of the server on which to install OpenStack services specific to storage servers such as Image or Block Storage services.
|
(Unsupported!) Server on which to install OpenStack services specific to storage servers such as Image or Block Storage services.
|
||||||
|
|
||||||
**CONFIG_SAHARA_HOST**
|
**CONFIG_SAHARA_HOST**
|
||||||
(Unsupported!) IP address of the server on which to install OpenStack services specific to OpenStack Data Processing (sahara).
|
(Unsupported!) Server on which to install OpenStack services specific to OpenStack Data Processing (sahara).
|
||||||
|
|
||||||
Server Prepare Configs
|
Server Prepare Configs
|
||||||
-----------------------
|
-----------------------
|
||||||
|
@ -20,6 +20,7 @@ except ImportError:
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
import socket
|
import socket
|
||||||
|
import logging
|
||||||
from ..exceptions import NetworkError
|
from ..exceptions import NetworkError
|
||||||
from .shell import execute
|
from .shell import execute
|
||||||
from .shell import ScriptRunner
|
from .shell import ScriptRunner
|
||||||
@ -57,23 +58,34 @@ def get_localhost_ip():
|
|||||||
'nameserver correctly.')
|
'nameserver correctly.')
|
||||||
|
|
||||||
|
|
||||||
|
_host_cache = {}
|
||||||
|
|
||||||
|
|
||||||
def host2ip(hostname, allow_localhost=False):
|
def host2ip(hostname, allow_localhost=False):
|
||||||
"""
|
"""
|
||||||
Converts given hostname to IP address. Raises NetworkError
|
Converts given hostname to IP address. Raises NetworkError
|
||||||
if conversion failed.
|
if conversion failed.
|
||||||
"""
|
"""
|
||||||
|
key = '{}:{}'.format(hostname, allow_localhost)
|
||||||
|
if key in _host_cache:
|
||||||
|
return _host_cache[key]
|
||||||
try:
|
try:
|
||||||
ip_list = socket.gethostbyaddr(hostname)[2]
|
ip_list = list(sockets[4][0] for sockets in
|
||||||
|
socket.getaddrinfo(hostname, 22, 0, 0, socket.IPPROTO_TCP))
|
||||||
|
|
||||||
if allow_localhost:
|
if allow_localhost:
|
||||||
return ip_list[0]
|
ip = ip_list[0]
|
||||||
else:
|
else:
|
||||||
local_ips = ('127.0.0.1', '::1')
|
routable = [ip for ip in ip_list if ip not in ('127.0.0.1', '::1')]
|
||||||
for ip in ip_list:
|
if not routable:
|
||||||
if ip not in local_ips:
|
raise NameError("Host %s is not routable, please fix"
|
||||||
break
|
"your /etc/hosts", host)
|
||||||
else:
|
if len(routable) > 1:
|
||||||
raise NameError()
|
logging.warn("Multiple IPs for host detected!")
|
||||||
return ip
|
ip = routable[0]
|
||||||
|
|
||||||
|
_host_cache[key] = ip
|
||||||
|
return ip
|
||||||
except NameError:
|
except NameError:
|
||||||
# given hostname is localhost, return appropriate IP address
|
# given hostname is localhost, return appropriate IP address
|
||||||
return get_localhost_ip()
|
return get_localhost_ip()
|
||||||
@ -92,7 +104,7 @@ def is_ipv6(host):
|
|||||||
try:
|
try:
|
||||||
return netaddr.IPAddress(host).version == 6
|
return netaddr.IPAddress(host).version == 6
|
||||||
except netaddr.core.AddrFormatError:
|
except netaddr.core.AddrFormatError:
|
||||||
# Most probably a hostname, no need for bracket everywhere.
|
# Most probably a hostname
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
@ -105,7 +117,8 @@ def is_ipv4(host):
|
|||||||
try:
|
try:
|
||||||
return netaddr.IPAddress(host).version == 4
|
return netaddr.IPAddress(host).version == 4
|
||||||
except netaddr.core.AddrFormatError:
|
except netaddr.core.AddrFormatError:
|
||||||
return True
|
# Most probably a hostname
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
def force_ip(host, allow_localhost=False):
|
def force_ip(host, allow_localhost=False):
|
||||||
|
@ -254,10 +254,9 @@ def touch_port(host, port):
|
|||||||
key = "%s:%d" % (host, port)
|
key = "%s:%d" % (host, port)
|
||||||
if key in _tested_ports:
|
if key in _tested_ports:
|
||||||
return
|
return
|
||||||
s = socket.socket(validate_ip(host), socket.SOCK_STREAM)
|
sock = socket.create_connection((host, port))
|
||||||
s.connect((host, port))
|
sock.shutdown(socket.SHUT_RDWR)
|
||||||
s.shutdown(socket.SHUT_RDWR)
|
sock.close()
|
||||||
s.close()
|
|
||||||
_tested_ports.append(key)
|
_tested_ports.append(key)
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ def initConfig(controller):
|
|||||||
"DEPRECATES": ['CONFIG_AMQP_SERVER']},
|
"DEPRECATES": ['CONFIG_AMQP_SERVER']},
|
||||||
|
|
||||||
{"CMD_OPTION": "amqp-host",
|
{"CMD_OPTION": "amqp-host",
|
||||||
"PROMPT": "Enter the IP address of the AMQP service",
|
"PROMPT": "Enter the host for the AMQP service",
|
||||||
"OPTION_LIST": [],
|
"OPTION_LIST": [],
|
||||||
"VALIDATORS": [validators.validate_ssh],
|
"VALIDATORS": [validators.validate_ssh],
|
||||||
"DEFAULT_VALUE": utils.get_localhost_ip(),
|
"DEFAULT_VALUE": utils.get_localhost_ip(),
|
||||||
|
@ -79,7 +79,7 @@ def initConfig(controller):
|
|||||||
|
|
||||||
"MONGODB": [
|
"MONGODB": [
|
||||||
{"CMD_OPTION": "mongodb-host",
|
{"CMD_OPTION": "mongodb-host",
|
||||||
"PROMPT": "Enter the IP address of the MongoDB server",
|
"PROMPT": "Enter the host for the MongoDB server",
|
||||||
"OPTION_LIST": [],
|
"OPTION_LIST": [],
|
||||||
"VALIDATORS": [validators.validate_ssh],
|
"VALIDATORS": [validators.validate_ssh],
|
||||||
"DEFAULT_VALUE": utils.get_localhost_ip(),
|
"DEFAULT_VALUE": utils.get_localhost_ip(),
|
||||||
@ -92,7 +92,7 @@ def initConfig(controller):
|
|||||||
],
|
],
|
||||||
"REDIS": [
|
"REDIS": [
|
||||||
{"CMD_OPTION": "redis-master-host",
|
{"CMD_OPTION": "redis-master-host",
|
||||||
"PROMPT": "Enter the IP address of the redis master server",
|
"PROMPT": "Enter the host for the Redis master server",
|
||||||
"OPTION_LIST": [],
|
"OPTION_LIST": [],
|
||||||
"VALIDATORS": [validators.validate_ssh],
|
"VALIDATORS": [validators.validate_ssh],
|
||||||
"DEFAULT_VALUE": utils.get_localhost_ip(),
|
"DEFAULT_VALUE": utils.get_localhost_ip(),
|
||||||
@ -126,7 +126,7 @@ def initConfig(controller):
|
|||||||
"NEED_CONFIRM": False,
|
"NEED_CONFIRM": False,
|
||||||
"CONDITION": False},
|
"CONDITION": False},
|
||||||
{"CMD_OPTION": "redis-slaves",
|
{"CMD_OPTION": "redis-slaves",
|
||||||
"PROMPT": "Enter the IP addresses of the redis slave servers",
|
"PROMPT": "Enter the host for the redis slave servers",
|
||||||
"OPTION_LIST": [],
|
"OPTION_LIST": [],
|
||||||
"VALIDATORS": [validators.validate_multi_ssh],
|
"VALIDATORS": [validators.validate_multi_ssh],
|
||||||
"DEFAULT_VALUE": "",
|
"DEFAULT_VALUE": "",
|
||||||
@ -137,7 +137,7 @@ def initConfig(controller):
|
|||||||
"NEED_CONFIRM": False,
|
"NEED_CONFIRM": False,
|
||||||
"CONDITION": False},
|
"CONDITION": False},
|
||||||
{"CMD_OPTION": "redis-sentinels",
|
{"CMD_OPTION": "redis-sentinels",
|
||||||
"PROMPT": "Enter the IP addresses of the redis sentinel servers",
|
"PROMPT": "Enter the host for the redis sentinel servers",
|
||||||
"OPTION_LIST": [],
|
"OPTION_LIST": [],
|
||||||
"VALIDATORS": [validators.validate_multi_ssh],
|
"VALIDATORS": [validators.validate_multi_ssh],
|
||||||
"DEFAULT_VALUE": "",
|
"DEFAULT_VALUE": "",
|
||||||
|
@ -331,10 +331,9 @@ def initConfig(controller):
|
|||||||
|
|
||||||
{"CONF_NAME": "CONFIG_CONTROLLER_HOST",
|
{"CONF_NAME": "CONFIG_CONTROLLER_HOST",
|
||||||
"CMD_OPTION": "os-controller-host",
|
"CMD_OPTION": "os-controller-host",
|
||||||
"PROMPT": "Enter the IP address of the controller host",
|
"PROMPT": "Enter the controller host",
|
||||||
"OPTION_LIST": [],
|
"OPTION_LIST": [],
|
||||||
"VALIDATORS": [validators.validate_ip,
|
"VALIDATORS": [validators.validate_ssh],
|
||||||
validators.validate_ssh],
|
|
||||||
"DEFAULT_VALUE": utils.get_localhost_ip(),
|
"DEFAULT_VALUE": utils.get_localhost_ip(),
|
||||||
"MASK_INPUT": False,
|
"MASK_INPUT": False,
|
||||||
"LOOSE_VALIDATION": False,
|
"LOOSE_VALIDATION": False,
|
||||||
@ -360,13 +359,9 @@ def initConfig(controller):
|
|||||||
|
|
||||||
{"CONF_NAME": "CONFIG_COMPUTE_HOSTS",
|
{"CONF_NAME": "CONFIG_COMPUTE_HOSTS",
|
||||||
"CMD_OPTION": "os-compute-hosts",
|
"CMD_OPTION": "os-compute-hosts",
|
||||||
"PROMPT": (
|
"PROMPT": "Enter list of compute hosts",
|
||||||
"Enter list of IP addresses on which to install compute "
|
|
||||||
"service"
|
|
||||||
),
|
|
||||||
"OPTION_LIST": [],
|
"OPTION_LIST": [],
|
||||||
"VALIDATORS": [validators.validate_multi_ip,
|
"VALIDATORS": [validators.validate_multi_ssh],
|
||||||
validators.validate_multi_ssh],
|
|
||||||
"DEFAULT_VALUE": utils.get_localhost_ip(),
|
"DEFAULT_VALUE": utils.get_localhost_ip(),
|
||||||
"MASK_INPUT": False,
|
"MASK_INPUT": False,
|
||||||
"LOOSE_VALIDATION": False,
|
"LOOSE_VALIDATION": False,
|
||||||
@ -377,11 +372,9 @@ def initConfig(controller):
|
|||||||
|
|
||||||
{"CONF_NAME": "CONFIG_NETWORK_HOSTS",
|
{"CONF_NAME": "CONFIG_NETWORK_HOSTS",
|
||||||
"CMD_OPTION": "os-network-hosts",
|
"CMD_OPTION": "os-network-hosts",
|
||||||
"PROMPT": ("Enter list of IP addresses on which to install "
|
"PROMPT": "Enter list of network hosts",
|
||||||
"network service"),
|
|
||||||
"OPTION_LIST": [],
|
"OPTION_LIST": [],
|
||||||
"VALIDATORS": [validators.validate_multi_ip,
|
"VALIDATORS": [validators.validate_multi_ssh],
|
||||||
validators.validate_multi_ssh],
|
|
||||||
"DEFAULT_VALUE": utils.get_localhost_ip(),
|
"DEFAULT_VALUE": utils.get_localhost_ip(),
|
||||||
"MASK_INPUT": False,
|
"MASK_INPUT": False,
|
||||||
"LOOSE_VALIDATION": False,
|
"LOOSE_VALIDATION": False,
|
||||||
@ -504,10 +497,9 @@ def initConfig(controller):
|
|||||||
"UNSUPPORTED": [
|
"UNSUPPORTED": [
|
||||||
{"CONF_NAME": "CONFIG_STORAGE_HOST",
|
{"CONF_NAME": "CONFIG_STORAGE_HOST",
|
||||||
"CMD_OPTION": "os-storage-host",
|
"CMD_OPTION": "os-storage-host",
|
||||||
"PROMPT": "Enter the IP address of the storage host",
|
"PROMPT": "Enter the host for the storage services",
|
||||||
"OPTION_LIST": [],
|
"OPTION_LIST": [],
|
||||||
"VALIDATORS": [validators.validate_ip,
|
"VALIDATORS": [validators.validate_ssh],
|
||||||
validators.validate_ssh],
|
|
||||||
"DEFAULT_VALUE": utils.get_localhost_ip(),
|
"DEFAULT_VALUE": utils.get_localhost_ip(),
|
||||||
"MASK_INPUT": False,
|
"MASK_INPUT": False,
|
||||||
"LOOSE_VALIDATION": False,
|
"LOOSE_VALIDATION": False,
|
||||||
@ -517,10 +509,9 @@ def initConfig(controller):
|
|||||||
|
|
||||||
{"CONF_NAME": "CONFIG_SAHARA_HOST",
|
{"CONF_NAME": "CONFIG_SAHARA_HOST",
|
||||||
"CMD_OPTION": "os-sahara-host",
|
"CMD_OPTION": "os-sahara-host",
|
||||||
"PROMPT": "Enter the IP address of the Sahara host",
|
"PROMPT": "Enter the host for the Sahara",
|
||||||
"OPTION_LIST": [],
|
"OPTION_LIST": [],
|
||||||
"VALIDATORS": [validators.validate_ip,
|
"VALIDATORS": [validators.validate_ssh],
|
||||||
validators.validate_ssh],
|
|
||||||
"DEFAULT_VALUE": utils.get_localhost_ip(),
|
"DEFAULT_VALUE": utils.get_localhost_ip(),
|
||||||
"MASK_INPUT": False,
|
"MASK_INPUT": False,
|
||||||
"LOOSE_VALIDATION": False,
|
"LOOSE_VALIDATION": False,
|
||||||
@ -1153,20 +1144,30 @@ def manage_rdo(host, config):
|
|||||||
|
|
||||||
|
|
||||||
def choose_ip_version(config, messages):
|
def choose_ip_version(config, messages):
|
||||||
use_ipv6 = False
|
use_ipv6 = None
|
||||||
use_ipv4 = False
|
use_ipv4 = None
|
||||||
for hostname in filtered_hosts(config):
|
for hostname in filtered_hosts(config):
|
||||||
if '/' in hostname:
|
if '/' in hostname:
|
||||||
hostname = hostname.split('/')[0]
|
hostname = hostname.split('/')[0]
|
||||||
use_ipv6 |= utils.network.is_ipv6(hostname)
|
if use_ipv6 is None and use_ipv4 is None:
|
||||||
use_ipv4 |= utils.network.is_ipv4(hostname)
|
use_ipv6 = utils.network.is_ipv6(hostname)
|
||||||
|
use_ipv4 = utils.network.is_ipv4(hostname)
|
||||||
|
# check consistency
|
||||||
|
if (use_ipv6 and not utils.network.is_ipv6(hostname) or
|
||||||
|
use_ipv4 and not utils.network.is_ipv4(hostname)):
|
||||||
|
raise ValueError(
|
||||||
|
"Inconsistent host format. Please use either IPv4 addresses, "
|
||||||
|
"IPv6 adresses or hostnames for all host variables. "
|
||||||
|
)
|
||||||
if use_ipv6 and use_ipv4:
|
if use_ipv6 and use_ipv4:
|
||||||
msg = "IPv6 together with IPv4 installation is not supported"
|
msg = "IPv6 together with IPv4 installation is not supported"
|
||||||
raise exceptions.ParamValidationError(msg)
|
raise exceptions.ParamValidationError(msg)
|
||||||
elif use_ipv6:
|
elif use_ipv6:
|
||||||
config['CONFIG_IP_VERSION'] = 'ipv6'
|
config['CONFIG_IP_VERSION'] = 'ipv6'
|
||||||
else:
|
elif use_ipv4:
|
||||||
config['CONFIG_IP_VERSION'] = 'ipv4'
|
config['CONFIG_IP_VERSION'] = 'ipv4'
|
||||||
|
else:
|
||||||
|
config['CONFIG_IP_VERSION'] = 'none'
|
||||||
|
|
||||||
|
|
||||||
def install_keys_on_host(hostname, sshkeydata):
|
def install_keys_on_host(hostname, sshkeydata):
|
||||||
|
@ -260,6 +260,8 @@ def create_builder_manifest(config, messages):
|
|||||||
# come up. Specifically the replicator crashes if the ring isn't present
|
# come up. Specifically the replicator crashes if the ring isn't present
|
||||||
|
|
||||||
def device_def(dev_type, host, dev_port, devicename, zone):
|
def device_def(dev_type, host, dev_port, devicename, zone):
|
||||||
|
# device host has to be IP address
|
||||||
|
host = utils.force_ip(host)
|
||||||
fmt = ('\n@@%s { "%s:%s/%s":\n'
|
fmt = ('\n@@%s { "%s:%s/%s":\n'
|
||||||
' zone => %s,\n'
|
' zone => %s,\n'
|
||||||
' weight => 10, }\n')
|
' weight => 10, }\n')
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
require 'resolv'
|
||||||
|
|
||||||
|
|
||||||
|
module Puppet::Parser::Functions
|
||||||
|
newfunction(:force_ip, :type => :rvalue) do |args|
|
||||||
|
if args.size < 1
|
||||||
|
raise(
|
||||||
|
Puppet::ParseError,
|
||||||
|
"force_ip(): Wrong number of arguments given (#{args.size} for 1)"
|
||||||
|
)
|
||||||
|
end
|
||||||
|
Resolv.getaddress args[0]
|
||||||
|
end
|
||||||
|
end
|
@ -13,8 +13,8 @@ define packstack::firewall (
|
|||||||
|
|
||||||
$provider = $ip_version ? {
|
$provider = $ip_version ? {
|
||||||
'ipv6' => 'ip6tables',
|
'ipv6' => 'ip6tables',
|
||||||
'ipv4' => 'iptables',
|
default => 'iptables',
|
||||||
default => fail("IP version cannot be ${ip_version}")
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
||||||
}
|
}
|
||||||
|
|
||||||
$source = $host ? {
|
$source = $host ? {
|
||||||
|
@ -50,8 +50,9 @@ class { '::ceilometer::alarm::evaluator':
|
|||||||
}
|
}
|
||||||
|
|
||||||
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
||||||
'ipv6' => '::0',
|
'ipv6' => '::0',
|
||||||
'ipv4' => '0.0.0.0',
|
default => '0.0.0.0',
|
||||||
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
||||||
}
|
}
|
||||||
class { '::ceilometer::api':
|
class { '::ceilometer::api':
|
||||||
host => $bind_host,
|
host => $bind_host,
|
||||||
|
@ -3,8 +3,9 @@ cinder_config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
||||||
'ipv6' => '::0',
|
'ipv6' => '::0',
|
||||||
'ipv4' => '0.0.0.0',
|
default => '0.0.0.0',
|
||||||
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::cinder::api':
|
class { '::cinder::api':
|
||||||
|
@ -4,13 +4,15 @@ $glance_cfg_ctrl_host = hiera('CONFIG_KEYSTONE_HOST_URL')
|
|||||||
|
|
||||||
# glance option bind_host requires address without brackets
|
# glance option bind_host requires address without brackets
|
||||||
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
||||||
'ipv6' => '::0',
|
'ipv6' => '::0',
|
||||||
'ipv4' => '0.0.0.0',
|
default => '0.0.0.0',
|
||||||
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
||||||
}
|
}
|
||||||
# magical hack for magical config - glance option registry_host requires brackets
|
# magical hack for magical config - glance option registry_host requires brackets
|
||||||
$registry_host = hiera('CONFIG_IP_VERSION') ? {
|
$registry_host = hiera('CONFIG_IP_VERSION') ? {
|
||||||
'ipv6' => '[::0]',
|
'ipv6' => '[::0]',
|
||||||
'ipv4' => '0.0.0.0',
|
default => '0.0.0.0',
|
||||||
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::glance::api':
|
class { '::glance::api':
|
||||||
|
@ -11,8 +11,9 @@ $is_django_debug = hiera('CONFIG_DEBUG_MODE') ? {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
||||||
'ipv6' => '::0',
|
'ipv6' => '::0',
|
||||||
'ipv4' => '0.0.0.0',
|
default => '0.0.0.0',
|
||||||
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
||||||
}
|
}
|
||||||
|
|
||||||
$horizon_ssl = hiera('CONFIG_HORIZON_SSL') ? {
|
$horizon_ssl = hiera('CONFIG_HORIZON_SSL') ? {
|
||||||
@ -55,8 +56,9 @@ if hiera('CONFIG_KEYSTONE_SERVICE_NAME') == 'httpd' {
|
|||||||
# hack for memcached, for now we bind to localhost on ipv6
|
# hack for memcached, for now we bind to localhost on ipv6
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1210658
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1210658
|
||||||
$memcached_bind_host = hiera('CONFIG_IP_VERSION') ? {
|
$memcached_bind_host = hiera('CONFIG_IP_VERSION') ? {
|
||||||
'ipv6' => 'localhost6',
|
'ipv6' => 'localhost6',
|
||||||
'ipv4' => '0.0.0.0',
|
default => '0.0.0.0',
|
||||||
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::memcached':
|
class { '::memcached':
|
||||||
|
@ -7,8 +7,9 @@ $keystone_admin_url = hiera('CONFIG_KEYSTONE_ADMIN_URL')
|
|||||||
$keystone_api_version = hiera('CONFIG_KEYSTONE_API_VERSION')
|
$keystone_api_version = hiera('CONFIG_KEYSTONE_API_VERSION')
|
||||||
$keystone_versioned_admin_url = "${keystone_admin_url}/${keystone_api_version}"
|
$keystone_versioned_admin_url = "${keystone_admin_url}/${keystone_api_version}"
|
||||||
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
||||||
'ipv6' => '::0',
|
'ipv6' => '::0',
|
||||||
'ipv4' => '0.0.0.0',
|
default => '0.0.0.0',
|
||||||
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
||||||
}
|
}
|
||||||
|
|
||||||
if hiera('CONFIG_KEYSTONE_SERVICE_NAME') == 'keystone' {
|
if hiera('CONFIG_KEYSTONE_SERVICE_NAME') == 'keystone' {
|
||||||
|
@ -3,8 +3,9 @@ manila_config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
||||||
'ipv6' => '::0',
|
'ipv6' => '::0',
|
||||||
'ipv4' => '0.0.0.0',
|
default => '0.0.0.0',
|
||||||
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::manila::api':
|
class { '::manila::api':
|
||||||
|
@ -5,8 +5,9 @@ package { 'mariadb-server':
|
|||||||
}
|
}
|
||||||
|
|
||||||
$bind_address = hiera('CONFIG_IP_VERSION') ? {
|
$bind_address = hiera('CONFIG_IP_VERSION') ? {
|
||||||
'ipv6' => '::',
|
'ipv6' => '::0',
|
||||||
'ipv4' => '0.0.0.0',
|
default => '0.0.0.0',
|
||||||
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
||||||
}
|
}
|
||||||
|
|
||||||
# hack around galera packaging issue, they are duplicating
|
# hack around galera packaging issue, they are duplicating
|
||||||
@ -52,4 +53,3 @@ if ($::fqdn != $::hostname and $::hostname != 'localhost') {
|
|||||||
require => Class['mysql::server'],
|
require => Class['mysql::server'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,9 +14,9 @@ class { '::mongodb::server':
|
|||||||
ipv6 => hiera('CONFIG_IP_VERSION') ? {
|
ipv6 => hiera('CONFIG_IP_VERSION') ? {
|
||||||
'ipv6' => true,
|
'ipv6' => true,
|
||||||
default => false,
|
default => false,
|
||||||
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
||||||
},
|
},
|
||||||
smallfiles => true,
|
smallfiles => true,
|
||||||
bind_ip => $mongodb_host,
|
bind_ip => force_ip($mongodb_host),
|
||||||
config => $config_file,
|
config => $config_file,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,6 @@ class { '::neutron::agents::metadata':
|
|||||||
auth_url => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
|
auth_url => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
|
||||||
auth_region => hiera('CONFIG_KEYSTONE_REGION'),
|
auth_region => hiera('CONFIG_KEYSTONE_REGION'),
|
||||||
shared_secret => hiera('CONFIG_NEUTRON_METADATA_PW'),
|
shared_secret => hiera('CONFIG_NEUTRON_METADATA_PW'),
|
||||||
metadata_ip => hiera('CONFIG_KEYSTONE_HOST_URL'),
|
metadata_ip => force_ip(hiera('CONFIG_KEYSTONE_HOST_URL')),
|
||||||
debug => hiera('CONFIG_DEBUG_MODE'),
|
debug => hiera('CONFIG_DEBUG_MODE'),
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ class { '::neutron::agents::ml2::ovs':
|
|||||||
bridge_mappings => hiera_array('CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS'),
|
bridge_mappings => hiera_array('CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS'),
|
||||||
enable_tunneling => hiera('CONFIG_NEUTRON_OVS_TUNNELING'),
|
enable_tunneling => hiera('CONFIG_NEUTRON_OVS_TUNNELING'),
|
||||||
tunnel_types => hiera_array('CONFIG_NEUTRON_OVS_TUNNEL_TYPES'),
|
tunnel_types => hiera_array('CONFIG_NEUTRON_OVS_TUNNEL_TYPES'),
|
||||||
local_ip => $localip,
|
local_ip => force_ip($localip),
|
||||||
vxlan_udp_port => hiera('CONFIG_NEUTRON_OVS_VXLAN_UDP_PORT',undef),
|
vxlan_udp_port => hiera('CONFIG_NEUTRON_OVS_VXLAN_UDP_PORT',undef),
|
||||||
l2_population => hiera('CONFIG_NEUTRON_USE_L2POPULATION'),
|
l2_population => hiera('CONFIG_NEUTRON_USE_L2POPULATION'),
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
||||||
'ipv6' => '::0',
|
'ipv6' => '::0',
|
||||||
'ipv4' => '0.0.0.0',
|
default => '0.0.0.0',
|
||||||
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::neutron':
|
class { '::neutron':
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
||||||
'ipv6' => '::0',
|
'ipv6' => '::0',
|
||||||
'ipv4' => '0.0.0.0',
|
default => '0.0.0.0',
|
||||||
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
||||||
}
|
}
|
||||||
|
|
||||||
$kombu_ssl_ca_certs = hiera('CONFIG_AMQP_SSL_CACERT_FILE', undef)
|
$kombu_ssl_ca_certs = hiera('CONFIG_AMQP_SSL_CACERT_FILE', undef)
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
|
|
||||||
require 'keystone::python'
|
require 'keystone::python'
|
||||||
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
||||||
'ipv6' => '::0',
|
'ipv6' => '::0',
|
||||||
'ipv4' => '0.0.0.0',
|
default => '0.0.0.0',
|
||||||
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
||||||
}
|
}
|
||||||
|
|
||||||
$config_use_neutron = hiera('CONFIG_NEUTRON_INSTALL')
|
$config_use_neutron = hiera('CONFIG_NEUTRON_INSTALL')
|
||||||
|
@ -4,5 +4,6 @@ Firewall <| |> -> Class['nova']
|
|||||||
|
|
||||||
nova_config{
|
nova_config{
|
||||||
'DEFAULT/sql_connection': value => hiera('CONFIG_NOVA_SQL_CONN_PW');
|
'DEFAULT/sql_connection': value => hiera('CONFIG_NOVA_SQL_CONN_PW');
|
||||||
'DEFAULT/metadata_host': value => hiera('CONFIG_CONTROLLER_HOST');
|
# metadata_host has to be IP
|
||||||
|
'DEFAULT/metadata_host': value => force_ip(hiera('CONFIG_CONTROLLER_HOST'));
|
||||||
}
|
}
|
||||||
|
@ -19,8 +19,9 @@ exec { 'qemu-kvm':
|
|||||||
}
|
}
|
||||||
|
|
||||||
$libvirt_vnc_bind_host = hiera('CONFIG_IP_VERSION') ? {
|
$libvirt_vnc_bind_host = hiera('CONFIG_IP_VERSION') ? {
|
||||||
'ipv6' => '::0',
|
'ipv6' => '::0',
|
||||||
'ipv4' => '0.0.0.0',
|
default => '0.0.0.0',
|
||||||
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::nova::compute::libvirt':
|
class { '::nova::compute::libvirt':
|
||||||
|
@ -7,8 +7,9 @@ if hiera('CONFIG_HORIZON_SSL') == 'y' {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$vnc_bind_host = hiera('CONFIG_IP_VERSION') ? {
|
$vnc_bind_host = hiera('CONFIG_IP_VERSION') ? {
|
||||||
'ipv6' => '::0',
|
'ipv6' => '::0',
|
||||||
'ipv4' => '0.0.0.0',
|
default => '0.0.0.0',
|
||||||
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::nova::vncproxy':
|
class { '::nova::vncproxy':
|
||||||
@ -25,4 +26,3 @@ firewall { '001 novncproxy incoming':
|
|||||||
dport => ['6080'],
|
dport => ['6080'],
|
||||||
action => 'accept',
|
action => 'accept',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,15 +2,17 @@
|
|||||||
package { 'curl': ensure => present }
|
package { 'curl': ensure => present }
|
||||||
|
|
||||||
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
||||||
'ipv6' => '::0',
|
'ipv6' => '::0',
|
||||||
'ipv4' => '0.0.0.0',
|
default => '0.0.0.0',
|
||||||
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
||||||
}
|
}
|
||||||
|
|
||||||
# hack for memcached, for now we bind to localhost on ipv6
|
# hack for memcached, for now we bind to localhost on ipv6
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1210658
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1210658
|
||||||
$memcached_bind_host = hiera('CONFIG_IP_VERSION') ? {
|
$memcached_bind_host = hiera('CONFIG_IP_VERSION') ? {
|
||||||
'ipv6' => 'localhost6',
|
'ipv6' => 'localhost6',
|
||||||
'ipv4' => '0.0.0.0',
|
default => '0.0.0.0',
|
||||||
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::memcached':
|
class { '::memcached':
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
||||||
'ipv6' => '::0',
|
'ipv6' => '::0',
|
||||||
'ipv4' => '0.0.0.0',
|
default => '0.0.0.0',
|
||||||
|
# TO-DO(mmagr): Add IPv6 support when hostnames are used
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::trove::api':
|
class { '::trove::api':
|
||||||
|
Loading…
Reference in New Issue
Block a user