Install quantum utility scripts.
This commit is contained in:
parent
6519825370
commit
6d862769c4
@ -1,5 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
from subprocess import check_call
|
||||
@ -9,6 +11,7 @@ from charmhelpers.core.hookenv import (
|
||||
Hooks,
|
||||
UnregisteredHookError,
|
||||
config,
|
||||
charm_dir,
|
||||
log,
|
||||
relation_get,
|
||||
relation_ids,
|
||||
@ -68,6 +71,13 @@ def install():
|
||||
configure_installation_source(config('openstack-origin'))
|
||||
apt_update()
|
||||
apt_install(determine_packages(), fatal=True)
|
||||
|
||||
_files = os.path.join(charm_dir(), 'files')
|
||||
if os.path.isdir(_files):
|
||||
for f in os.listdir(_files):
|
||||
f = os.path.join(_files, f)
|
||||
log('Installing %s to /usr/bin' % f)
|
||||
shutil.copy2(f, '/usr/bin')
|
||||
[open_port(port) for port in determine_ports()]
|
||||
|
||||
|
||||
@ -184,6 +194,9 @@ def _auth_config():
|
||||
'service_password': auth_token_config('admin_password'),
|
||||
'service_tenant_name': auth_token_config('admin_tenant_name'),
|
||||
'auth_uri': auth_token_config('auth_uri'),
|
||||
# quantum-gateway interface deviates a bit.
|
||||
'keystone_host': ks_auth_host,
|
||||
'service_tenant': auth_token_config('admin_tenant_name'),
|
||||
}
|
||||
return cfg
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
# Configuration file maintained by Juju. Local changes may be overwritten.
|
||||
###############################################################################
|
||||
[DEFAULT]
|
||||
auth_strategy = keystone
|
||||
dhcpbridge_flagfile=/etc/nova/nova.conf
|
||||
dhcpbridge=/usr/bin/nova-dhcpbridge
|
||||
logdir=/var/log/nova
|
||||
@ -18,50 +17,57 @@ verbose=True
|
||||
ec2_private_dns_show_ip=True
|
||||
api_paste_config=/etc/nova/api-paste.ini
|
||||
volumes_path=/var/lib/nova/volumes
|
||||
enabled_apis=ec2,osapi_compute,metadata
|
||||
auth_strategy=keystone
|
||||
compute_driver=libvirt.LibvirtDriver
|
||||
{% if database_host -%}
|
||||
sql_connection = mysql://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}
|
||||
{% endif -%}
|
||||
|
||||
{% if rabbitmq_host -%}
|
||||
rabbit_host = {{ rabbitmq_host }}
|
||||
rabbit_userid = {{ rabbitmq_user }}
|
||||
rabbit_password = {{ rabbitmq_password }}
|
||||
rabbit_virtual_host = {{ rabbitmq_virtual_host }}
|
||||
{% endif -%}
|
||||
|
||||
{% if glance_api_servers -%}
|
||||
glance_api_servers = {{ glance_api_servers }}
|
||||
{% endif -%}
|
||||
|
||||
{% if rbd_pool -%}
|
||||
rbd_pool = {{ rbd_pool }}
|
||||
rbd_user = {{ rbd_user }}
|
||||
rbd_secret_uuid = {{ rbd_secret_uuid }}
|
||||
{% endif -%}
|
||||
{% if quantum_plugin and quantum_plugin == 'ovs' -%}
|
||||
libvirt_vif_driver = {{ libvirt_vif_driver }}
|
||||
|
||||
{% if neutron_plugin and neutron_plugin == 'ovs' -%}
|
||||
libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtGenericVIFDriver
|
||||
libvirt_user_virtio_for_bridges = True
|
||||
{% if quantum_security_groups -%}
|
||||
{% if neutron_security_groups -%}
|
||||
security_group_api = quantum
|
||||
nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if network_manager_config -%}
|
||||
{% for key, value in network_manager_config.iteritems() -%}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
|
||||
{% if network_manager == 'quantum' -%}
|
||||
network_api_class = nova.network.quantumv2.api.API
|
||||
{% elif network_manager == 'flatdhcpmanager' -%}
|
||||
network_manager = nova.network.manager.FlatDHCPManager
|
||||
{% endif -%}
|
||||
|
||||
{% if volume_service -%}
|
||||
{% if volume_service == 'nova-volume' -%}
|
||||
volume_api_class = nova.volume.api.API
|
||||
{% elif volume_service == 'cinder' -%}
|
||||
volume_api_class = nova.volume.cinder.API
|
||||
{% endif -%}
|
||||
volume_api_class=nova.volume.cinder.API
|
||||
{% endif -%}
|
||||
|
||||
{% if user_config_flags -%}
|
||||
{% for key, value in user_config_flags.iteritems() -%}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
{% if listen_ports -%}
|
||||
{% for key, value in listen_ports.iteritems() -%}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
Loading…
x
Reference in New Issue
Block a user