Environment variables needed: export AWS_UPLOAD_REGION='' export S3_BUCKET='' export S3_DIR_PATH=''
Tools Needed : Go, AWS Cli, Python3
Script : ./build.sh
All DC/OS Cassandra documentation is in the /docs
folder of this repository.
- Overview
- Quick Start
- Install and Customize
- Upgrade
- Uninstall
- Multi-Datacenter Deployments
- Configuring
- Connecting Clients
- Backup and Restore
- Managing
- API Reference
- Troubleshooting
- Limitations
For running a local setup of dcos-cassandra-service-
-
Follow the guidelines as listed on: https://mesosphere.github.io/cassandra-mesos/docs/#local-setup to setup mesos and zookeeper locally. Make some changes to expose appropriate ports in master and agent. Sample script named 1.0.3-mesos-master-slave-launcher.sh can be referenced.
-
Execute generateArtifacts.sh to generate artifacts
-
Change /cassandra-scheduler/src/dist/conf/scheduler.yml to contain the path to local resources. Resources whose paths are to be changed are: command : ${EXECUTOR_COMMAND:-"export LD_LIBRARY_PATH=$MESOS_SANDBOX/:$LD_LIBRARY_PATH && export MESOS_NATIVE_JAVA_LIBRARY=$(ls
$MESOS_SANDBOX/libmesos-*.dylib) && ./executor/bin/cassandra-executor server executor/conf/executor.yml"} //This was tested with jre1.8.0_144.jre, please change version accordingly java_home : $ {EXECUTOR_JAVA_HOME:-"./jre1.8.0_144.jre/Contents/Home"} jre_location :${EXECUTOR_JRE_LOCATION:-''} executor_location : $ {EXECUTOR_LOCATION:-'Path as generated by generateArtifacts.sh, usually - /cassandra-executor/build/distributions/executor.zip'} cassandra_location :${EXECUTOR_CASSANDRA_LOCATION:-'Path as generated by generateArtifacts.sh, usually - /cassandra-bin-tmp/apache-cassandra-<CASSANDRA_VERSION>-bin-dcos.tar.gz'} libmesos_location: $ {EXECUTOR_LIBMESOS_LOCATION:-'<MESOS_BUILD_PATH/src/.libs/libmesos-1.0.3.dylib>'} version: ${CASSANDRA_VERSION:-<RELEASE_VERSION>-3.0.10}Code already contains the changes for running the service locally with mesos and zookeeper. In scheduler.yml change EXECUTOR_API_PORT to 9010. This is used in code to recognise that the local setup is running.
-
Add following lines to build.gradle in cassandra-scheduler folder: tasks.withType(JavaExec) { if (System.getProperty('DEBUG', 'false') == 'true') { jvmArgs '-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005' } }
run { description = 'Start the main class of the framework project' main = 'com.mesosphere.dcos.cassandra.scheduler.Main' if ( project.hasProperty("schedulerArgs") ) { args Eval.me(schedulerArgs) } println args }
-
Copy gradlew and gradle/ into cassandra-scheduler folder, and then execute the following command: ./gradlew run -PschedulerArgs="['server','/cassandra-scheduler/src/dist/conf/scheduler.yml']" --debug --stacktrace
-
Use following command to debug the scheduler: ./gradlew run -PschedulerArgs="['server','/cassandra-scheduler/src/dist/conf/scheduler.yml']" --debug-jvm --info
-
For debugging executor add: applicationDefaultJvmArgs = ["-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=22100"] after mainClassName in build.gradle of executor. Everytime this is changed please do ./gradlew build