Merge "Remove Puppet templates endings when calling getManifestTemplate"

This commit is contained in:
Jenkins 2014-12-15 16:15:43 +00:00 committed by Gerrit Code Review
commit d89ea4ec75
16 changed files with 80 additions and 80 deletions

View File

@ -241,7 +241,7 @@ def create_manifest(config, messages):
config['CONFIG_AMQP_AUTH_USER'] = 'guest' config['CONFIG_AMQP_AUTH_USER'] = 'guest'
manifestfile = "%s_amqp.pp" % config['CONFIG_AMQP_HOST'] manifestfile = "%s_amqp.pp" % config['CONFIG_AMQP_HOST']
manifestdata = getManifestTemplate('amqp.pp') manifestdata = getManifestTemplate('amqp')
fw_details = dict() fw_details = dict()
# All hosts should be able to talk to amqp # All hosts should be able to talk to amqp

View File

@ -157,7 +157,7 @@ def initSequences(controller):
def create_manifest(config, messages): def create_manifest(config, messages):
manifestfile = "%s_ceilometer.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_ceilometer.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate(get_mq(config, "ceilometer")) manifestdata = getManifestTemplate(get_mq(config, "ceilometer"))
manifestdata += getManifestTemplate("ceilometer.pp") manifestdata += getManifestTemplate("ceilometer")
fw_details = dict() fw_details = dict()
key = "ceilometer_api" key = "ceilometer_api"
@ -173,13 +173,13 @@ def create_manifest(config, messages):
# Add a template that creates a group for nova because the ceilometer # Add a template that creates a group for nova because the ceilometer
# class needs it # class needs it
if config['CONFIG_NOVA_INSTALL'] == 'n': if config['CONFIG_NOVA_INSTALL'] == 'n':
manifestdata += getManifestTemplate("ceilometer_nova_disabled.pp") manifestdata += getManifestTemplate("ceilometer_nova_disabled")
appendManifestFile(manifestfile, manifestdata, 'ceilometer') appendManifestFile(manifestfile, manifestdata, 'ceilometer')
def create_mongodb_manifest(config, messages): def create_mongodb_manifest(config, messages):
manifestfile = "%s_mongodb.pp" % config['CONFIG_MONGODB_HOST'] manifestfile = "%s_mongodb.pp" % config['CONFIG_MONGODB_HOST']
manifestdata = getManifestTemplate("mongodb.pp") manifestdata = getManifestTemplate("mongodb")
fw_details = dict() fw_details = dict()
key = "mongodb_server" key = "mongodb_server"
@ -216,5 +216,5 @@ def create_redis_manifest(config, messages):
def create_keystone_manifest(config, messages): def create_keystone_manifest(config, messages):
manifestfile = "%s_keystone.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_keystone.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate("keystone_ceilometer.pp") manifestdata = getManifestTemplate("keystone_ceilometer")
appendManifestFile(manifestfile, manifestdata) appendManifestFile(manifestfile, manifestdata)

View File

@ -710,7 +710,7 @@ def create_keystone_manifest(config, messages):
config['CONFIG_STORAGE_HOST'] = config['CONFIG_CONTROLLER_HOST'] config['CONFIG_STORAGE_HOST'] = config['CONFIG_CONTROLLER_HOST']
manifestfile = "%s_keystone.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_keystone.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate("keystone_cinder.pp") manifestdata = getManifestTemplate("keystone_cinder")
appendManifestFile(manifestfile, manifestdata) appendManifestFile(manifestfile, manifestdata)
@ -720,16 +720,16 @@ def create_manifest(config, messages):
manifestdata = getManifestTemplate(get_mq(config, "cinder")) manifestdata = getManifestTemplate(get_mq(config, "cinder"))
manifestfile = "%s_cinder.pp" % config['CONFIG_STORAGE_HOST'] manifestfile = "%s_cinder.pp" % config['CONFIG_STORAGE_HOST']
manifestdata += getManifestTemplate("cinder.pp") manifestdata += getManifestTemplate("cinder")
backends = config['CONFIG_CINDER_BACKEND'] backends = config['CONFIG_CINDER_BACKEND']
if 'netapp' in backends: if 'netapp' in backends:
backends.remove('netapp') backends.remove('netapp')
puppet_cdot_iscsi = "cinder_netapp_cdot_iscsi.pp" puppet_cdot_iscsi = "cinder_netapp_cdot_iscsi"
puppet_cdot_nfs = "cinder_netapp_cdot_nfs.pp" puppet_cdot_nfs = "cinder_netapp_cdot_nfs"
puppet_7mode_iscsi = "cinder_netapp_7mode_iscsi.pp" puppet_7mode_iscsi = "cinder_netapp_7mode_iscsi"
puppet_7mode_nfs = "cinder_netapp_7mode_nfs.pp" puppet_7mode_nfs = "cinder_netapp_7mode_nfs"
puppet_eseries = "cinder_netapp_eseries.pp" puppet_eseries = "cinder_netapp_eseries"
if config['CONFIG_CINDER_NETAPP_STORAGE_FAMILY'] == "ontap_cluster": if config['CONFIG_CINDER_NETAPP_STORAGE_FAMILY'] == "ontap_cluster":
if config['CONFIG_CINDER_NETAPP_STORAGE_PROTOCOL'] == "iscsi": if config['CONFIG_CINDER_NETAPP_STORAGE_PROTOCOL'] == "iscsi":
manifestdata += getManifestTemplate(puppet_cdot_iscsi) manifestdata += getManifestTemplate(puppet_cdot_iscsi)
@ -743,12 +743,12 @@ def create_manifest(config, messages):
elif config['CONFIG_CINDER_NETAPP_STORAGE_FAMILY'] == "eseries": elif config['CONFIG_CINDER_NETAPP_STORAGE_FAMILY'] == "eseries":
manifestdata += getManifestTemplate(puppet_eseries) manifestdata += getManifestTemplate(puppet_eseries)
for backend in backends: for backend in backends:
manifestdata += getManifestTemplate('cinder_%s.pp' % backend) manifestdata += getManifestTemplate('cinder_%s' % backend)
if config['CONFIG_CEILOMETER_INSTALL'] == 'y': if config['CONFIG_CEILOMETER_INSTALL'] == 'y':
manifestdata += getManifestTemplate('cinder_ceilometer.pp') manifestdata += getManifestTemplate('cinder_ceilometer')
if config['CONFIG_SWIFT_INSTALL'] == 'y': if config['CONFIG_SWIFT_INSTALL'] == 'y':
manifestdata += getManifestTemplate('cinder_backup.pp') manifestdata += getManifestTemplate('cinder_backup')
fw_details = dict() fw_details = dict()
for host in split_hosts(config['CONFIG_COMPUTE_HOSTS']): for host in split_hosts(config['CONFIG_COMPUTE_HOSTS']):

View File

@ -169,7 +169,7 @@ def create_manifest(config, messages):
if config["CONFIG_NEUTRON_FWAAS"] == 'y': if config["CONFIG_NEUTRON_FWAAS"] == 'y':
config["CONFIG_HORIZON_NEUTRON_FW"] = True config["CONFIG_HORIZON_NEUTRON_FW"] = True
manifestdata = getManifestTemplate("horizon.pp") manifestdata = getManifestTemplate("horizon")
appendManifestFile(manifestfile, manifestdata) appendManifestFile(manifestfile, manifestdata)
msg = ("To access the OpenStack Dashboard browse to %s://%s/dashboard .\n" msg = ("To access the OpenStack Dashboard browse to %s://%s/dashboard .\n"

View File

@ -108,7 +108,7 @@ def create_keystone_manifest(config, messages):
config['CONFIG_STORAGE_HOST'] = config['CONFIG_CONTROLLER_HOST'] config['CONFIG_STORAGE_HOST'] = config['CONFIG_CONTROLLER_HOST']
manifestfile = "%s_keystone.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_keystone.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate("keystone_glance.pp") manifestdata = getManifestTemplate("keystone_glance")
appendManifestFile(manifestfile, manifestdata) appendManifestFile(manifestfile, manifestdata)
@ -117,7 +117,7 @@ def create_manifest(config, messages):
config['CONFIG_STORAGE_HOST'] = config['CONFIG_CONTROLLER_HOST'] config['CONFIG_STORAGE_HOST'] = config['CONFIG_CONTROLLER_HOST']
manifestfile = "%s_glance.pp" % config['CONFIG_STORAGE_HOST'] manifestfile = "%s_glance.pp" % config['CONFIG_STORAGE_HOST']
manifestdata = getManifestTemplate("glance.pp") manifestdata = getManifestTemplate("glance")
if config['CONFIG_CEILOMETER_INSTALL'] == 'y': if config['CONFIG_CEILOMETER_INSTALL'] == 'y':
mq_template = get_mq(config, "glance_ceilometer") mq_template = get_mq(config, "glance_ceilometer")
manifestdata += getManifestTemplate(mq_template) manifestdata += getManifestTemplate(mq_template)

View File

@ -173,7 +173,7 @@ def initSequences(controller):
def create_manifest(config, messages): def create_manifest(config, messages):
manifestfile = "%s_heat.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_heat.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate(get_mq(config, "heat")) manifestdata = getManifestTemplate(get_mq(config, "heat"))
manifestdata += getManifestTemplate("heat.pp") manifestdata += getManifestTemplate("heat")
fw_details = dict() fw_details = dict()
key = "heat" key = "heat"
@ -191,14 +191,14 @@ def create_manifest(config, messages):
def create_keystone_manifest(config, messages): def create_keystone_manifest(config, messages):
manifestfile = "%s_keystone.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_keystone.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate("keystone_heat.pp") manifestdata = getManifestTemplate("keystone_heat")
appendManifestFile(manifestfile, manifestdata) appendManifestFile(manifestfile, manifestdata)
def create_cloudwatch_manifest(config, messages): def create_cloudwatch_manifest(config, messages):
manifestfile = "%s_heatcw.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_heatcw.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate(get_mq(config, "heat")) manifestdata = getManifestTemplate(get_mq(config, "heat"))
manifestdata += getManifestTemplate("heat_cloudwatch.pp") manifestdata += getManifestTemplate("heat_cloudwatch")
fw_details = dict() fw_details = dict()
key = "heat_api_cloudwatch" key = "heat_api_cloudwatch"
@ -217,7 +217,7 @@ def create_cloudwatch_manifest(config, messages):
def create_cfn_manifest(config, messages): def create_cfn_manifest(config, messages):
manifestfile = "%s_heatcnf.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_heatcnf.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate(get_mq(config, "heat")) manifestdata = getManifestTemplate(get_mq(config, "heat"))
manifestdata += getManifestTemplate("heat_cfn.pp") manifestdata += getManifestTemplate("heat_cfn")
fw_details = dict() fw_details = dict()
key = "heat_cfn" key = "heat_cfn"

View File

@ -139,7 +139,7 @@ def initSequences(controller):
def create_manifest(config, messages): def create_manifest(config, messages):
manifestfile = "%s_keystone.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_keystone.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate("keystone.pp") manifestdata = getManifestTemplate("keystone")
fw_details = dict() fw_details = dict()
key = "keystone" key = "keystone"

View File

@ -95,13 +95,13 @@ def create_manifest(config, messages):
host = config['CONFIG_CONTROLLER_HOST'] host = config['CONFIG_CONTROLLER_HOST']
manifestfile = "%s_mariadb.pp" % host manifestfile = "%s_mariadb.pp" % host
manifestdata = [getManifestTemplate('mariadb_%s.pp' % suffix)] manifestdata = [getManifestTemplate('mariadb_%s' % suffix)]
def append_for(module, suffix): def append_for(module, suffix):
# Modules have to be appended to the existing mysql.pp # Modules have to be appended to the existing mysql.pp
# otherwise pp will fail for some of them saying that # otherwise pp will fail for some of them saying that
# Mysql::Config definition is missing. # Mysql::Config definition is missing.
template = "mariadb_%s_%s.pp" % (module, suffix) template = "mariadb_%s_%s" % (module, suffix)
manifestdata.append(getManifestTemplate(template)) manifestdata.append(getManifestTemplate(template))
append_for("keystone", suffix) append_for("keystone", suffix)

View File

@ -173,7 +173,7 @@ def create_manifest(config, messages):
config['CONFIG_NAGIOS_MANIFEST_CONFIG'] = manifest_entries config['CONFIG_NAGIOS_MANIFEST_CONFIG'] = manifest_entries
manifestfile = "%s_nagios.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_nagios.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate("nagios_server.pp") manifestdata = getManifestTemplate("nagios_server")
appendManifestFile(manifestfile, manifestdata) appendManifestFile(manifestfile, manifestdata)
@ -181,7 +181,7 @@ def create_nrpe_manifests(config, messages):
for hostname in filtered_hosts(config): for hostname in filtered_hosts(config):
config['CONFIG_NRPE_HOST'] = hostname config['CONFIG_NRPE_HOST'] = hostname
manifestfile = "%s_nagios_nrpe.pp" % hostname manifestfile = "%s_nagios_nrpe.pp" % hostname
manifestdata = getManifestTemplate("nagios_nrpe.pp") manifestdata = getManifestTemplate("nagios_nrpe")
# Only the Nagios host is allowed to talk to nrpe # Only the Nagios host is allowed to talk to nrpe
fw_details = dict() fw_details = dict()

View File

@ -555,19 +555,19 @@ def create_manifests(config, messages):
config['SERVICE_PLUGINS'] = (service_plugins if service_plugins config['SERVICE_PLUGINS'] = (service_plugins if service_plugins
else 'undef') else 'undef')
plugin_manifest = 'neutron_ml2_plugin.pp' plugin_manifest = 'neutron_ml2_plugin'
for host in q_hosts: for host in q_hosts:
manifest_file = "%s_neutron.pp" % (host,) manifest_file = "%s_neutron.pp" % (host,)
manifest_data = getManifestTemplate("neutron.pp") manifest_data = getManifestTemplate("neutron")
manifest_data += getManifestTemplate(get_mq(config, "neutron")) manifest_data += getManifestTemplate(get_mq(config, "neutron"))
appendManifestFile(manifest_file, manifest_data, 'neutron') appendManifestFile(manifest_file, manifest_data, 'neutron')
if host in api_hosts: if host in api_hosts:
manifest_file = "%s_neutron.pp" % (host,) manifest_file = "%s_neutron.pp" % (host,)
manifest_data = getManifestTemplate("neutron_api.pp") manifest_data = getManifestTemplate("neutron_api")
if config['CONFIG_NOVA_INSTALL'] == 'y': if config['CONFIG_NOVA_INSTALL'] == 'y':
template_name = "neutron_notifications.pp" template_name = "neutron_notifications"
manifest_data += getManifestTemplate(template_name) manifest_data += getManifestTemplate(template_name)
# Set up any l2 plugin configs we need only on neutron api nodes # Set up any l2 plugin configs we need only on neutron api nodes
@ -618,7 +618,7 @@ def create_manifests(config, messages):
def create_keystone_manifest(config, messages): def create_keystone_manifest(config, messages):
manifestfile = "%s_keystone.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_keystone.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate("keystone_neutron.pp") manifestdata = getManifestTemplate("keystone_neutron")
appendManifestFile(manifestfile, manifestdata) appendManifestFile(manifestfile, manifestdata)
@ -631,7 +631,7 @@ def create_l3_manifests(config, messages):
for host in network_hosts: for host in network_hosts:
config['CONFIG_NEUTRON_L3_HOST'] = host config['CONFIG_NEUTRON_L3_HOST'] = host
config['CONFIG_NEUTRON_L3_INTERFACE_DRIVER'] = get_if_driver(config) config['CONFIG_NEUTRON_L3_INTERFACE_DRIVER'] = get_if_driver(config)
manifestdata = getManifestTemplate("neutron_l3.pp") manifestdata = getManifestTemplate("neutron_l3")
manifestfile = "%s_neutron.pp" % (host,) manifestfile = "%s_neutron.pp" % (host,)
appendManifestFile(manifestfile, manifestdata + '\n') appendManifestFile(manifestfile, manifestdata + '\n')
@ -642,12 +642,12 @@ def create_l3_manifests(config, messages):
ext_bridge) if ext_bridge else None ext_bridge) if ext_bridge else None
if (ext_bridge and not mapping): if (ext_bridge and not mapping):
config['CONFIG_NEUTRON_OVS_BRIDGE'] = ext_bridge config['CONFIG_NEUTRON_OVS_BRIDGE'] = ext_bridge
manifestdata = getManifestTemplate('neutron_ovs_bridge.pp') manifestdata = getManifestTemplate('neutron_ovs_bridge')
appendManifestFile(manifestfile, manifestdata + '\n') appendManifestFile(manifestfile, manifestdata + '\n')
if config['CONFIG_NEUTRON_FWAAS'] == 'y': if config['CONFIG_NEUTRON_FWAAS'] == 'y':
# manifestfile = "%s_neutron_fwaas.pp" % (host,) # manifestfile = "%s_neutron_fwaas.pp" % (host,)
manifestdata = getManifestTemplate("neutron_fwaas.pp") manifestdata = getManifestTemplate("neutron_fwaas")
appendManifestFile(manifestfile, manifestdata + '\n') appendManifestFile(manifestfile, manifestdata + '\n')
@ -658,9 +658,9 @@ def create_dhcp_manifests(config, messages):
config["CONFIG_NEUTRON_DHCP_HOST"] = host config["CONFIG_NEUTRON_DHCP_HOST"] = host
config['CONFIG_NEUTRON_DHCP_INTERFACE_DRIVER'] = get_if_driver(config) config['CONFIG_NEUTRON_DHCP_INTERFACE_DRIVER'] = get_if_driver(config)
if use_openvswitch_vxlan(config) or use_openvswitch_gre(config): if use_openvswitch_vxlan(config) or use_openvswitch_gre(config):
manifest_data = getManifestTemplate("neutron_dhcp_mtu.pp") manifest_data = getManifestTemplate("neutron_dhcp_mtu")
else: else:
manifest_data = getManifestTemplate("neutron_dhcp.pp") manifest_data = getManifestTemplate("neutron_dhcp")
manifest_file = "%s_neutron.pp" % (host,) manifest_file = "%s_neutron.pp" % (host,)
# Firewall Rules for dhcp in # Firewall Rules for dhcp in
fw_details = dict() fw_details = dict()
@ -701,7 +701,7 @@ def create_lbaas_manifests(config, messages):
for host in network_hosts: for host in network_hosts:
config['CONFIG_NEUTRON_LBAAS_INTERFACE_DRIVER'] = get_if_driver(config) config['CONFIG_NEUTRON_LBAAS_INTERFACE_DRIVER'] = get_if_driver(config)
manifestdata = getManifestTemplate("neutron_lbaas.pp") manifestdata = getManifestTemplate("neutron_lbaas")
manifestfile = "%s_neutron.pp" % (host,) manifestfile = "%s_neutron.pp" % (host,)
appendManifestFile(manifestfile, manifestdata + "\n") appendManifestFile(manifestfile, manifestdata + "\n")
@ -714,7 +714,7 @@ def create_metering_agent_manifests(config, messages):
for host in network_hosts: for host in network_hosts:
config['CONFIG_NEUTRON_METERING_IFCE_DRIVER'] = get_if_driver(config) config['CONFIG_NEUTRON_METERING_IFCE_DRIVER'] = get_if_driver(config)
manifestdata = getManifestTemplate("neutron_metering_agent.pp") manifestdata = getManifestTemplate("neutron_metering_agent")
manifestfile = "%s_neutron.pp" % (host,) manifestfile = "%s_neutron.pp" % (host,)
appendManifestFile(manifestfile, manifestdata + "\n") appendManifestFile(manifestfile, manifestdata + "\n")
@ -740,7 +740,7 @@ def create_l2_agent_manifests(config, messages):
config["CONFIG_NEUTRON_OVS_TUNNELING"] = tunnel config["CONFIG_NEUTRON_OVS_TUNNELING"] = tunnel
tunnel_types = set(ovs_type) & set(['gre', 'vxlan']) tunnel_types = set(ovs_type) & set(['gre', 'vxlan'])
config["CONFIG_NEUTRON_OVS_TUNNEL_TYPES"] = list(tunnel_types) config["CONFIG_NEUTRON_OVS_TUNNEL_TYPES"] = list(tunnel_types)
template_name = "neutron_ovs_agent.pp" template_name = "neutron_ovs_agent"
bm_arr = get_values(config["CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS"]) bm_arr = get_values(config["CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS"])
iface_arr = get_values(config["CONFIG_NEUTRON_OVS_BRIDGE_IFACES"]) iface_arr = get_values(config["CONFIG_NEUTRON_OVS_BRIDGE_IFACES"])
@ -753,7 +753,7 @@ def create_l2_agent_manifests(config, messages):
config["CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS"] = bm_arr config["CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS"] = bm_arr
elif agent == "linuxbridge": elif agent == "linuxbridge":
host_var = 'CONFIG_NEUTRON_LB_HOST' host_var = 'CONFIG_NEUTRON_LB_HOST'
template_name = 'neutron_lb_agent.pp' template_name = 'neutron_lb_agent'
else: else:
raise KeyError("Unknown layer2 agent") raise KeyError("Unknown layer2 agent")
@ -772,11 +772,11 @@ def create_l2_agent_manifests(config, messages):
iface_key = 'CONFIG_NEUTRON_OVS_IFACE' iface_key = 'CONFIG_NEUTRON_OVS_IFACE'
for if_map in iface_arr: for if_map in iface_arr:
config[bridge_key], config[iface_key] = if_map.split(':') config[bridge_key], config[iface_key] = if_map.split(':')
manifestdata = getManifestTemplate("neutron_ovs_port.pp") manifestdata = getManifestTemplate("neutron_ovs_port")
appendManifestFile(manifestfile, manifestdata + "\n") appendManifestFile(manifestfile, manifestdata + "\n")
# Additional configurations required for compute hosts and # Additional configurations required for compute hosts and
# network hosts. # network hosts.
manifestdata = getManifestTemplate('neutron_bridge_module.pp') manifestdata = getManifestTemplate('neutron_bridge_module')
appendManifestFile(manifestfile, manifestdata + '\n') appendManifestFile(manifestfile, manifestdata + '\n')
@ -786,7 +786,7 @@ def create_metadata_manifests(config, messages):
return return
for host in network_hosts: for host in network_hosts:
config['CONFIG_NEUTRON_METADATA_HOST'] = host config['CONFIG_NEUTRON_METADATA_HOST'] = host
manifestdata = getManifestTemplate('neutron_metadata.pp') manifestdata = getManifestTemplate('neutron_metadata')
manifestfile = "%s_neutron.pp" % (host,) manifestfile = "%s_neutron.pp" % (host,)
appendManifestFile(manifestfile, manifestdata + "\n") appendManifestFile(manifestfile, manifestdata + "\n")

View File

@ -428,7 +428,7 @@ def create_api_manifest(config, messages):
config['CONFIG_NEUTRON_METADATA_PW_UNQUOTED'] = \ config['CONFIG_NEUTRON_METADATA_PW_UNQUOTED'] = \
"%s" % config['CONFIG_NEUTRON_METADATA_PW'] "%s" % config['CONFIG_NEUTRON_METADATA_PW']
manifestfile = "%s_api_nova.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_api_nova.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate("nova_api.pp") manifestdata = getManifestTemplate("nova_api")
fw_details = dict() fw_details = dict()
key = "nova_api" key = "nova_api"
@ -446,19 +446,19 @@ def create_api_manifest(config, messages):
def create_keystone_manifest(config, messages): def create_keystone_manifest(config, messages):
manifestfile = "%s_keystone.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_keystone.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate("keystone_nova.pp") manifestdata = getManifestTemplate("keystone_nova")
appendManifestFile(manifestfile, manifestdata) appendManifestFile(manifestfile, manifestdata)
def create_cert_manifest(config, messages): def create_cert_manifest(config, messages):
manifestfile = "%s_nova.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_nova.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate("nova_cert.pp") manifestdata = getManifestTemplate("nova_cert")
appendManifestFile(manifestfile, manifestdata) appendManifestFile(manifestfile, manifestdata)
def create_conductor_manifest(config, messages): def create_conductor_manifest(config, messages):
manifestfile = "%s_nova.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_nova.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate("nova_conductor.pp") manifestdata = getManifestTemplate("nova_conductor")
appendManifestFile(manifestfile, manifestdata) appendManifestFile(manifestfile, manifestdata)
@ -499,11 +499,11 @@ def create_compute_manifest(config, messages):
ssh_keys_details[key]['type'] = host_key_type ssh_keys_details[key]['type'] = host_key_type
config['SSH_KEYS'] = ssh_keys_details config['SSH_KEYS'] = ssh_keys_details
ssh_hostkeys += getManifestTemplate("sshkey.pp") ssh_hostkeys += getManifestTemplate("sshkey")
for host in compute_hosts: for host in compute_hosts:
config["CONFIG_NOVA_COMPUTE_HOST"] = host config["CONFIG_NOVA_COMPUTE_HOST"] = host
manifestdata = getManifestTemplate("nova_compute.pp") manifestdata = getManifestTemplate("nova_compute")
fw_details = dict() fw_details = dict()
cf_fw_qemu_mig_key = "FIREWALL_NOVA_QEMU_MIG_RULES_%s" % host cf_fw_qemu_mig_key = "FIREWALL_NOVA_QEMU_MIG_RULES_%s" % host
@ -520,17 +520,17 @@ def create_compute_manifest(config, messages):
manifestdata += createFirewallResources(cf_fw_qemu_mig_key) manifestdata += createFirewallResources(cf_fw_qemu_mig_key)
if config['CONFIG_VMWARE_BACKEND'] == 'y': if config['CONFIG_VMWARE_BACKEND'] == 'y':
manifestdata += getManifestTemplate("nova_compute_vmware.pp") manifestdata += getManifestTemplate("nova_compute_vmware")
else: else:
manifestdata += getManifestTemplate("nova_compute_libvirt.pp") manifestdata += getManifestTemplate("nova_compute_libvirt")
if (config['CONFIG_VMWARE_BACKEND'] != 'y' and if (config['CONFIG_VMWARE_BACKEND'] != 'y' and
config['CONFIG_CINDER_INSTALL'] == 'y' and config['CONFIG_CINDER_INSTALL'] == 'y' and
'gluster' in config['CONFIG_CINDER_BACKEND']): 'gluster' in config['CONFIG_CINDER_BACKEND']):
manifestdata += getManifestTemplate("nova_gluster.pp") manifestdata += getManifestTemplate("nova_gluster")
if (config['CONFIG_VMWARE_BACKEND'] != 'y' and if (config['CONFIG_VMWARE_BACKEND'] != 'y' and
config['CONFIG_CINDER_INSTALL'] == 'y' and config['CONFIG_CINDER_INSTALL'] == 'y' and
'nfs' in config['CONFIG_CINDER_BACKEND']): 'nfs' in config['CONFIG_CINDER_BACKEND']):
manifestdata += getManifestTemplate("nova_nfs.pp") manifestdata += getManifestTemplate("nova_nfs")
manifestfile = "%s_nova.pp" % host manifestfile = "%s_nova.pp" % host
nova_config_options = NovaConfig() nova_config_options = NovaConfig()
@ -550,7 +550,7 @@ def create_compute_manifest(config, messages):
if config['CONFIG_CEILOMETER_INSTALL'] == 'y': if config['CONFIG_CEILOMETER_INSTALL'] == 'y':
mq_template = get_mq(config, "nova_ceilometer") mq_template = get_mq(config, "nova_ceilometer")
manifestdata += getManifestTemplate(mq_template) manifestdata += getManifestTemplate(mq_template)
manifestdata += getManifestTemplate("nova_ceilometer.pp") manifestdata += getManifestTemplate("nova_ceilometer")
fw_details = dict() fw_details = dict()
key = "nova_compute" key = "nova_compute"
@ -602,26 +602,26 @@ def create_network_manifest(config, messages):
config['CONFIG_NOVA_NETWORK_FIXEDSIZE'] = str(net_size) config['CONFIG_NOVA_NETWORK_FIXEDSIZE'] = str(net_size)
manifestfile = "%s_nova.pp" % host manifestfile = "%s_nova.pp" % host
manifestdata = getManifestTemplate("nova_network.pp") manifestdata = getManifestTemplate("nova_network")
# Restart libvirt if we deploy nova network on compute # Restart libvirt if we deploy nova network on compute
if host in compute_hosts: if host in compute_hosts:
manifestdata += getManifestTemplate("nova_network_libvirt.pp") manifestdata += getManifestTemplate("nova_network_libvirt")
# in multihost mode each compute host runs nova-api-metadata # in multihost mode each compute host runs nova-api-metadata
if multihost and host != api_host and host in compute_hosts: if multihost and host != api_host and host in compute_hosts:
manifestdata += getManifestTemplate("nova_metadata.pp") manifestdata += getManifestTemplate("nova_metadata")
appendManifestFile(manifestfile, manifestdata) appendManifestFile(manifestfile, manifestdata)
def create_sched_manifest(config, messages): def create_sched_manifest(config, messages):
manifestfile = "%s_nova.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_nova.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate("nova_sched.pp") manifestdata = getManifestTemplate("nova_sched")
appendManifestFile(manifestfile, manifestdata) appendManifestFile(manifestfile, manifestdata)
def create_vncproxy_manifest(config, messages): def create_vncproxy_manifest(config, messages):
manifestfile = "%s_nova.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_nova.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate("nova_vncproxy.pp") manifestdata = getManifestTemplate("nova_vncproxy")
appendManifestFile(manifestfile, manifestdata) appendManifestFile(manifestfile, manifestdata)
@ -666,9 +666,9 @@ def create_common_manifest(config, messages):
data = getManifestTemplate(get_mq(config, "nova_common")) data = getManifestTemplate(get_mq(config, "nova_common"))
if pw_in_sqlconn: if pw_in_sqlconn:
data += getManifestTemplate("nova_common_pw.pp") data += getManifestTemplate("nova_common_pw")
else: else:
data += getManifestTemplate("nova_common_nopw.pp") data += getManifestTemplate("nova_common_nopw")
appendManifestFile(os.path.split(manifestfile)[1], data) appendManifestFile(os.path.split(manifestfile)[1], data)
@ -681,5 +681,5 @@ def create_neutron_manifest(config, messages):
for manifestfile, marker in manifestfiles.getFiles(): for manifestfile, marker in manifestfiles.getFiles():
if manifestfile.endswith("_nova.pp"): if manifestfile.endswith("_nova.pp"):
data = getManifestTemplate("nova_neutron.pp") data = getManifestTemplate("nova_neutron")
appendManifestFile(os.path.split(manifestfile)[1], data) appendManifestFile(os.path.split(manifestfile)[1], data)

