Skip to content

Init Cassandra Keyspace and Tables #3252

@alexanderkiel

Description

@alexanderkiel

We should init the Cassandra key space and tables from within Blaze instead of using an init container. The init Script looks like this:

CREATE KEYSPACE blaze WITH REPLICATION = {'class': 'SimpleStrategy', 'replication_factor' : 2};
CREATE TABLE blaze.resources (hash text PRIMARY KEY, content blob);
CREATE TABLE blaze.clauses ("token" text PRIMARY KEY, content blob);

The init container:

 cassandra-init-data:
   image: "cassandra:5.0.6@sha256:5e2c85d2d5db759c28c3efb50905f8d237f958321d6dfd8c176cb148700d9ade"
   command: "cqlsh -f /scripts/cassandra-init.cql"
   environment:
     CQLSH_HOST: "cassandra-1"
   volumes:
   - "./cassandra-init.cql:/scripts/cassandra-init.cql:ro"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions