Let haproxy to be ODL websocket's frontend
This PS does: 1) Let haproxy to be ODL websocket's frontend and listen on port 8185. 2) Add 10-rest-connector.xml config file template for ODL container. 3) ODL websocket backend listen only on api interface, port is also 8185. Closes-Bug: #1745323 Change-Id: Id330d610c7cd8a239b0f77c8f5f47422d48b9977 Signed-off-by: Zhijiang Hu <hu.zhijiang@zte.com.cn>
This commit is contained in:
parent
b9504e94c5
commit
98b06a0586
@ -315,6 +315,7 @@ opendaylight_tomcat_redirect_port: "8663"
|
||||
opendaylight_karaf_ssh_port: "8101"
|
||||
opendaylight_openflow_port: "6653"
|
||||
opendaylight_ovsdb_port: "6641"
|
||||
opendaylight_websocket_port: "8185"
|
||||
|
||||
vitrage_api_port: "8999"
|
||||
|
||||
|
@ -929,4 +929,11 @@ listen opendaylight_api_backup
|
||||
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ opendaylight_restconf_port_backup }} check fall 5 inter 2000 rise 2
|
||||
{% endfor %}
|
||||
|
||||
listen opendaylight_websocket
|
||||
bind {{ kolla_internal_vip_address }}:{{ opendaylight_websocket_port }}
|
||||
balance source
|
||||
{% for host in groups['opendaylight'] %}
|
||||
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ opendaylight_websocket_port }} check fall 5 inter 2000 rise 2
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
|
@ -28,4 +28,5 @@
|
||||
or opendaylight_config_akka | changed
|
||||
or opendaylight_config_modules | changed
|
||||
or opendaylight_config_module_shards | changed
|
||||
or opendaylight_config_10_rest_connector | changed
|
||||
or check_opendaylight_containers | changed
|
||||
|
@ -160,6 +160,18 @@
|
||||
notify:
|
||||
- Restart opendaylight container
|
||||
|
||||
- name: Copying over 10-rest-connector.xml
|
||||
template:
|
||||
src: "{{ item }}"
|
||||
dest: "{{ node_config_directory }}/opendaylight/10-rest-connector.xml"
|
||||
with_first_found:
|
||||
- "{{ node_custom_config }}/opendaylight/{{ inventory_hostname }}/10-rest-connector.xml"
|
||||
- "{{ node_custom_config }}/opendaylight/10-rest-connector.xml"
|
||||
- "10-rest-connector.xml.j2"
|
||||
register: opendaylight_config_10_rest_connector
|
||||
notify:
|
||||
- Restart opendaylight container
|
||||
|
||||
- name: Check opendaylight containers
|
||||
kolla_docker:
|
||||
action: "compare_container"
|
||||
|
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
|
||||
|
||||
This program and the accompanying materials are made available under the
|
||||
terms of the Eclipse Public License v1.0 which accompanies this distribution,
|
||||
and is available at http://www.eclipse.org/legal/epl-v10.html
|
||||
-->
|
||||
<snapshot>
|
||||
<configuration>
|
||||
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
|
||||
<modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
|
||||
<!-- default OF-switch-connection-provider (port 6633) -->
|
||||
<module>
|
||||
<type xmlns:rest="urn:opendaylight:params:xml:ns:yang:controller:md:sal:rest:connector">rest:rest-connector-impl</type>
|
||||
<name>rest-connector-default-impl</name>
|
||||
<websocket-address>{{ hostvars[inventory_hostname]['ansible_' + hostvars[inventory_hostname]['api_interface']]['ipv4']['address'] }}</websocket-address>
|
||||
<websocket-port>{{ opendaylight_websocket_port }}</websocket-port>
|
||||
<dom-broker>
|
||||
<type xmlns:dom="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">dom:dom-broker-osgi-registry</type>
|
||||
<name>dom-broker</name>
|
||||
</dom-broker>
|
||||
</module>
|
||||
</modules>
|
||||
|
||||
<services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
|
||||
<service>
|
||||
<type xmlns:rest="urn:opendaylight:params:xml:ns:yang:controller:md:sal:rest:connector">rest:rest-connector</type>
|
||||
<instance>
|
||||
<name>rest-connector-default</name>
|
||||
<provider>
|
||||
/modules/module[type='rest-connector-impl'][name='rest-connector-default-impl']
|
||||
</provider>
|
||||
</instance>
|
||||
</service>
|
||||
</services>
|
||||
</data>
|
||||
</configuration>
|
||||
<required-capabilities>
|
||||
<capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:rest:connector?module=opendaylight-rest-connector&revision=2014-07-24</capability>
|
||||
</required-capabilities>
|
||||
</snapshot>
|
@ -78,6 +78,12 @@
|
||||
"dest": "/opt/opendaylight/configuration/initial/module-shards.conf",
|
||||
"owner": "odl",
|
||||
"perm": "0600"
|
||||
},
|
||||
{
|
||||
"source": "{{ container_config_directory }}/10-rest-connector.xml",
|
||||
"dest": "/opt/opendaylight/etc/opendaylight/karaf/10-rest-connector.xml",
|
||||
"owner": "odl",
|
||||
"perm": "0600"
|
||||
}
|
||||
],
|
||||
"permissions": [
|
||||
|
Loading…
Reference in New Issue
Block a user