pauloricardomg opened a new pull request, #277:
URL: https://github.com/apache/cassandra-sidecar/pull/277
# Changes summary
## Functionality
* `ProcessRuntimeConfiguration`: represents the runtime configuration of a
cassandra process, like environment variables, cassandra_home, cassandra_conf,
etc. defined in `sidecar.yaml`
* `ProcessLifecycleProvider.start`: constructs Cassandra runtime
configuration from instance and global parameters and uses java
`ProcessBuilder` API to start a Cassandra process writing a pidfile to the
lifecycle state directory.
* `ProcessLifecycleProvider.stop`: uses the pidfile to fetch process handle
and send SIGKILL to stop the Cassandra process gracefully.
* `ProcessLifecycleProvider.isRunning`: a Cassandra process is considered
running if a PID file exists in the lifecycle state directory and a process
with that PID is currently running.
* `InstanceMetadata` and `InstanceConfiguration`: expose `storageDir` and
instance-specific `lifecycleOptions`
## Documentation
* Add `examples/lifecycle/README.md` with an example on starting/stopping
cassandra via lifecycle API
* Update default sidecar.yaml with example and comments on how to enable
`ProcessLifecycleProvider`
## Infrastructure
* Update `build.gradle`, `integrationTestTask.gradle` and
`gradle.properties` to support running `ProcessLifecycleProvider` integration
tests
* Add `scripts/build-cassandra-tarball.sh` and update
scripts/build-dtest-jars.sh` to build tarballs (requirement for running
integration tests)
* Update `.circleci/config.yml` to download cassandra tarballs for
`ProcessLifecycleProviderIntegrationTest` and run integration tests for each
supported version (4.0/5.0/5.1)
## Testing
* Add unit tests for `ProcessLifecycleProvider` to check runtime
configuration is being constructed correctly and basic workflow
(start/stop/status) with `FakeLifecycleProvider`
* Add unit tests for `ProcessRuntimeConfiguration` to test start command
construction and precondition validations
* `ProcessLifecycleProviderIntegrationTest`: configures a local Cassandra
install from a tarball in a temporary directory and run tests from
LifecycleProviderIntegrationTester (start/stop/status)
* `TestFileUtils`: contains utilities to install the cassandra tarball for
`ProcessLifecycleProviderIntegrationTest`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]