-
Notifications
You must be signed in to change notification settings - Fork 101
FAQs
pprasanna edited this page Jul 17, 2013
·
4 revisions
- Update "eureka.port" to your desired port number, in eureka-server/conf/eureka-client.properties
- Update "eureka.serviceUrl.defaultZone" and "eureka.serviceUrl.default.defaultZone" to your desired machine name and/or port, in eureka-server/conf/eureka-client-test.properties
- Build and deploy Eureka
- Update "eureka.serviceUrl.default" to your desired machine name and/or port, in rss-middletier/src/main/resources/middletier.properties
- Update "eureka.serviceUrl.default" to your desired machine name and/or port, in rss-edge/src/main/resources/edge.properties
- Build and deploy middletier and edge
- Update build.gradle to the following for rss-middletier project
project(':rss-middletier') {
apply plugin: 'war'
sourceSets.main.java.srcDir 'src/main/java'
war {
from('conf') {
include 'rss-middletier*'
include 'rss-core*'
include 'log4j.properties'
into 'WEB-INF/classes/'
}
webXml = file('WEB-INF/web.xml') // copies a file to WEB-INF/web.xml
}
dependencies {
compile project(':rss-core')
compile 'org.apache.httpcomponents:httpclient:4.1.2'
compile 'com.netflix.astyanax:astyanax:1.56.16'
compile 'asm:asm-all:3.2'
compile 'commons-io:commons-io:2.4'
compile 'commons-configuration:commons-configuration:1.9'
compile 'com.sun.jersey:jersey-server:1.9.1'
}
delete 'testlibs'
copy {
from zipTree('build/libs/'+ war.archiveName)
into 'testlibs'
include 'WEB-INF/lib/'
}
}
- Add a new file "rss-middletier/WEB-INF/web.xml" with the following contents
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<listener>
<listener-class>com.netflix.karyon.server.guice.KaryonGuiceContextListener</listener-class>
</listener>
<servlet>
<servlet-name>Jersey REST Service</servlet-name>
<servlet-class>
com.sun.jersey.spi.container.servlet.ServletContainer
</servlet-class>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>com.sun.jersey;com.netflix</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Jersey REST Service</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<filter>
<filter-name>guiceFilter</filter-name>
<filter-class>com.google.inject.servlet.GuiceFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>guiceFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
- Update "eureka.port" to the appopriate Tomcat port where middletier will run, in rss-middletier/src/main/resources/middletier.properties
- Build middletier
- Copy rss-middletier/build/libs/rss-middletier-*.war into Tomcat webapps directory
- Export environmental variables to Catalina
export CATALINA_OPTS="-Darchaius.deployment.applicationId=middletier -Darchaius.deployment.environment=dev"
- Start tomcat
Same as the above as middletier