cassandra-migrator

command module
v0.0.0-...-0c4b040 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2019 License: GPL-3.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

cassandra-migrator

Cassandra migrator is a tool that automates the execution of CQL scripts on a cassandra server.

CI Status

CircleCI

Requirements

This tool needs cqlsh (cassandra shell) to do execution of the scritps. To install it you'll need to install pip.

pip

sudo apt install python-pip

cqlsh

pip install cqlsh

Installation

go get samueltorres/cassandra-migrator

Usage

Usage of cassandra-migrator:

  cassandra-migrator [options]

  -cqlversion string
        cql version used to run the scripts (default "3.4.4")
  
  -dirs string
        list of directories where cassandra scripts are located (default "/db/scripts")
  
  -hosts string
        list of cassandra hosts (default "localhost:9042")
  
  -keyspace string
        keyspace in which the scripts will be executed
  
  -password string
        password used to be authenticated on cassandra
  
  -retries int
        number of retries connecting to cassandra hosts (default 20)
  
  -retryInterval duration
        interval in milliseconds for each retry (default 1µs)
  
  -username string
        username used to be authenticated on cassandra

Instead of passing flags you can use enviroment variables prefixed with CM_.

Example
cassandra-migrator --hosts=localhost:9042 --dirs=/db/admin_scripts:/db/scripts --username=cassandra --password=cassandra

Usage with Docker

docker run -v ./db/scripts:/db/scripts -e CM_HOSTS=localhost:9042 samueltorres/cassandra-migrator

License

This project is licensed under the MIT open source license.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址