Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create two IP aliases:

    Code Block
    ifconfig eth0:1 192.168.0.2
    ifconfig eth0:2 192.168.0.3
  2. Configure cassandra.yaml in node0 node 0 and node1node 1.
    1. In node0node 0:

      Code Block
      - seeds: "192.168.0.2"
      
      listen_address: 192.168.0.2
      
      rpc_address: 192.168.0.2
    2. In node1node 1:

      Code Block
      - seeds: "192.168.0.2"
      
      listen_address: 192.168.0.3
      
      rpc_address: 192.168.0.3
  3. Update the [SS_HOME]/repository/conf/etc/hector-config.xml in node0node 0.

    Code Block
    languagehtml/xml
    <HectorConfiguration>
        <Cluster>
            <Name>ClusterOne</Name>
            <Nodes>192.168.0.2:9160</Nodes>
            <AutoDiscovery disable="false" delay="1000"/>
        </Cluster>
    </HectorConfiguration>
  4. Update the [SS_HOME]/repository/conf/etc/hector-config.xml in node1node 1.

    Code Block
    languagehtml/xml
    <HectorConfiguration>
        <Cluster>
            <Name>ClusterOne</Name>
            <Nodes>192.168.0.3:9160</Nodes>
            <AutoDiscovery disable="false" delay="1000"/>
        </Cluster>
    </HectorConfiguration>
  5. Start the cluster.
    • Node 0 configurations: Use the --start command to start node 0.

      Code Block
      $SS_HOME/bin/wso2server.sh --start
    • Node 1 configurations:
      1. Update the startup.sh as follows:

        Code Block
        -Dcassandra.rpc.port=9150 \
        -Dcassandra.storage.port=6990 \
      2. Use the --start command to start node 1.

        Code Block
        $SS_HOME/bin/wso2server.sh --start
  6. You can verify the status of the cluster using a notetool command.

    Code Block
    ./nodetool -u admin -pw admin -p 9999 ring -h 192.168.0.2
    ./nodetool -u admin -pw admin -p 10009 ring -h 192.168.0.3

    Also you can check the listening port using a netstat command.

    Code Block
    netstat -anl |grep 7000
    tcp6       0      0 192.168.0.3:7000        :::*                    LISTEN     
    tcp6       0      0 192.168.0.2:7000        :::*                    LISTEN
    Code Block
    netstat -anl |grep 9160
    tcp6       0      0 192.168.0.3:9160        :::*                    LISTEN     
    tcp6       0      0 192.168.0.2:9160        :::*                    LISTEN 
  7. You can now connect to the cluster using the cassandra-cli tool.

    Code Block
    ./cassandra-cli -u admin -pw admin -h 192.168.0.2
    
    ./cassandra-cli -u admin -pw admin -h 192.168.0.3