diff --git a/defaults/main.yml b/defaults/main.yml index 41ec428..db413e7 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -53,19 +53,22 @@ sahara_system_user_home: "/var/lib/{{ sahara_system_user_name }}" sahara_engine_host: "{{ internal_lb_vip_address }}" -## RabbitMQ info -sahara_rabbitmq_userid: sahara -sahara_rabbitmq_vhost: /sahara -sahara_rabbitmq_use_ssl: False -sahara_rabbitmq_servers: 127.0.0.1 -sahara_rabbitmq_port: 5672 +## Oslo Messaging Info +# RPC +sahara_oslomsg_rpc_transport: rabbit +sahara_oslomsg_rpc_servers: 127.0.0.1 +sahara_oslomsg_rpc_port: 5672 +sahara_oslomsg_rpc_use_ssl: False +sahara_oslomsg_rpc_userid: sahara +sahara_oslomsg_rpc_vhost: /sahara -## Configuration for notifications communication, i.e. [oslo_messaging_notifications] -sahara_rabbitmq_telemetry_userid: "{{ sahara_rabbitmq_userid }}" -sahara_rabbitmq_telemetry_vhost: "{{ sahara_rabbitmq_vhost }}" -sahara_rabbitmq_telemetry_port: "{{ sahara_rabbitmq_port }}" -sahara_rabbitmq_telemetry_servers: "{{ sahara_rabbitmq_servers }}" -sahara_rabbitmq_telemetry_use_ssl: "{{ sahara_rabbitmq_use_ssl }}" +# Notify +sahara_oslomsg_notify_transport: rabbit +sahara_oslomsg_notify_servers: 127.0.0.1 +sahara_oslomsg_notify_port: 5672 +sahara_oslomsg_notify_use_ssl: False +sahara_oslomsg_notify_userid: sahara +sahara_oslomsg_notify_vhost: /sahara ## Database info sahara_galera_database: sahara diff --git a/releasenotes/notes/oslo-messaging-separate-backends-702d7b33fda7a9f5.yaml b/releasenotes/notes/oslo-messaging-separate-backends-702d7b33fda7a9f5.yaml new file mode 100644 index 0000000..6fc7de6 --- /dev/null +++ b/releasenotes/notes/oslo-messaging-separate-backends-702d7b33fda7a9f5.yaml @@ -0,0 +1,19 @@ +--- +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. + - sahara_oslomsg_rpc_servers replaces sahara_rabbitmq_servers + - sahara_oslomsg_rpc_port replaces sahara_rabbitmq_port + - sahara_oslomsg_rpc_use_ssl replaces sahara_rabbitmq_use_ssl + - sahara_oslomsg_rpc_userid replaces sahara_rabbitmq_userid + - sahara_oslomsg_rpc_vhost replaces sahara_rabbitmq_vhost + - sahara_oslomsg_notify_servers replaces sahara_rabbitmq_telemetry_servers + - sahara_oslomsg_notify_port replaces sahara_rabbitmq_telemetry_port + - sahara_oslomsg_notify_use_ssl replaces sahara_rabbitmq_telemetry_use_ssl + - sahara_oslomsg_notify_userid replaces sahara_rabbitmq_telemetry_userid + - sahara_oslomsg_notify_vhost replaces sahara_rabbitmq_telemetry_vhost diff --git a/templates/sahara.conf.j2 b/templates/sahara.conf.j2 index 2631871..b9d0851 100644 --- a/templates/sahara.conf.j2 +++ b/templates/sahara.conf.j2 @@ -24,8 +24,7 @@ proxy_user_role_names = {{ sahara_proxy_user_role_names }} {% endif %} ## RPC Backend -transport_url = rabbit://{% for host in sahara_rabbitmq_servers.split(',') %}{{ sahara_rabbitmq_userid }}:{{ sahara_rabbitmq_password }}@{{ host }}:{{ sahara_rabbitmq_port }}{% if not loop.last %},{% else %}/{{ sahara_rabbitmq_vhost }}{% endif %}{% endfor %} - +transport_url = {{ sahara_oslomsg_rpc_transport }}://{% for host in sahara_oslomsg_rpc_servers.split(',') %}{{ sahara_oslomsg_rpc_userid }}:{{ sahara_oslomsg_rpc_password }}@{{ host }}:{{ sahara_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ sahara_oslomsg_rpc_vhost }}{% if sahara_oslomsg_rpc_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} [database] connection = mysql+pymysql://{{ sahara_galera_user }}:{{ sahara_container_mysql_password }}@{{ sahara_galera_address }}/{{ sahara_galera_database }}?charset=utf8{% if sahara_galera_use_ssl | bool %}&ssl_ca={{ sahara_galera_ssl_ca_cert }}{% endif %} @@ -64,12 +63,8 @@ policy_dirs = {{ sahara_policy_dirs }} {% if sahara_ceilometer_enabled %} [oslo_messaging_notifications] driver = messagingv2 -transport_url = rabbit://{% for host in sahara_rabbitmq_telemetry_servers.split(',') %}{{ sahara_rabbitmq_telemetry_userid }}:{{ sahara_rabbitmq_telemetry_password }}@{{ host }}:{{ sahara_rabbitmq_telemetry_port }}{% if not loop.last %},{% else %}/{{ sahara_rabbitmq_telemetry_vhost }}{% endif %}{% endfor %} +transport_url = {{ sahara_oslomsg_notify_transport }}://{% for host in sahara_oslomsg_notify_servers.split(',') %}{{ sahara_oslomsg_notify_userid }}:{{ sahara_oslomsg_notify_password }}@{{ host }}:{{ sahara_oslomsg_notify_port }}{% if not loop.last %},{% else %}/{{ sahara_oslomsg_notify_vhost }}{% if sahara_oslomsg_notify_use_ssl | bool %}?ssl=1{% else %}?ssl=0{% endif %}{% endif %}{% endfor %} {% endif %} - -[oslo_messaging_rabbit] -ssl = {{ sahara_rabbitmq_use_ssl }} - [profiler] enabled = {{ sahara_profiler_enabled }} diff --git a/tests/inventory b/tests/inventory index ccdf939..5c378b3 100644 --- a/tests/inventory +++ b/tests/inventory @@ -9,6 +9,12 @@ infra1 openstack1 sahara1 +[oslomsg_rpc_all] +infra1 + +[oslomsg_notify_all] +infra1 + [rabbitmq_all] infra1