Setting up Tribefire in a Distributed Environment
Follow these instructions to set up tribefire in a distributed environment.
On this page
General
Setting up tribefire in a distributed environment results in tribefire services and cartridges being provided from separate servers, improving tribefire performance and scalability.
Prerequisites
You need the following items to complete the setup:
- Messaging infrastructure server
You can set up your messaging server based on the
ActiveMQ
cartridge, for details see ActiveMQ cartridge (if you have it in your setup). ActiveMQ
messaging plugins for service and cartridge servers (do NOT extract the files): https://artifactory.server/artifactory/core-stable/com/braintribe/activemq/jms-active-mq-messaging-plugin/- A
JSON
configuration file calledconfiguration.shared.json
, used by service and cartridge servers, pointing to the listening port on the messaging infrastructure server ("hostAddress": "tcp://localhost:61616"
in the below example):
{
"_type" : "com.braintribe.cartridge.common.processing.configuration.url.model.RegistryEntry",
"bindId" : "tribefire-mq",
"denotation" : {
"_type" : "com.braintribe.model.messaging.jms.JmsActiveMqConnection",
"name" : "ActiveMq Denotation",
"hostAddress": "tcp://localhost:61616"
}
}
Setting up the Cartridge Server
This tribefire server stores the cartridges you're using, while the functionality is provided separately.
- Install tribefire in your target destination using the following command:
jinni setup-local-tomcat-platform --setupDependency tribefire.cortex.assets:tribefire-standard-aggregator#2.0 --installationPath *yourInstallationPath*
. ReplaceyourInstallationPath
with the actual destination. - Set up your hosting port in
/runtime/host/conf/server.xml
(change the associated ports too). For this procedure, we're going to assume the cartridge server port is28080
. - Remove the
/storage
and/runtime/host/webapps/tribefire-services
folders. We don't need these in the cartridge server. - In the file
/runtime/host/webapps/ROOT/index.html
, change theURL
to"/tribefire-manager"
(as we no longer have services on this server). - Add the
ActiveMQ
plugin to the/plugins
folder (create it if necessary). Do NOT extract the plugin. - Add the
configuration.shared.json
file to the/conf
folder. - Set up the runtime properties in the
/conf/tribefire.properties
file as follows:- TRIBEFIRE_SERVICES_URL=
http\://localhost\:18080/tribefire-services
(the services are provided from the other server) - TRIBEFIRE_NODE_ID=
cartridge-demo\#0
- TRIBEFIRE_LOCAL_BASE_URL=
http\://localhost\:28080
- TRIBEFIRE_CONFIGURATION_DIR=
${TRIBEFIRE_INSTALLATION_ROOT_DIR}/conf
- TRIBEFIRE_PLUGINS_DIR=
${TRIBEFIRE_INSTALLATION_ROOT_DIR}/plugins
- TRIBEFIRE_IS_EXTENSION_HOST=
true
- TRIBEFIRE_SERVICES_URL=
- Navigate to
yourInstallationDirectory/runtime/host/bin
and start the server (run thecatalina start
command, or open thetribefire-console-start
file).
Setting up Tribefire Services Server
This server provides the actual tribefire functionality, while using cartridges from the cartridge server.
- Install tribefire in your target destination using the following command:
jinni setup-local-tomcat-platform --setupDependency tribefire.cortex.assets:tribefire-standard-aggregator#2.0 --installationPath *yourInstallationPath*
. ReplaceyourInstallationPath
with the actual destination. - Set up your hosting port in
/runtime/host/conf/server.xml
(change all associated ports too). For this procedure, we're going to assume the cartridge server port is18080
. - Add the
ActiveMQ
plugin to the/plugins
folder (create it if necessary). Do NOT unzip the plugin. - Add the
configuration.shared.json
file to the/conf
folder. - Set up the runtime properties in the
/conf/tribefire.properties
file as follows:- TRIBEFIRE_CARTRIDGE_URL_DEMO=
http\://localhost\:28080/tribefire-demo-cartridge
- points to the cartridge on the other server - TRIBEFIRE_IS_CLUSTERED=
true
- TRIBEFIRE_CARTRIDGE_URL_DEMO=
- Navigate to
yourInstallationDirectory/runtime/host/bin
and start the server (run thecatalina run
command, or open thetribefire-console-start
file). That's it! You should now be able to detect, synchronize, and deploy the cartridges from the cartridge server.