This is a test Program for using the CCM tool to start and stop a DSE cluster with solr search functionality. In order to use this effectively we should plan on extracting some of this code into the gradle plugins library. Also we need to install a CCM cluster tool on jenkins.
- Install ccm tool on dev machine. Installation instructions can be found at
https://github.com/pcmanus/ccm
- Dont forget to setup loopbacks on macosx
https://github.com/pcmanus/ccm
- run ccm command to install 4.8.0 dse repository locally (This may automatically start a cluster. Stop and delete it if thats the case).
ccm create dse_cluster --dse --dse-username=user@example.com --dse-password=redacted -v 4.8.0
- In the root of this repo run
gradle clean build
This is a Modified CCMBridge.java from datastax-java-driver test repo.
https://github.com/datastax/java-driver/blob/2.1/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java.
This class does the following
- Starts the DSE cluster via CCM bridge
@Before
- Cluster is configured to start with SSLoptions and client authentication. Certs are in the resources directory
- Cleans out cluster and stops cluster
@After
Does the following in order
- connects to cluster with SSLoptions
- creates a keyspace , uses the keyspace used by the session, and creates a test
- inserts test data into table
- uploads a standard solrconfig.xml and a schema.xml from the resources directory into the dse cluster
- creates a solr core based on resources uploaded
- runs both types of test queries. cql and cqlsolr