diff --git a/manifests/node/api.pp b/manifests/node/api.pp index 910230a..b944225 100644 --- a/manifests/node/api.pp +++ b/manifests/node/api.pp @@ -35,5 +35,13 @@ class kickstack::node::api inherits kickstack { if $keystone_internal_address and $nova_sql_conn and $amqp_host and $amqp_password { include kickstack::nova::api + + # This looks a bit silly, but is currently necessary: in order to configure nova-api + # as a Quantum client, we first need to install nova-api and quantum-server in one + # run, and then fix up Nova with the Quantum configuration in the next run. + $quantum_keystone_password = getvar("${::kickstack::fact_prefix}quantum_keystone_password") + if $quantum_keystone_password { + include kickstack::nova::quantumclient + } } } diff --git a/manifests/nova/quantumclient.pp b/manifests/nova/quantumclient.pp new file mode 100644 index 0000000..f9b7044 --- /dev/null +++ b/manifests/nova/quantumclient.pp @@ -0,0 +1,19 @@ +class kickstack::nova::quantumclient inherits kickstack { + + include kickstack::nova::config + + $keystone_internal_address = getvar("${fact_prefix}keystone_internal_address") + $quantum_admin_password = getvar("${fact_prefix}quantum_keystone_password") + $quantum_host = getvar("${fact_prefix}quantum_host") + + class { '::nova::network::quantum': + quantum_admin_password => $quantum_admin_password, + quantum_auth_strategy => 'keystone', + quantum_url => "http://${quantum_host}:9696", + quantum_admin_tenant_name => "$::kickstack::keystone_service_tenant", + quantum_region_name => "$::kickstack::keystone_region", + quantum_admin_username => 'quantum', + quantum_admin_auth_url => "http://${keystone_internal_address}:35357/v2.0", + security_group_api => 'quantum', + } +}