Read config from sidecar.config System Property instead of classpath
authorAndrew Tolbert <andy_tolbert@apple.com>
Sun, 28 Jul 2019 05:11:22 +0000 (00:11 -0500)
committerDinesh Joshi <djoshi@apache.org>
Fri, 23 Aug 2019 23:36:02 +0000 (16:36 -0700)
commit14485bd7ad649d9417b4320eab34631251545d0b
tree2c15ba4005f3b9ce6ebb38dce5945cd1305bd555
parent2f9e3937a4c3a6963470eca2c9ec7768b700401b
Read config from sidecar.config System Property instead of classpath

Alters configuration processing to read from `sidecar.config` system
property instead of using `Configurations` file resolution, which seems
to read from classpath first.

Also does the following:

* Move `conf` into `src/dist/config`.  This causes the `conf` directory
  to be included in the tar and zip distributions where it previously
  was not.
* Don't add `conf` directory to classpath.  For logging add
  `-Dlogback.configuration` to arguments.  Also add `logback-test.xml`
  to have different logging behavior for tests.
* Copy agents into `build/install/appName/agents` directly instead of
  `src/dist`. Make `copyDist` depend on `copyJolokia`. This also has
  the side effect of having agents copied to the project directory, so
  `bin/CassandraSidecarDaemon` works after `./gradlew build`.
* Improve logging to include full address instead of just port.
* Add generated paths to gitignore

patch by Andrew Tolbert; reviewed by Dinesh Joshi and Vinay Chella for CASSANDRA-15288
.gitignore
CHANGES.txt
build.gradle
src/main/dist/conf/logback.xml [moved from conf/logback.xml with 100% similarity]
src/main/dist/conf/sidecar.yaml [moved from conf/sidecar.yaml with 100% similarity]
src/main/java/org/apache/cassandra/sidecar/CassandraSidecarDaemon.java
src/main/java/org/apache/cassandra/sidecar/MainModule.java
src/test/resources/logback-test.xml [new file with mode: 0644]