View File

@ -61,7 +61,7 @@ def create_manifest(config, messages):
root_home != homedir) root_home != homedir)
config['NO_ROOT_USER_ALLINONE'] = no_root_allinone and True or False config['NO_ROOT_USER_ALLINONE'] = no_root_allinone and True or False
manifestdata = getManifestTemplate("openstack_client.pp") manifestdata = getManifestTemplate("openstack_client")
appendManifestFile(manifestfile, manifestdata) appendManifestFile(manifestfile, manifestdata)
msg = ("File %s/keystonerc_admin has been created on OpenStack client host" msg = ("File %s/keystonerc_admin has been created on OpenStack client host"

View File

@ -41,7 +41,7 @@ def initSequences(controller):
def create_manifest(config, messages): def create_manifest(config, messages):
for hostname in filtered_hosts(config): for hostname in filtered_hosts(config):
manifestfile = "%s_postscript.pp" % hostname manifestfile = "%s_postscript.pp" % hostname
manifestdata = getManifestTemplate("postscript.pp") manifestdata = getManifestTemplate("postscript")
appendManifestFile(manifestfile, manifestdata, 'postscript') appendManifestFile(manifestfile, manifestdata, 'postscript')
# TO-DO: remove this temporary fix for nova-network/neutron # TO-DO: remove this temporary fix for nova-network/neutron
# undeterministic behavior # undeterministic behavior
@ -52,5 +52,5 @@ def create_manifest(config, messages):
if config.get('CONFIG_NEUTRON_INSTALL', 'n') == 'y' and provision: if config.get('CONFIG_NEUTRON_INSTALL', 'n') == 'y' and provision:
fmted = config['CONFIG_NEUTRON_L3_EXT_BRIDGE'].replace('-', '_') fmted = config['CONFIG_NEUTRON_L3_EXT_BRIDGE'].replace('-', '_')
config['EXT_BRIDGE_VAR'] = fmted config['EXT_BRIDGE_VAR'] = fmted
manifestdata = getManifestTemplate("persist_ovs_bridge.pp") manifestdata = getManifestTemplate("persist_ovs_bridge")
appendManifestFile(manifestfile, manifestdata, 'postscript') appendManifestFile(manifestfile, manifestdata, 'postscript')

View File

@ -669,7 +669,7 @@ def create_manifest(config, messages):
for hostname in filtered_hosts(config): for hostname in filtered_hosts(config):
manifestfile = "%s_prescript.pp" % hostname manifestfile = "%s_prescript.pp" % hostname
manifestdata = getManifestTemplate("prescript.pp") manifestdata = getManifestTemplate("prescript")
appendManifestFile(manifestfile, manifestdata) appendManifestFile(manifestfile, manifestdata)
@ -690,13 +690,13 @@ def create_ntp_manifest(config, messages):
# Configure chrony for Fedora or RHEL/CentOS 7 # Configure chrony for Fedora or RHEL/CentOS 7
if releaseos == 'Fedora' or releasever == '7': if releaseos == 'Fedora' or releasever == '7':
manifestdata = getManifestTemplate('chrony.pp') manifestdata = getManifestTemplate('chrony')
appendManifestFile('%s_chrony.pp' % hostname, appendManifestFile('%s_chrony.pp' % hostname,
manifestdata, manifestdata,
marker=marker) marker=marker)
# For previous versions, configure ntpd # For previous versions, configure ntpd
else: else:
manifestdata = getManifestTemplate('ntpd.pp') manifestdata = getManifestTemplate('ntpd')
appendManifestFile('%s_ntpd.pp' % hostname, appendManifestFile('%s_ntpd.pp' % hostname,
manifestdata, manifestdata,
marker=marker) marker=marker)

View File

@ -287,7 +287,7 @@ def using_neutron(config):
def create_demo_manifest(config, messages): def create_demo_manifest(config, messages):
using_neutron(config) using_neutron(config)
manifest_file = '%s_provision_demo.pp' % config['CONFIG_CONTROLLER_HOST'] manifest_file = '%s_provision_demo.pp' % config['CONFIG_CONTROLLER_HOST']
manifest_data = getManifestTemplate("provision_demo.pp") manifest_data = getManifestTemplate("provision_demo")
appendManifestFile(manifest_file, manifest_data) appendManifestFile(manifest_file, manifest_data)
@ -296,10 +296,10 @@ def create_storage_manifest(config, messages):
config['CONFIG_STORAGE_HOST'] = config['CONFIG_CONTROLLER_HOST'] config['CONFIG_STORAGE_HOST'] = config['CONFIG_CONTROLLER_HOST']
if config['CONFIG_PROVISION_TEMPEST']: if config['CONFIG_PROVISION_TEMPEST']:
template = "provision_tempest_glance.pp" template = "provision_tempest_glance"
else: else:
template = "provision_demo_glance.pp" template = "provision_demo_glance"
manifest_file = '%s_provision_glance.pp' % config['CONFIG_STORAGE_HOST'] manifest_file = '%s_provision_glance' % config['CONFIG_STORAGE_HOST']
manifest_data = getManifestTemplate(template) manifest_data = getManifestTemplate(template)
appendManifestFile(manifest_file, manifest_data) appendManifestFile(manifest_file, manifest_data)
@ -308,5 +308,5 @@ def create_tempest_manifest(config, messages):
using_neutron(config) using_neutron(config)
manifest_file = '%s_provision_tempest.pp' % \ manifest_file = '%s_provision_tempest.pp' % \
config['CONFIG_CONTROLLER_HOST'] config['CONFIG_CONTROLLER_HOST']
manifest_data = getManifestTemplate("provision_tempest.pp") manifest_data = getManifestTemplate("provision_tempest")
appendManifestFile(manifest_file, manifest_data) appendManifestFile(manifest_file, manifest_data)

View File

@ -251,7 +251,7 @@ def create_keystone_manifest(config, messages):
global devices global devices
devices = parse_devices(config) devices = parse_devices(config)
manifestfile = "%s_keystone.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_keystone.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate("keystone_swift.pp") manifestdata = getManifestTemplate("keystone_swift")
appendManifestFile(manifestfile, manifestdata) appendManifestFile(manifestfile, manifestdata)
@ -267,7 +267,7 @@ def create_builder_manifest(config, messages):
return fmt % (dev_type, host, dev_port, devicename, zone) return fmt % (dev_type, host, dev_port, devicename, zone)
manifestfile = "%s_ring_swift.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_ring_swift.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate("swift_builder.pp") manifestdata = getManifestTemplate("swift_builder")
# Add each device to the ring # Add each device to the ring
devicename = 0 devicename = 0
@ -285,7 +285,7 @@ def create_builder_manifest(config, messages):
def create_proxy_manifest(config, messages): def create_proxy_manifest(config, messages):
manifestfile = "%s_swift.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_swift.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate("swift_proxy.pp") manifestdata = getManifestTemplate("swift_proxy")
fw_details = dict() fw_details = dict()
key = "swift_proxy" key = "swift_proxy"
@ -305,7 +305,7 @@ def create_storage_manifest(config, messages):
global devices global devices
manifestfile = "%s_swift.pp" % config['CONFIG_CONTROLLER_HOST'] manifestfile = "%s_swift.pp" % config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate("swift_storage.pp") manifestdata = getManifestTemplate("swift_storage")
# this need to happen once per storage device # this need to happen once per storage device
for device in devices: for device in devices:
@ -321,7 +321,7 @@ def create_storage_manifest(config, messages):
else: else:
# create loopback device if none was specified # create loopback device if none was specified
config['CONFIG_SWIFT_STORAGE_SEEK'] = get_storage_size(config) config['CONFIG_SWIFT_STORAGE_SEEK'] = get_storage_size(config)
manifestdata += "\n" + getManifestTemplate("swift_loopback.pp") manifestdata += "\n" + getManifestTemplate("swift_loopback")
# set allowed hosts for firewall # set allowed hosts for firewall
hosts = set([config['CONFIG_CONTROLLER_HOST']]) hosts = set([config['CONFIG_CONTROLLER_HOST']])
@ -346,5 +346,5 @@ def create_storage_manifest(config, messages):
def create_common_manifest(config, messages): def create_common_manifest(config, messages):
for manifestfile, marker in manifestfiles.getFiles(): for manifestfile, marker in manifestfiles.getFiles():
if manifestfile.endswith("_swift.pp"): if manifestfile.endswith("_swift.pp"):
data = getManifestTemplate("swift_common.pp") data = getManifestTemplate("swift_common")
appendManifestFile(os.path.split(manifestfile)[1], data) appendManifestFile(os.path.split(manifestfile)[1], data)