Merge "Add a quantum element."
This commit is contained in:
commit
4c986076ac
1
elements/quantum/README.md
Normal file
1
elements/quantum/README.md
Normal file
@ -0,0 +1 @@
|
||||
Install quantum service from git.
|
3
elements/quantum/element-deps
Normal file
3
elements/quantum/element-deps
Normal file
@ -0,0 +1,3 @@
|
||||
os-svc-install
|
||||
os-config-applier
|
||||
os-refresh-config
|
16
elements/quantum/install.d/76-quantum
Executable file
16
elements/quantum/install.d/76-quantum
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
install-packages openvswitch-switch
|
||||
os-svc-install -n quantum -u quantum -r https://github.com/openstack/quantum.git
|
||||
|
||||
mkdir -p /var/lib/quantum && chown -R quantum:quantum /var/lib/quantum
|
||||
|
||||
os-svc-daemon quantum-openvswitch-agent quantum quantum-openvswitch-agent \
|
||||
"--config-file /etc/quantum/quantum.conf --config-file /etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini --config-dir /etc/quantum"
|
||||
os-svc-daemon quantum-server quantum quantum-server \
|
||||
"--config-file /etc/quantum/quantum.conf --config-file /etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini --config-dir /etc/quantum"
|
||||
|
||||
echo "quantum ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/quantum
|
||||
chmod 0440 /etc/sudoers.d/quantum
|
||||
visudo -c
|
29
elements/quantum/os-config-applier/etc/quantum/api-paste.ini
Normal file
29
elements/quantum/os-config-applier/etc/quantum/api-paste.ini
Normal file
@ -0,0 +1,29 @@
|
||||
[composite:quantum]
|
||||
use = egg:Paste#urlmap
|
||||
/: quantumversions
|
||||
/v2.0: quantumapi_v2_0
|
||||
|
||||
[composite:quantumapi_v2_0]
|
||||
use = call:quantum.auth:pipeline_factory
|
||||
noauth = extensions quantumapiapp_v2_0
|
||||
keystone = authtoken keystonecontext extensions quantumapiapp_v2_0
|
||||
|
||||
[filter:keystonecontext]
|
||||
paste.filter_factory = quantum.auth:QuantumKeystoneContext.factory
|
||||
|
||||
[filter:authtoken]
|
||||
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
|
||||
auth_host = {{keystone.host}}
|
||||
auth_port = 35357
|
||||
admin_tenant_name = service
|
||||
admin_user = quantum
|
||||
admin_password = {{service-password}}
|
||||
|
||||
[filter:extensions]
|
||||
paste.filter_factory = quantum.api.extensions:plugin_aware_extension_middleware_factory
|
||||
|
||||
[app:quantumversions]
|
||||
paste.app_factory = quantum.api.versions:Versions.factory
|
||||
|
||||
[app:quantumapiapp_v2_0]
|
||||
paste.app_factory = quantum.api.v2.router:APIRouter.factory
|
@ -0,0 +1,8 @@
|
||||
[DEFAULT]
|
||||
debug = True
|
||||
|
||||
state_path = /var/run/quantum
|
||||
interface_driver = quantum.agent.linux.interface.OVSInterfaceDriver
|
||||
dhcp_driver = quantum.agent.linux.dhcp.Dnsmasq
|
||||
root_helper = sudo /usr/bin/quantum-rootwrap /etc/quantum/rootwrap.conf
|
||||
use_namespaces = False
|
13
elements/quantum/os-config-applier/etc/quantum/l3_agent.ini
Normal file
13
elements/quantum/os-config-applier/etc/quantum/l3_agent.ini
Normal file
@ -0,0 +1,13 @@
|
||||
[DEFAULT]
|
||||
debug = True
|
||||
|
||||
interface_driver = quantum.agent.linux.interface.OVSInterfaceDriver
|
||||
|
||||
state_path = /var/run/quantum
|
||||
|
||||
auth_url = http://{{keystone.host}}:35357/v2.0
|
||||
admin_tenant_name = service
|
||||
admin_user = quantum
|
||||
admin_password = {{service-password}}
|
||||
metadata_ip = 192.168.0.1
|
||||
use_namespaces = False
|
@ -0,0 +1,6 @@
|
||||
[DEFAULT]
|
||||
auth_url = http://{{keystone.host}}:35357/v2.0
|
||||
auth_region = RegionOne
|
||||
admin_tenant_name = %SERVICE_TENANT_NAME%
|
||||
admin_user = %SERVICE_USER%
|
||||
admin_password = %SERVICE_PASSWORD%
|
@ -0,0 +1,21 @@
|
||||
[DATABASE]
|
||||
sql_connection = {{quantum.ovs_db}}
|
||||
|
||||
reconnect_interval = 2
|
||||
|
||||
[OVS]
|
||||
bridge_mappings = ctlplane:br-ctlplane
|
||||
network_vlan_ranges = ctlplane
|
||||
|
||||
tenant_network_type = gre
|
||||
tunnel_id_ranges = 1:1000
|
||||
enable_tunneling = True
|
||||
integration_bridge = br-int
|
||||
tunnel_bridge = br-tun
|
||||
local_ip = 10.10.10.1
|
||||
|
||||
|
||||
[AGENT]
|
||||
root_helper = sudo
|
||||
polling_interval = 2
|
||||
|
53
elements/quantum/os-config-applier/etc/quantum/policy.json
Normal file
53
elements/quantum/os-config-applier/etc/quantum/policy.json
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
"admin_or_owner": "role:admin or tenant_id:%(tenant_id)s",
|
||||
"admin_or_network_owner": "role:admin or tenant_id:%(network_tenant_id)s",
|
||||
"admin_only": "role:admin",
|
||||
"regular_user": "",
|
||||
"shared": "field:networks:shared=True",
|
||||
"external": "field:networks:router:external=True",
|
||||
"default": "rule:admin_or_owner",
|
||||
|
||||
"extension:provider_network:view": "rule:admin_only",
|
||||
"extension:provider_network:set": "rule:admin_only",
|
||||
|
||||
"extension:router:view": "rule:regular_user",
|
||||
"extension:router:set": "rule:admin_only",
|
||||
"extension:router:add_router_interface": "rule:admin_or_owner",
|
||||
"extension:router:remove_router_interface": "rule:admin_or_owner",
|
||||
|
||||
"extension:port_binding:view": "rule:admin_only",
|
||||
"extension:port_binding:set": "rule:admin_only",
|
||||
|
||||
"subnets:private:read": "rule:admin_or_owner",
|
||||
"subnets:private:write": "rule:admin_or_owner",
|
||||
"subnets:shared:read": "rule:regular_user",
|
||||
"subnets:shared:write": "rule:admin_only",
|
||||
|
||||
"create_subnet": "rule:admin_or_network_owner",
|
||||
"get_subnet": "rule:admin_or_owner or rule:shared",
|
||||
"update_subnet": "rule:admin_or_network_owner",
|
||||
"delete_subnet": "rule:admin_or_network_owner",
|
||||
|
||||
"create_network": "",
|
||||
"get_network": "rule:admin_or_owner or rule:shared or rule:external",
|
||||
"create_network:shared": "rule:admin_only",
|
||||
"create_network:router:external": "rule:admin_only",
|
||||
"update_network": "rule:admin_or_owner",
|
||||
"delete_network": "rule:admin_or_owner",
|
||||
|
||||
"create_port": "",
|
||||
"create_port:mac_address": "rule:admin_or_network_owner",
|
||||
"create_port:fixed_ips": "rule:admin_or_network_owner",
|
||||
"create_port:port_security_enabled": "rule:admin_or_network_owner",
|
||||
"get_port": "rule:admin_or_owner",
|
||||
"update_port": "rule:admin_or_owner",
|
||||
"update_port:fixed_ips": "rule:admin_or_network_owner",
|
||||
"update_port:port_security_enabled": "rule:admin_or_network_owner",
|
||||
"delete_port": "rule:admin_or_owner",
|
||||
|
||||
"extension:service_type:view_extended": "rule:admin_only",
|
||||
"create_service_type": "rule:admin_only",
|
||||
"update_service_type": "rule:admin_only",
|
||||
"delete_service_type": "rule:admin_only",
|
||||
"get_service_type": "rule:regular_user"
|
||||
}
|
44
elements/quantum/os-config-applier/etc/quantum/quantum.conf
Normal file
44
elements/quantum/os-config-applier/etc/quantum/quantum.conf
Normal file
@ -0,0 +1,44 @@
|
||||
[DEFAULT]
|
||||
debug = True
|
||||
|
||||
network_vlan_ranges = {{interfaces.control}}
|
||||
|
||||
auth_strategy = keystone
|
||||
allow_overlapping_ips = False
|
||||
debug = True
|
||||
verbose = True
|
||||
core_plugin = quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2
|
||||
rabbit_host = {{rabbit.host}}
|
||||
rabbit_password = {{rabbit.password}}
|
||||
rpc_backend = quantum.openstack.common.rpc.impl_kombu
|
||||
|
||||
bind_host = 0.0.0.0
|
||||
|
||||
bind_port = 9696
|
||||
|
||||
api_paste_config = api-paste.ini
|
||||
|
||||
control_exchange = quantum
|
||||
|
||||
notification_driver = quantum.openstack.common.notifier.rpc_notifier
|
||||
|
||||
|
||||
notification_topics = notifications
|
||||
|
||||
[QUOTAS]
|
||||
|
||||
[DEFAULT_SERVICETYPE]
|
||||
|
||||
[SECURITYGROUP]
|
||||
|
||||
[AGENT]
|
||||
|
||||
[keystone_authtoken]
|
||||
auth_host = {{keystone.host}}
|
||||
auth_port = 35357
|
||||
auth_protocol = http
|
||||
auth_protocol = http
|
||||
admin_tenant_name = service
|
||||
admin_user = quantum
|
||||
admin_password = {{service-password}}
|
||||
signing_dir = /var/lib/quantum/keystone-signing
|
@ -0,0 +1,4 @@
|
||||
[DEFAULT]
|
||||
# List of directories to load filter definitions from (separated by ',').
|
||||
# These directories MUST all be only writeable by root !
|
||||
filters_path=/etc/quantum/rootwrap.d,/usr/share/quantum/rootwrap
|
4
elements/quantum/os-refresh-config/post-configure.d/76-quantum
Executable file
4
elements/quantum/os-refresh-config/post-configure.d/76-quantum
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -eux
|
||||
service quantum-server restart
|
||||
service quantum-openvswitch-agent restart
|
Loading…
Reference in New Issue
Block a user