Deploying MessageListenerApp - scottlove/MessageProducer GitHub Wiki
Instructions for deploying Message Listener application.
Pre-Req's:
-
Set up zookeeper (3 instances)
-
Set up kafka (2 broker instances)
Message Server App installation
-
Create app directory in ~/Home
-
Copy MessageServerapp to app directory
pscp -r -P 50437 .\MessageServerApp.jar hostname:myappdir/app
- copy app.properties to app directory
pscp -r -P 50437 .\app.properties hostname:myappdir/app
-
use putty to log in to Netty1 server
-
edit app.properties to include the following two (rest can be deleted)
metadata.broker.list = KafkaServer:9092,KafkaServer2:9093 port=8080
set up upstart to auto launch MessageServerApp
- create /etc/init/MessageServerApp.conf with following contents description "MessageServerApp"
start on filesystem and net-device-up IFACE=lo
stop on runlevel [!023456]
console log
chdir myappdir//app
exec java -jar MessageServerApp.jar
Setting up Monitor application on ApacheServer1
- upload Monitor app to ~/Home/app/MessageMonitor
pscp -r -P 56204 .\MessageMonitor.jar hostname:myappdir/app/MessageMonitor
- upload app.properties to ~/Home/app/MessageMonitor
pscp -r -P 56204 .\app.properties hostname:myappdir//app/MessageMonitor
#Installing MessageAggApp MessageAggApp configurations
- agg_port_local=8081
- agg_port_azure=8081
- agg_host_local=localhost
- agg_port_azure=ApacheHost1
upload to server (initially using ApacheHost1) pscp -r -P 56204 .* [email protected]:/home/scottlove/app/MessageAgg
3)Upstart: Add MessageAgg.conf to /etc/init
description "MessageListener"
start on filesystem and net-device-up IFACE=lo
stop on runlevel [!023456]
console expect daemon
respawn
respawn limit 10 5
chdir /home/scottlove/app/MessageAgg
exec java -jar MessageAgg.jar
- Set up IntegrationTest for messageAgg pscp -r -P 56204 .* [email protected]:/home/scottlove/app/integrationTests copy app.properties into integrationTests directory
Set up sample Consumer
- upload ConsumerSample to ~/Home/app/ConsumerSample
pscp -r -P 56204 .\ConsumerSample.jar hostname:myappdir/app/ConsumerSample
- upload app.properties to ~/Home/app/ConsumerSample
pscp -r -P 56204 .\app.properties [email protected]:hostname:myappdir/MessageMonitor