diff --git a/defaults/main.yml b/defaults/main.yml index 31c250e8..5eb074d7 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -62,23 +62,23 @@ octavia_db_max_overflow: 20 octavia_db_pool_size: 120 octavia_db_pool_timeout: 30 -## RabbitMQ info +## Oslo Messaging -## Configuration for RPC communications -octavia_rabbitmq_userid: octavia -octavia_rabbitmq_vhost: /octavia -octavia_rabbitmq_servers: 127.0.0.1 -octavia_rabbitmq_use_ssl: False -octavia_rabbitmq_port: 5672 - -## Configuration for notifications communication, i.e. [oslo_messaging_notifications] -octavia_rabbitmq_telemetry_userid: "{{ octavia_rabbitmq_userid }}" -octavia_rabbitmq_telemetry_password: "{{ octavia_rabbitmq_password }}" -octavia_rabbitmq_telemetry_vhost: "{{ octavia_rabbitmq_vhost }}" -octavia_rabbitmq_telemetry_port: "{{ octavia_rabbitmq_port }}" -octavia_rabbitmq_telemetry_servers: "{{ octavia_rabbitmq_servers }}" -octavia_rabbitmq_telemetry_use_ssl: "{{ octavia_rabbitmq_use_ssl }}" +# RPC +octavia_oslomsg_rpc_transport: rabbit +octavia_oslomsg_rpc_servers: 127.0.0.1 +octavia_oslomsg_rpc_port: 5672 +octavia_oslomsg_rpc_use_ssl: False +octavia_oslomsg_rpc_userid: octavia +octavia_oslomsg_rpc_vhost: /octavia +# Notify +octavia_oslomsg_notify_transport: rabbit +octavia_oslomsg_notify_servers: 127.0.0.1 +octavia_oslomsg_notify_port: 5672 +octavia_oslomsg_notify_use_ssl: False +octavia_oslomsg_notify_userid: octavia +octavia_oslomsg_notify_vhost: /octavia ## octavia User / Group octavia_system_user_name: octavia @@ -180,7 +180,8 @@ octavia_services: octavia_required_secrets: - keystone_auth_admin_password - octavia_container_mysql_password - - octavia_rabbitmq_password + - octavia_oslomsg_rpc_password + - octavia_oslomsg_notify_password - octavia_service_password - memcached_encryption_key @@ -251,18 +252,19 @@ octavia_sync_provisioning_status: False # OSA is architected to use vHosts for queues so we need to post events # into the Neutron queue for them to be picked up -neutron_rabbitmq_userid: neutron -neutron_rabbitmq_vhost: /neutron -neutron_rabbitmq_port: 5672 -neutron_rabbitmq_servers: 127.0.0.1 -neutron_rabbitmq_use_ssl: False -neutron_rabbitmq_password: changeme +neutron_oslomsg_rpc_userid: neutron +neutron_oslomsg_rpc_vhost: /neutron +neutron_oslomsg_rpc_transport: rabbit +neutron_oslomsg_rpc_port: 5672 +neutron_oslomsg_rpc_servers: 127.0.0.1 +neutron_oslomsg_rpc_use_ssl: False +neutron_oslomsg_rpc_password: changeme # For additional security use a different user on the Neutron queue # for Octavia with restricted access to only the event streamer # queues -octavia_neutron_rabbitmq_userid: "{{ neutron_rabbitmq_userid }}" -octavia_neutron_rabbitmq_password: "{{ neutron_rabbitmq_password }}" +octavia_neutron_oslomsg_rpc_userid: "{{ neutron_oslomsg_rpc_userid }}" +octavia_neutron_oslomsg_rpc_password: "{{ neutron_oslomsg_rpc_password }}" # this controls if Octavia should add an anti-affinity hint to make sure # two amphora are not placed pn the same host (the most common setup of diff --git a/releasenotes/notes/oslo-messaging-separate-backends-e8a0b6857f2a9749.yaml b/releasenotes/notes/oslo-messaging-separate-backends-e8a0b6857f2a9749.yaml new file mode 100644 index 00000000..8bc8ce2c --- /dev/null +++ b/releasenotes/notes/oslo-messaging-separate-backends-e8a0b6857f2a9749.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. + - octavia_oslomsg_rpc_servers replaces octavia_rabbitmq_servers + - octavia_oslomsg_rpc_port replaces octavia_rabbitmq_port + - octavia_oslomsg_rpc_use_ssl replaces octavia_rabbitmq_use_ssl + - octavia_oslomsg_rpc_userid replaces octavia_rabbitmq_userid + - octavia_oslomsg_rpc_vhost replaces octavia_rabbitmq_vhost + - octavia_oslomsg_notify_servers replaces octavia_rabbitmq_telemetry_servers + - octavia_oslomsg_notify_port replaces octavia_rabbitmq_telemetry_port + - octavia_oslomsg_notify_use_ssl replaces octavia_rabbitmq_telemetry_use_ssl + - octavia_oslomsg_notify_userid replaces octavia_rabbitmq_telemetry_userid + - octavia_oslomsg_notify_vhost replaces octavia_rabbitmq_telemetry_vhost + - octavia_oslomsg_notify_password replaces octavia_rabbitmq_telemetry_password diff --git a/templates/octavia.conf.j2 b/templates/octavia.conf.j2 index b6e0fc44..68dfb1e9 100644 --- a/templates/octavia.conf.j2 +++ b/templates/octavia.conf.j2 @@ -25,7 +25,10 @@ auth_strategy = {{ octavia_auth_strategy }} # For HA, specify queue nodes in cluster, comma delimited: # transport_url = rabbit://:@server01,:@server02/ -transport_url = rabbit://{% for host in octavia_rabbitmq_servers.split(',') %}{{ octavia_rabbitmq_userid }}:{{ octavia_rabbitmq_password }}@{{ host }}:{{ octavia_rabbitmq_port }}{% if not loop.last %},{% else %}/{{ octavia_rabbitmq_vhost }}{% endif %}{% endfor %} +transport_url = {{ octavia_oslomsg_rpc_transport }}://{% for host in octavia_oslomsg_rpc_servers.split(',') %}{{ octavia_oslomsg_rpc_userid }}:{{ octavia_oslomsg_rpc_password }}@{{ host }}:{{ octavia_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ octavia_oslomsg_rpc_vhost }}{% if octavia_oslomsg_rpc_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} + +[oslo_messaging_notifications] +transport_url = {{ octavia_oslomsg_notify_transport }}://{% for host in octavia_oslomsg_notify_servers.split(',') %}{{ octavia_oslomsg_notify_userid }}:{{ octavia_oslomsg_notify_password }}@{{ host }}:{{ octavia_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ octavia_oslomsg_notify_vhost }}{% if octavia_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} [api_settings] bind_host = 0.0.0.0 @@ -43,7 +46,7 @@ allow_tls_terminated_listeners = {{ octavia_tls_listener_enabled }} # pre Ocata [oslo_messaging_rabbit] -ssl = {{ octavia_rabbitmq_use_ssl }} +ssl = {{ octavia_oslomsg_rpc_use_ssl }} rpc_conn_pool_size = {{ octavia_rpc_conn_pool_size }} [database] @@ -241,7 +244,7 @@ event_stream_topic = neutron_lbaas_event # Put it into the Neutron queue {% if octavia_event_streamer|bool %} -event_stream_transport_url = rabbit://{% for host in neutron_rabbitmq_servers.split(',') %}{{ octavia_neutron_rabbitmq_userid }}:{{ octavia_neutron_rabbitmq_password }}@{{ host }}:{{ neutron_rabbitmq_port }}{% if not loop.last %},{% else %}/{{ neutron_rabbitmq_vhost }}{% endif %}{% endfor %} +event_stream_transport_url = {{ neutron_oslomsg_rpc_transport }}://{% for host in neutron_oslomsg_rpc_servers.split(',') %}{{ octavia_neutron_oslomsg_rpc_userid }}:{{ octavia_neutron_oslomsg_rpc_password }}@{{ host }}:{{ neutron_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ neutron_oslomsg_rpc_vhost }}{% if neutron_oslomsg_rpc_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} {% endif %} diff --git a/tests/inventory b/tests/inventory index cdd10ea5..a3dd94cb 100644 --- a/tests/inventory +++ b/tests/inventory @@ -11,6 +11,12 @@ openstack1 swift-storage1 octavia1 +[oslomsg_rpc_all] +infra1 + +[oslomsg_notify_all] +infra1 + [rabbitmq_all] infra1 @@ -148,4 +154,4 @@ swift_obj [swift_remote_all] [utility_all] -infra1 \ No newline at end of file +infra1 diff --git a/tests/os_octavia-overrides.yml b/tests/os_octavia-overrides.yml index c414a903..dd01ea84 100644 --- a/tests/os_octavia-overrides.yml +++ b/tests/os_octavia-overrides.yml @@ -46,12 +46,20 @@ octavia_galera_address: "{{ test_galera_host }}" octavia_galera_database: octavia octavia_galera_user: octavia octavia_container_mysql_password: "secrete" -octavia_rabbitmq_password: "{{ rabbitmq_password }}" -octavia_rabbitmq_userid: octavia -octavia_rabbitmq_vhost: /octavia -octavia_rabbitmq_servers: "{{ rabbitmq_servers }}" -octavia_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}" -octavia_rabbitmq_port: "{{ rabbitmq_port }}" +octavia_oslomsg_rpc_transport: "{{ oslomsg_rpc_transport }}" +octavia_oslomsg_rpc_password: "{{ oslomsg_rpc_password }}" +octavia_oslomsg_rpc_userid: octavia +octavia_oslomsg_rpc_vhost: /octavia +octavia_oslomsg_rpc_servers: "{{ oslomsg_rpc_servers }}" +octavia_oslomsg_rpc_use_ssl: "{{ oslomsg_rpc_use_ssl }}" +octavia_oslomsg_rpc_port: "{{ oslomsg_rpc_port }}" +octavia_oslomsg_notify_transport: "{{ oslomsg_notify_transport }}" +octavia_oslomsg_notify_password: "{{ oslomsg_notify_password }}" +octavia_oslomsg_notify_userid: octavia +octavia_oslomsg_notify_vhost: /octavia +octavia_oslomsg_notify_servers: "{{ oslomsg_notify_servers }}" +octavia_oslomsg_notify_ssl: "{{ oslomsg_notify_use_ssl }}" +octavia_oslomsg_notify_port: "{{ oslomsg_notify_port }}" octavia_standalone: False octavia_swift_temp_url_secret_key: secrete octavia_keystone_auth_plugin: password diff --git a/tests/test-install-octavia.yml b/tests/test-install-octavia.yml index 81c03b93..7327bd71 100644 --- a/tests/test-install-octavia.yml +++ b/tests/test-install-octavia.yml @@ -16,10 +16,13 @@ remote_user: root gather_facts: true pre_tasks: - - include: common/ensure-rabbitmq.yml - vhost_name: "{{ octavia_rabbitmq_vhost }}" - user_name: "{{ octavia_rabbitmq_userid }}" - user_password: "{{ octavia_rabbitmq_password }}" + - include: common/ensure-oslomsg.yml + rpc_vhost: "{{ octavia_oslomsg_rpc_vhost }}" + rpc_user: "{{ octavia_oslomsg_rpc_userid }}" + rpc_password: "{{ octavia_oslomsg_rpc_password }}" + notify_vhost: "{{ octavia_oslomsg_notify_vhost }}" + notify_user: "{{ octavia_oslomsg_notify_userid }}" + notify_password: "{{ octavia_oslomsg_notify_password }}" - include: common/create-grant-db.yml db_name: "{{ octavia_galera_database }}" db_password: "{{ octavia_container_mysql_password }}"