Bitbucket Pipeline - Populate Cassandra DB with Schema

Hi,

 

i'm using the new feature: Bitpucket Piplines and it works well. Now i'm trying integration tests with an cassandra db, deployed with docker.

How can i populate a schema to fresh cassandra? A keyspace and tables, config?

My bitbucket-pipelines

pipelines:
default:
- step:
script:
- npm install -g ntypescript
- npm install -g mocha
- npm install
- npm run-script compile
- sleep 15
- npm run-script local:migrate
- npm test
services:
- cassandra
definitions:
services:
cassandra:
image: cassandra
environment:
MAX_HEAP_SIZE: 512M # Need to restrict the heapsize or else Cassandra will OOM
HEAP_NEWSIZE: 128M

The tests will run after i compiled my typescripts into js and i waited 15 seconds for the cassandra setup. The i populate data to a running cassandra db, but i need to setup the schema first? How can i do this?

Here: https://docs.datastax.com/en/cql/latest/cql/cql_using/startCqlLinuxMac.html

With cqlsh its possible, but how can i access cql? Do i have to install it or do i have to some command like: docker exec cassandra bash ?? Thank you very much for help.

 

 

 

 

 

 

0 answers

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

631 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot