This documentation is for older WSO2 products. View documentation for the latest release.
Configuring Cassandra Cluster in BAM 2.5.0 - Clustering Guide 4.2.0 - WSO2 Documentation
||
Skip to end of metadata
Go to start of metadata

Follow the steps below to configure the Cassandra cluster.

It is recommended  to use only external Apache Cassandra versions 1.2.18 – 2.x  with BAM 2.5.0 clustered deployment setups. For information on using external Cassandra with WSO2 BAM, see Connecting to External Cassandra.

  1. Download Apache Cassandra, and extract it in a preferred location in all nodes (Cassandra Node 1, Cassandra Node 2, Cassandra Node 3, and Cassandra Node 4 as shown in the deployment diagram.)
  2.  Add the following configurations in the <CASSANDRA_HOME>/conf/cassandra.yaml file as follows for the respective nodes.

    Cassandra Node 1
    cluster_name:   Test Cluster
    initial_token:  -9223372036854775808
    seed_provider:
           - seeds: "cassandra node1,casandra node 2, cassandra node 3, cassandra node 4"
    listen_address: cassandra node1
    rpc_address: cassandra node1
    rpc_port: 9160
    Cassandra Node 2
    cluster_name:   Test Cluster
    initial_token:  -4611686018427387904
    seed_provider:
           - seeds: "cassandra node1,casandra node 2, cassandra node 3, casandra node4"
    listen_address: cassandra node2
    rpc_address: cassandra node2
    rpc_port: 9160
    Cassandra Node 3
    cluster_name:   Test Cluster
    initial_token:  0
    seed_provider:
           - seeds: "cassandra node1,casandra node 2, cassandra node 3, casandra node4"
    listen_address: cassandra node3
    rpc_address: cassandra node3
    rpc_port: 9160
    Cassandra Node 4
    cluster_name:   Test Cluster
    initial_token:  4611686018427387904
    seed_provider:
           - seeds: "cassandra node1,casandra node 2, cassandra node 3, casandra node4"
    listen_address: cassandra node3
    rpc_address: cassandra node3
    rpc_port: 9160
  3. Start all the Cassandra severs.

  4. Log in to one of the Cassandra nodes via cqlsh. Execute the following commands to create a new super user for the Cassandra cluster, which can be used for communication between BAM and Cassandra.


    cd /mnt/<ip>/cassandra1.wso2.dev.com/apache-cassandra-1.2.18/bin
     
    ./cqlsh cassandra4.wso2.dev.com 9160 -u cassandra -p cassandra
    Connected to BAM Test Setup at cassandra1.wso2.dev.com:9160.
    [cqlsh 3.1.8 | Cassandra 1.2.18 | CQL spec 3.0.5 | Thrift protocol 19.36.2]
    Use HELP for help.
    cqlsh>ALTER KEYSPACE "system_auth" WITH REPLICATION ={ 'class' : 'SimpleStrategy', 'replication_factor' : 3 };
    cqlsh>CREATE USER cassandrauser WITH PASSWORD 'cassandrapw' SUPERUSER;

When configuring the Cassandra cluster in this setup, you need to do the following for the Cassandra keyspaces feature to function and list the Cassandra keyspaces in the Main menu of the WSO2 BAM maangement console.

  • If you are using internal Cassandra, which is shipped with WSO2 BAM, both BAM nodes and Cassandra nodes should be in the same clustering domain.

  • If you are using external Cassandra, to change the following configuration in the <BAM_HOME>/repository/conf/etc/cassandra.yaml file to use the AllowAllAuthenticator. For information on using external Cassandra with WSO2 BAM, see Connecting to External Cassandra.

    authenticator:AllowAllAuthenticator
  • No labels