Skip to content

Installing From Source

Ryan Stewart edited this page Jun 13, 2022 · 8 revisions

Environment Requirements

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.

Once these dependencies are ready to go, we can move on to installing and compiling Blueflood:

Set up Blueflood for Development

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

Building

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.

Run Blueflood

bin/blueflood-start.sh

This Blueflood instance uses the config values present in contrib/getting-started/blueflood.properties which is discussed below.

Send some metrics!

Blueflood should now be available! Send some metrics! Check out the 10-minute guide for some examples.

Blueflood Configuration

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

The most important settings (the ones you probably want to change from the defaults) are documented below:

CoreConfig.java

  • 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.

HttpConfig.java

  • 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.

Logging Configuration

bin/blueflood-start.sh also uses a sample log4j properties file found at: contrib/getting-started/log4j.properties.

Setting up Blueflood on IntelliJ IDEA

If you use IntelliJ, here are some useful tips for setting up your development environment:

  1. IntelliJ can open Maven projects natively. Just tell it to open pom.xml, and it will set everything up properly.
  2. 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
  3. 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