-
Notifications
You must be signed in to change notification settings - Fork 102
Installing From Source
Blueflood has several key requirements to run. We have a couple pages to install these requirements. If you prefer to run these in containers, check out the 10 Minute Guide, which has those instructions.
- Installing Java, Cassandra, git and maven are explained here:
- While installing Elasticsearch for Blueflood is explained here:
Once these dependencies are ready to go, we can move on to installing and compiling Blueflood:
The latest code will always be on Github.
git clone https://github.com/rackerlabs/blueflood.git
cd blueflood
You can run the entire suite of tests using Maven:
mvn verify
Build an 'uber jar' using maven:
mvn package -P skip-unit-tests,skip-integration-tests
The uber jar will be found in ${BLUEFLOOD_DIR}/blueflood-all/target/blueflood-all-${VERSION}-jar-with-dependencies.jar. This jar contains all the dependencies necessary to run Blueflood with a very simple classpath.
bin/blueflood-start.sh
This Blueflood instance uses the config values present in contrib/getting-started/blueflood.properties
which is discussed below.
Blueflood should now be available! Send some metrics! Check out the 10-minute guide for some examples.
Some configuration options con be controlled via a blueflood.properties file.
A sample blueflood.properties
resides at contrib/getting-started/blueflood.properties. The file bin/blueflood-start.sh
is set to read this blueflood.properties
file by default.
You can get a good understanding of these settings by examining the defaults stored in the source
- CoreConfig.java: The most common settings.
- ElasticIOConfig.java: Settings related to Elastic Search indexing.
- HttpConfig.java: Settings related to configuring the HTTP ingest and query endpoints.
The most important settings (the ones you probably want to change from the defaults) are documented below:
- CASSANDRA_HOSTS: A comma delimited list of host:port tuples. These are the primary hosts that blueflood will communicate with.
-
DEFAULT_CASSANDRA_PORT: This should be the same port included in
CASSANDRA_HOSTS
. - ROLLUP_KEYSPACE: The cassandra keyspace to connect to.
-
INGESTION_MODULES: A comma-delimited list of fully qualified class names indicating which ingestion modules you wish to activate.
You probably should start out with
com.rackspacecloud.blueflood.service.HttpIngestionService
. -
QUERY_MODULES: Same as above but for query modules. Start with
com.rackspacecloud.blueflood.service.HttpQueryService
. -
ZOOKEEPER_CLUSTER: A comma delimited list of host:port tuples.
It is recommended to set to
NONE
until you need Zookeeper to coordinate rollup slaves. - INGEST_MODE: Boolean that activates ingestion services.
- QUERY_MODE: Boolean that activates query services.
- ROLLUP_MODE: Boolean that activates rollup services.
- HTTP_INGESTION_PORT: Port where HTTP ingestion will bind.
- HTTP_INGESTION_HOST: Address where HTTP ingestion will listen on.
- HTTP_METRIC_DATA_QUERY_PORT: Port where HTTP query will bind.
- HTTP_QUERY_HOST: Address where HTTP query will listen on.
bin/blueflood-start.sh
also uses a sample log4j properties file found at: contrib/getting-started/log4j.properties.
If you use IntelliJ, here are some useful tips for setting up your development environment:
- IntelliJ can open Maven projects natively. Just tell it to open
pom.xml
, and it will set everything up properly. - Create run configurations for each mode you want to run blueflood in, for example in order to run blueflood in only ingest mode with query and rollup off, specify in your blueflood.properties as:
INGEST_MODE=true
ROLLUP_MODE=false
QUERY_MODE=false
- Then supply
blueflood.config
as a system property in the run configuration: *-Dblueflood.config=file://path/to/blueflood.properties
Other configurations you might want to supply as system properties are
-Dlog4j.configuration=file:\\path\to\blueflood-log4j.properties
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=localhost
-Dcom.sun.management.jmxremote.port=9180
For any run configuration, supply the main class as:
com.rackspacecloud.blueflood.service.BluefloodServiceStarter