diff --git a/defaults/main.yml b/defaults/main.yml index 7d4395b3..5132d8ac 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -90,20 +90,25 @@ glance_enable_v2_registry: False ## RabbitMQ info -## Configuration for RPC communications -glance_rabbitmq_userid: glance -glance_rabbitmq_vhost: /glance -glance_rabbitmq_port: 5672 -glance_rabbitmq_servers: 127.0.0.1 -glance_rabbitmq_use_ssl: False +## Oslo Messaging Info -## Configuration for notifications communication, i.e. [oslo_messaging_notifications] -glance_rabbitmq_telemetry_userid: "{{ glance_rabbitmq_userid }}" -glance_rabbitmq_telemetry_password: "{{ glance_rabbitmq_password }}" -glance_rabbitmq_telemetry_vhost: "{{ glance_rabbitmq_vhost }}" -glance_rabbitmq_telemetry_port: "{{ glance_rabbitmq_port }}" -glance_rabbitmq_telemetry_servers: "{{ glance_rabbitmq_servers }}" -glance_rabbitmq_telemetry_use_ssl: "{{ glance_rabbitmq_use_ssl }}" +# RPC + +glance_oslomsg_rpc_transport: rabbit +glance_oslomsg_rpc_servers: 127.0.0.1 +glance_oslomsg_rpc_port: 5672 +glance_oslomsg_rpc_use_ssl: False +glance_oslomsg_rpc_userid: glance +glance_oslomsg_rpc_vhost: /glance + +# Notify + +glance_oslomsg_notify_transport: rabbit +glance_oslomsg_notify_servers: 127.0.0.1 +glance_oslomsg_notify_port: 5672 +glance_oslomsg_notify_use_ssl: False +glance_oslomsg_notify_userid: glance +glance_oslomsg_notify_vhost: /glance ## Database info glance_db_setup_host: "{{ ('galera_all' in groups) | ternary(groups['galera_all'][0], 'localhost') }}" diff --git a/releasenotes/notes/oslo-messaging-separate-backends-61d279ded1bc999e.yaml b/releasenotes/notes/oslo-messaging-separate-backends-61d279ded1bc999e.yaml new file mode 100644 index 00000000..50a9fc29 --- /dev/null +++ b/releasenotes/notes/oslo-messaging-separate-backends-61d279ded1bc999e.yaml @@ -0,0 +1,20 @@ +--- +features: + - Support separate oslo.messaging services for RPC and Notifications + to enable operation of separate and different messaging backend servers. +deprecations: + - | + The rabbitmq server parameters have been replaced by corresponding + oslo.messaging RPC and Notify parameters in order to abstract the + messaging service from the actual backend server deployment. + - glance_oslomsg_rpc_servers replaces glance_rabbitmq_servers + - glance_oslomsg_rpc_port replaces glance_rabbitmq_port + - glance_oslomsg_rpc_use_ssl replaces glance_rabbitmq_use_ssl + - glance_oslomsg_rpc_userid replaces glance_rabbitmq_userid + - glance_oslomsg_rpc_vhost replaces glance_rabbitmq_vhost + - glance_oslomsg_notify_servers replaces glance_rabbitmq_telemetry_servers + - glance_oslomsg_notify_port replaces glance_rabbitmq_telemetry_port + - glance_oslomsg_notify_use_ssl replaces glance_rabbitmq_telemetry_use_ssl + - glance_oslomsg_notify_userid replaces glance_rabbitmq_telemetry_userid + - glance_oslomsg_notify_vhost replaces glance_rabbitmq_telemetry_vhost + - glance_oslomsg_notify_password replaces glance_rabbitmq_telemetry_password diff --git a/templates/glance-api.conf.j2 b/templates/glance-api.conf.j2 index 5b39fa6c..168da58c 100644 --- a/templates/glance-api.conf.j2 +++ b/templates/glance-api.conf.j2 @@ -26,7 +26,7 @@ enable_v2_registry = {{ glance_enable_v2_registry | bool }} data_api = glance.db.registry.api {% endif %} -transport_url = rabbit://{% for host in glance_rabbitmq_servers.split(',') %}{{ glance_rabbitmq_userid }}:{{ glance_rabbitmq_password }}@{{ host }}:{{ glance_rabbitmq_port }}{% if not loop.last %},{% else %}/{{ glance_rabbitmq_vhost }}{% endif %}{% endfor %} +transport_url = {{ glance_oslomsg_rpc_transport }}://{% for host in glance_oslomsg_rpc_servers.split(',') %}{{ glance_oslomsg_rpc_userid }}:{{ glance_oslomsg_rpc_password }}@{{ host }}:{{ glance_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ glance_oslomsg_rpc_vhost }}{% if glance_oslomsg_rpc_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} delayed_delete = False scrub_time = 43200 @@ -68,14 +68,13 @@ policy_default_rule = {{ glance_policy_default_rule }} policy_dirs = {{ glance_policy_dirs }} [oslo_messaging_rabbit] -ssl = {{ glance_rabbitmq_use_ssl }} rabbit_notification_exchange = glance rabbit_notification_topic = notifications {% if glance_ceilometer_enabled %} [oslo_messaging_notifications] driver = messagingv2 -transport_url = rabbit://{% for host in glance_rabbitmq_telemetry_servers.split(',') %}{{ glance_rabbitmq_telemetry_userid }}:{{ glance_rabbitmq_telemetry_password }}@{{ host }}:{{ glance_rabbitmq_telemetry_port }}{% if not loop.last %},{% else %}/{{ glance_rabbitmq_telemetry_vhost }}{% endif %}{% endfor %} +transport_url = {{ glance_oslomsg_notify_transport }}://{% for host in glance_oslomsg_notify_servers.split(',') %}{{ glance_oslomsg_notify_userid }}:{{ glance_oslomsg_notify_password }}@{{ host }}:{{ glance_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ glance_oslomsg_notify_vhost }}{% if glance_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} {% endif %} [paste_deploy] diff --git a/templates/glance-registry.conf.j2 b/templates/glance-registry.conf.j2 index 86e89491..65ae5b06 100644 --- a/templates/glance-registry.conf.j2 +++ b/templates/glance-registry.conf.j2 @@ -19,8 +19,7 @@ enable_v1_registry = {{ glance_enable_v1_api | bool }} enable_v2_api = {{ glance_enable_v2_api | bool }} enable_v2_registry = {{ glance_enable_v2_registry | bool }} -transport_url = rabbit://{% for host in glance_rabbitmq_servers.split(',') %}{{ glance_rabbitmq_userid }}:{{ glance_rabbitmq_password }}@{{ host }}:{{ glance_rabbitmq_port }}{% if not loop.last %},{% else %}/{{ glance_rabbitmq_vhost }}{% endif %}{% endfor %} - +transport_url = {{ glance_oslomsg_rpc_transport }}://{% for host in glance_oslomsg_rpc_servers.split(',') %}{{ glance_oslomsg_rpc_userid }}:{{ glance_oslomsg_rpc_password }}@{{ host }}:{{ glance_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ glance_oslomsg_rpc_vhost }}{% if glance_oslomsg_rpc_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} [database] connection = mysql+pymysql://{{ glance_galera_user }}:{{ glance_container_mysql_password }}@{{ glance_galera_address }}/{{ glance_galera_database }}?charset=utf8{% if glance_galera_use_ssl | bool %}&ssl_ca={{ glance_galera_ssl_ca_cert }}{% endif %} @@ -46,14 +45,13 @@ memcache_security_strategy = ENCRYPT memcache_secret_key = {{ memcached_encryption_key }} [oslo_messaging_rabbit] -ssl = {{ glance_rabbitmq_use_ssl }} rabbit_notification_exchange = glance rabbit_notification_topic = notifications {% if glance_ceilometer_enabled %} [oslo_messaging_notifications] driver = messagingv2 -transport_url = rabbit://{% for host in glance_rabbitmq_telemetry_servers.split(',') %}{{ glance_rabbitmq_telemetry_userid }}:{{ glance_rabbitmq_telemetry_password }}@{{ host }}:{{ glance_rabbitmq_telemetry_port }}{% if not loop.last %},{% else %}/{{ glance_rabbitmq_telemetry_vhost }}{% endif %}{% endfor %} +transport_url = {{ glance_oslomsg_notify_transport }}://{% for host in glance_oslomsg_notify_servers.split(',') %}{{ glance_oslomsg_notify_userid }}:{{ glance_oslomsg_notify_password }}@{{ host }}:{{ glance_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ glance_oslomsg_notify_vhost }}{% if glance_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} {% endif %} [oslo_policy] diff --git a/tests/inventory b/tests/inventory index 857bb886..a5950d2e 100644 --- a/tests/inventory +++ b/tests/inventory @@ -7,6 +7,12 @@ openstack1 infra1 openstack1 +[oslomsg_rpc_all] +infra1 + +[oslomsg_notify_all] +infra1 + [rabbitmq_all] infra1