Configure Cinder and Nova automatically in devstack

Change-Id: Icdc5b30911d2fcb39716aaa871cbbc0eef84641b
This commit is contained in:
Frédéric Guillot 2016-12-06 13:25:32 -05:00
parent 1ea561c3c8
commit 23d672ed12
2 changed files with 15 additions and 12 deletions

View File

@ -41,6 +41,16 @@ function almanach_configure {
iniset $ALMANACH_CONF database connection_url mongodb://localhost/almanach iniset $ALMANACH_CONF database connection_url mongodb://localhost/almanach
} }
function almanach_configure_external_services {
if is_service_enabled nova; then
iniset $NOVA_CONF DEFAULT notification_topics "almanach,notifications"
fi
if is_service_enabled cinder; then
iniset $CINDER_CONF DEFAULT notification_topics "almanach,notifications"
fi
}
# Create almanach related accounts in Keystone # Create almanach related accounts in Keystone
function almanach_create_accounts { function almanach_create_accounts {
OLD_OS_CLOUD=$OS_CLOUD OLD_OS_CLOUD=$OS_CLOUD
@ -89,6 +99,7 @@ if is_service_enabled almanach-api almanach-collector; then
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
echo_summary "Configuring Almanach" echo_summary "Configuring Almanach"
almanach_configure almanach_configure
almanach_configure_external_services
almanach_create_accounts almanach_create_accounts
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
echo_summary "Initializing Almanach" echo_summary "Initializing Almanach"

View File

@ -76,7 +76,7 @@ Protocol
The authentication mechanism use the HTTP header :code:`X-Auth-Token` to send a token. The authentication mechanism use the HTTP header :code:`X-Auth-Token` to send a token.
This token is validated through Keystone or with the config file (private secret key). This token is validated through Keystone or with the config file (private secret key).
:: :: code:: raw
GET /volume_types HTTP/1.1 GET /volume_types HTTP/1.1
X-Auth-Token: secret X-Auth-Token: secret
@ -93,7 +93,7 @@ Private Key Authentication
The private secret key authentication is the default method. The private secret key authentication is the default method.
In your config file, you have to define your private key in the field :code:`auth_token`: In your config file, you have to define your private key in the field :code:`auth_token`:
:: :: code:: raw
[auth] [auth]
strategy = private_key strategy = private_key
@ -106,7 +106,7 @@ Keystone Authentication
The token will be validated with Keystone. The token will be validated with Keystone.
To use this authentication backend you have to define the authentication strategy to :code:`keystone`. To use this authentication backend you have to define the authentication strategy to :code:`keystone`.
:: :: code:: raw
[auth] [auth]
strategy = keystone strategy = keystone
@ -123,7 +123,7 @@ Each OpenStack services (Nova, Cinder, Neutron) need to be configured to send no
For example with Nova, add the topic "almanach" in the config file :code:`/etc/nova.conf`: For example with Nova, add the topic "almanach" in the config file :code:`/etc/nova.conf`:
.. code:: bash .. code:: raw
notification_topics=almanach notification_topics=almanach
@ -153,14 +153,6 @@ Devstack configuration
enable_plugin almanach https://git.openstack.org/openstack/almanach enable_plugin almanach https://git.openstack.org/openstack/almanach
[[post-config|$NOVA_CONF]]
[DEFAULT]
notification_topics=almanach,notifications
[[post-config|$CINDER_CONF]]
[DEFAULT]
notification_topics=almanach,notifications
Database entities Database entities
----------------- -----------------