This document describes the functionality provided by the XL Deploy Cassandra plugin.
See the XL Deploy reference manual for background information on XL Deploy and release automation concepts.
The xld-cassandra-plugin
is an XL Deploy plugin that enables executing scripts against a Cassandra instance.
You can use the gradle wrapper to build the plugin. Use the following command to build using Gradle:
./gradlew clean assemble
The built plugin, along with other files from the build, can then be found in the build folder.
For the latest instructions on installing XL Deploy plugins, consult the associated documentation on docs.xebialabs.com.
The configuration items for this plugin:
- Cassandra cql Scripts (type cql.CqlScripts)
- Cassandra Client (type cql.CassandraClient)
- Executed Cassandra cql Scripts (type cql.ExecutedCqlScripts)
To run Cassandra scripts during a deployment, you must have the cql.CqlScripts configuration item in the deployment package and the cql.CassandraClient defined on the overthere host (infrastructure). Use the docs.xebialabs.com site for more information on deployments and the XL Deploy Unified Deployment Model (UDM).
The cql.CqlScripts configuration item (CI) identifies a ZIP file that contains CQL scripts that are to be executed on the cassandra database.
-
The scripts must be located at the root of the ZIP file.
-
CQL scripts can be installation scripts or rollback scripts.
-
Installation scripts are used to execute changes on the database, such as creation of a table or inserting data.
- ex. 1-create_table.cql
-
Each installation script should be associated with a rollback script that undoes the actions performed by its companion installation script. A rollback script must have the same name as the installation script with which it is associated, and must have the moniker -rollback attached to it.
- ex. 1-create_table-rollback.cql
-
Executing an installation script, followed by the accompanying rollback script, should leave the database in an unchanged state.
-
XL Deploy tracks which installation scripts were executed successfully and only executes their associated rollback scripts.
If using a separate host to execute scripts on the cassandra database you can use separate credentials to run the scripts than you need to connect to the separate host.
Please review the contributing guidelines for xebialabs-community at http://xebialabs-community.github.io/
This community plugin is licensed under the MIT license.
See license in LICENSE.md