
Most of the arrakis code moved here, using puppet-cassandra and puppet-zookeeper as dependencies Change-Id: I6bdfb80457c500e2c6ea98aeaa9e7c074757c6c7
111 lines
3.6 KiB
Plaintext
111 lines
3.6 KiB
Plaintext
<!DOCTYPE web-app PUBLIC
|
|
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
|
"http://java.sun.com/dtd/web-app_2_3.dtd" >
|
|
|
|
<web-app>
|
|
<display-name>MidoNet API</display-name>
|
|
|
|
<!-- REST API configuration -->
|
|
<!-- This value overrides the default base URI. This is typically set if
|
|
you are proxying the API server and the base URI that the clients use
|
|
to access the API is different from the actual server base URI. -->
|
|
<context-param>
|
|
<param-name>rest_api-base_uri</param-name>
|
|
<param-value>http://<%= @api_ip %>:<%= @api_port %>/midonet-api</param-value>
|
|
</context-param>
|
|
|
|
<!-- CORS configuration -->
|
|
<context-param>
|
|
<param-name>cors-access_control_allow_origin</param-name>
|
|
<param-value>*</param-value>
|
|
</context-param>
|
|
<context-param>
|
|
<param-name>cors-access_control_allow_headers</param-name>
|
|
<param-value>Origin, X-Auth-Token, Content-Type, Accept, Authorization</param-value>
|
|
</context-param>
|
|
<context-param>
|
|
<param-name>cors-access_control_allow_methods</param-name>
|
|
<param-value>GET, POST, PUT, DELETE, OPTIONS</param-value>
|
|
</context-param>
|
|
<context-param>
|
|
<param-name>cors-access_control_expose_headers</param-name>
|
|
<param-value>Location</param-value>
|
|
</context-param>
|
|
|
|
<!-- Auth configuration -->
|
|
<context-param>
|
|
<param-name>auth-auth_provider</param-name>
|
|
<!-- Specify the class path of the auth service -->
|
|
<%- if @keystone_auth -%>
|
|
<param-value>org.midonet.api.auth.keystone.v2_0.KeystoneService</param-value>
|
|
<%- else -%>
|
|
<param-value>org.midonet.api.auth.MockAuthService</param-value>
|
|
<%- end -%>
|
|
</context-param>
|
|
<context-param>
|
|
<param-name>auth-admin_role</param-name>
|
|
<param-value>admin</param-value>
|
|
</context-param>
|
|
|
|
<%- if @keystone_auth -%>
|
|
<%= scope.function_template(['midonet/midonet-api/keystone_config.xml.erb']) %>
|
|
<%- else -%>
|
|
<%= scope.function_template(['midonet/midonet-api/mockauth_config.xml.erb']) %>
|
|
<%- end -%>
|
|
|
|
<!-- Zookeeper configuration -->
|
|
<!-- The following parameters should match the ones in midolman.conf
|
|
except 'use_mock' -->
|
|
<context-param>
|
|
<param-name>zookeeper-use_mock</param-name>
|
|
<param-value>false</param-value>
|
|
</context-param>
|
|
<context-param>
|
|
<param-name>zookeeper-zookeeper_hosts</param-name>
|
|
<!-- comma separated list of Zookeeper nodes(host:port) -->
|
|
<%- zkarr = Array.new -%>
|
|
<%- @zk_servers.each do |s| -%>
|
|
<%- zkarr.push("#{s['ip']}:#{s['port'] ||= 2181 }") -%>
|
|
<%- end -%>
|
|
<param-value><%= zkarr.join(",") %></param-value>
|
|
</context-param>
|
|
<context-param>
|
|
<param-name>zookeeper-session_timeout</param-name>
|
|
<param-value>30000</param-value>
|
|
</context-param>
|
|
<context-param>
|
|
<param-name>zookeeper-midolman_root_key</param-name>
|
|
<param-value>/midonet/v1</param-value>
|
|
</context-param>
|
|
<context-param>
|
|
<param-name>zookeeper-curator_enabled</param-name>
|
|
<param-value>true</param-value>
|
|
</context-param>
|
|
|
|
<!-- VXLAN gateway configuration -->
|
|
<context-param>
|
|
<param-name>midobrain-vxgw_enabled</param-name>
|
|
<param-value><%= @vtep %></param-value>
|
|
</context-param>
|
|
|
|
<!-- Servlet Listner -->
|
|
<listener>
|
|
<listener-class>
|
|
<!-- Use Jersey's Guice compatible context listener -->
|
|
org.midonet.api.servlet.JerseyGuiceServletContextListener
|
|
</listener-class>
|
|
</listener>
|
|
|
|
<!-- Servlet filter -->
|
|
<filter>
|
|
<!-- Filter to enable Guice -->
|
|
<filter-name>Guice Filter</filter-name>
|
|
<filter-class>com.google.inject.servlet.GuiceFilter</filter-class>
|
|
</filter>
|
|
<filter-mapping>
|
|
<filter-name>Guice Filter</filter-name>
|
|
<url-pattern>/*</url-pattern>
|
|
</filter-mapping>
|
|
|
|
</web-app>
|