(Created Fix blank page For Version: HTCC:8.5.2DRAFT) |
(Update with the copy of version: 8.5.2) |
||
Line 1: | Line 1: | ||
− | <!-- | + | = Initializing Cassandra= |
+ | __NOTOC__ | ||
+ | ==Creating the Cassandra Keyspace== | ||
+ | The procedures below describe how to create the Cassandra keyspace for the following scenarios: | ||
+ | |||
+ | * Development — 1 Cassandra node (appropriate for a development or lab environment) | ||
+ | * Single Datacenter — 1 datacenter with a minimum of three Cassandra nodes | ||
+ | * Two Datacenters — 2 datacenters with a minimum of three Cassandra nodes in each datacenter | ||
+ | |||
+ | Select a tab below for the procedure that matches your deployment scenario. | ||
+ | |||
+ | <!-- Available styles: (default)-Important, 2-Tip, 3-Warning --> | ||
+ | <!-- Important: equal signs (=) will not work in a note. Use the equivalent HTML code (=) instead.--> | ||
+ | {{NoteFormat|For more complex Cassandra deployments, please consult with Genesys.}} | ||
+ | |||
+ | <tabber> | ||
+ | Development= | ||
+ | ===Creating the Cassandra Keyspace (1 Cassandra node)=== | ||
+ | '''Start of Procedure''' | ||
+ | |||
+ | <ol> | ||
+ | <li>Copy the <tt>ks-schema-local.txt</tt> file from <tt>[installation_CD]/data</tt> to the Cassandra node host.</li> | ||
+ | <li>By default, the replication factor is set to <tt>1</tt>. Since this is a single node deployment, you do not need to modify this value. Refer to the [http://www.datastax.com/docs/1.1/cluster_architecture/replication Cassandra documentation] for more information about replication factors.</li> | ||
+ | <nowiki>and strategy_options = {replication_factor : 1}</nowiki> | ||
+ | <li>Run the following command to create the Cassandra schema:</li> | ||
+ | <nowiki>[cassandra install dir]/bin/cassandra-cli -h [cassandra host] --file ks-schema-local.txt</nowiki> | ||
+ | |||
+ | * <tt>[cassandra host]</tt> is the host name (fully qualified domain name) or IP address of the Cassandra node | ||
+ | </ol> | ||
+ | '''End of Procedure'''<br/><br/> | ||
+ | '''Next Steps'''<br/> | ||
+ | *Creating the Column Families | ||
+ | |||
+ | ==Creating the Column Families== | ||
+ | '''Start of Procedure''' | ||
+ | |||
+ | <ol> | ||
+ | <li>Copy the <tt>cf-schema.txt</tt> file from <tt>[installation_CD]/data</tt> to the Cassandra node host.</li> | ||
+ | <li>Run the following command to create the Cassandra schema:</li> | ||
+ | <nowiki>[cassandra install dir]/bin/cassandra-cli -h [cassandra host] --file cf-schema.txt</nowiki> | ||
+ | * <tt>[cassandra host]</tt> is the host name (fully qualified domain name) or IP address of the Cassandra node | ||
+ | </ol> | ||
+ | |||
+ | '''End of Procedure'''<br/><br/> | ||
+ | '''Next Steps'''<br/> | ||
+ | *[[DeployWebApp|Deploy the Web Application]] | ||
+ | |-| | ||
+ | |||
+ | Single Datacenter= | ||
+ | ===Creating the Cassandra Keyspace (1 datacenter)=== | ||
+ | Complete the following procedure on one node in your Cassandra cluster. | ||
+ | |||
+ | '''Start of Procedure''' | ||
+ | |||
+ | <ol> | ||
+ | <li>Copy the <tt>ks-schema-prod.txt</tt> file from <tt>[installation_CD]/data</tt> to the Cassandra node host.</li> | ||
+ | <li>By default, the replication factor is set to <tt>2</tt>. Refer to the [http://www.datastax.com/docs/1.1/cluster_architecture/replication Cassandra documentation] for more information about replication factors. To modify this value, change the following line:</li> | ||
+ | <nowiki>and strategy_options = {replication_factor : 2}</nowiki> | ||
+ | <li>Run the following command to create the Cassandra schema:</li> | ||
+ | <nowiki>[cassandra install dir]/bin/cassandra-cli -h [cassandra host] --file ks-schema-prod.txt</nowiki> | ||
+ | * <tt>[cassandra host]</tt> is the host name (fully qualified domain name) or IP address of the Cassandra node | ||
+ | </ol> | ||
+ | '''End of Procedure'''<br/><br/> | ||
+ | '''Next Steps'''<br/> | ||
+ | *Creating the Column Families | ||
+ | |||
+ | ==Creating the Column Families== | ||
+ | Complete the following procedure on one node in your Cassandra cluster. | ||
+ | |||
+ | '''Start of Procedure''' | ||
+ | |||
+ | <ol> | ||
+ | <li>Copy the <tt>cf-schema.txt</tt> file from <tt>[installation_CD]/data</tt> to the Cassandra node host.</li> | ||
+ | <li>Run the following command to create the Cassandra schema:</li> | ||
+ | <nowiki>[cassandra install dir]/bin/cassandra-cli -h [cassandra host] --file cf-schema.txt</nowiki> | ||
+ | * <tt>[cassandra host]</tt> is the host name (fully qualified domain name) or IP address of the Cassandra node | ||
+ | </ol> | ||
+ | |||
+ | '''End of Procedure'''<br/><br/> | ||
+ | '''Next Steps'''<br/> | ||
+ | *[[DeployWebApp|Deploy the Web Application]] | ||
+ | |-| | ||
+ | |||
+ | Two Datacenters= | ||
+ | ===Creating the Cassandra Keyspace (2 datacenters)=== | ||
+ | Complete the following procedure on one node in your Cassandra cluster. | ||
+ | |||
+ | '''Start of Procedure''' | ||
+ | |||
+ | <ol> | ||
+ | <li>Copy the <tt>ks-schema-prod_HA.txt</tt> file from <tt>[installation_CD]/data</tt> to the Cassandra node host.</li> | ||
+ | <li>Modify the following line: | ||
+ | <pre>with strategy_options ={ AZ1 : 3, AZ2 : 3 }</pre> | ||
+ | <ol type="a"> | ||
+ | <li>Add the datacenter name. You can use nodetool to find the name of the datacenter by examining the output of "nodetool ring" (the tool is located in the <tt>bin</tt> directory of Cassandra). The following is sample output from the nodetool:</li> | ||
+ | <nowiki>/genesys/apache-cassandra-1.1.6/bin$ ./nodetool ring | ||
+ | Address DC Rack Status State Load Owns Token | ||
+ | 192.0.2.10 datacenter1 rack1 Up Normal 14.97 MB 100.00% 0 | ||
+ | 198.51.100.10 datacenter2 rack1 Up Normal 14.97 MB 100.00% 100 | ||
+ | 192.0.2.11 datacenter1 rack1 Up Normal 14.97 MB 100.00% 56713727820156410577229101238628035242 | ||
+ | 198.51.100.11 datacenter2 rack1 Up Normal 14.97 MB 100.00% 56713727820156410577229101238628035242 | ||
+ | 192.0.2.12 datacenter1 rack1 Up Normal 14.97 MB 100.00% 113427455640312821154458202477256070484 | ||
+ | 198.51.100.12 datacenter2 rack1 Up Normal 14.97 MB 100.00% 113427455640312821154458202477256070484</nowiki> | ||
+ | <li>Add the replication factor. Refer to the [http://www.datastax.com/docs/1.1/cluster_architecture/replication Cassandra documentation] for more information about replication factors.</li> | ||
+ | </ol> | ||
+ | Based on the nodetool output above, your line might be: <pre>with strategy_options ={ datacenter1 : 3, datacenter2 : 3 }</pre> | ||
+ | </li> | ||
+ | <li>Run the following command to create the Cassandra schema:</li> | ||
+ | <nowiki>[cassandra install dir]/bin/cassandra-cli -h [cassandra host] --file ks-schema-prod_HA.txt</nowiki> | ||
+ | * <tt>[cassandra host]</tt> is the host name (fully qualified domain name) or IP address of the Cassandra node | ||
+ | </ol> | ||
+ | '''End of Procedure'''<br/><br/> | ||
+ | '''Next Steps'''<br/> | ||
+ | *Creating the Column Families | ||
+ | |||
+ | ==Creating the Column Families== | ||
+ | Complete the following procedure on one node in your Cassandra cluster. | ||
+ | |||
+ | '''Start of Procedure''' | ||
+ | |||
+ | <ol> | ||
+ | <li>Copy the <tt>cf-schema.txt</tt> file from <tt>[installation_CD]/data</tt> to the Cassandra node host.</li> | ||
+ | <li>Run the following command to create the Cassandra schema:</li> | ||
+ | <nowiki>[cassandra install dir]/bin/cassandra-cli -h [cassandra host] --file cf-schema.txt</nowiki> | ||
+ | * <tt>[cassandra host]</tt> is the host name (fully qualified domain name) or IP address of the Cassandra node | ||
+ | </ol> | ||
+ | |||
+ | '''End of Procedure'''<br/><br/> | ||
+ | '''Next Steps'''<br/> | ||
+ | *[[DeployWebApp|Deploy the Web Application]] | ||
+ | </tabber> | ||
+ | |||
+ | [[Category:V:HTCC:8.5.2DRAFT]] |
Revision as of 18:42, April 22, 2014
Initializing Cassandra
Creating the Cassandra Keyspace
The procedures below describe how to create the Cassandra keyspace for the following scenarios:
- Development — 1 Cassandra node (appropriate for a development or lab environment)
- Single Datacenter — 1 datacenter with a minimum of three Cassandra nodes
- Two Datacenters — 2 datacenters with a minimum of three Cassandra nodes in each datacenter
Select a tab below for the procedure that matches your deployment scenario.
Important
For more complex Cassandra deployments, please consult with Genesys.
Creating the Cassandra Keyspace (1 Cassandra node)
Start of Procedure
- Copy the ks-schema-local.txt file from [installation_CD]/data to the Cassandra node host.
- By default, the replication factor is set to 1. Since this is a single node deployment, you do not need to modify this value. Refer to the Cassandra documentation for more information about replication factors.
- Run the following command to create the Cassandra schema:
and strategy_options = {replication_factor : 1}
[cassandra install dir]/bin/cassandra-cli -h [cassandra host] --file ks-schema-local.txt
- [cassandra host] is the host name (fully qualified domain name) or IP address of the Cassandra node
End of Procedure
Next Steps
- Creating the Column Families
Creating the Column Families
Start of Procedure
- Copy the cf-schema.txt file from [installation_CD]/data to the Cassandra node host.
- Run the following command to create the Cassandra schema:
[cassandra install dir]/bin/cassandra-cli -h [cassandra host] --file cf-schema.txt
- [cassandra host] is the host name (fully qualified domain name) or IP address of the Cassandra node
End of Procedure
Next Steps
Creating the Cassandra Keyspace (1 datacenter)
Complete the following procedure on one node in your Cassandra cluster.
Start of Procedure
- Copy the ks-schema-prod.txt file from [installation_CD]/data to the Cassandra node host.
- By default, the replication factor is set to 2. Refer to the Cassandra documentation for more information about replication factors. To modify this value, change the following line:
- Run the following command to create the Cassandra schema:
and strategy_options = {replication_factor : 2}
[cassandra install dir]/bin/cassandra-cli -h [cassandra host] --file ks-schema-prod.txt
- [cassandra host] is the host name (fully qualified domain name) or IP address of the Cassandra node
End of Procedure
Next Steps
- Creating the Column Families
Creating the Column Families
Complete the following procedure on one node in your Cassandra cluster.
Start of Procedure
- Copy the cf-schema.txt file from [installation_CD]/data to the Cassandra node host.
- Run the following command to create the Cassandra schema:
[cassandra install dir]/bin/cassandra-cli -h [cassandra host] --file cf-schema.txt
- [cassandra host] is the host name (fully qualified domain name) or IP address of the Cassandra node
End of Procedure
Next Steps
Creating the Cassandra Keyspace (2 datacenters)
Complete the following procedure on one node in your Cassandra cluster.
Start of Procedure
- Copy the ks-schema-prod_HA.txt file from [installation_CD]/data to the Cassandra node host.
- Modify the following line:
with strategy_options ={ AZ1 : 3, AZ2 : 3 }
- Add the datacenter name. You can use nodetool to find the name of the datacenter by examining the output of "nodetool ring" (the tool is located in the bin directory of Cassandra). The following is sample output from the nodetool:
- Add the replication factor. Refer to the Cassandra documentation for more information about replication factors.
/genesys/apache-cassandra-1.1.6/bin$ ./nodetool ring Address DC Rack Status State Load Owns Token 192.0.2.10 datacenter1 rack1 Up Normal 14.97 MB 100.00% 0 198.51.100.10 datacenter2 rack1 Up Normal 14.97 MB 100.00% 100 192.0.2.11 datacenter1 rack1 Up Normal 14.97 MB 100.00% 56713727820156410577229101238628035242 198.51.100.11 datacenter2 rack1 Up Normal 14.97 MB 100.00% 56713727820156410577229101238628035242 192.0.2.12 datacenter1 rack1 Up Normal 14.97 MB 100.00% 113427455640312821154458202477256070484 198.51.100.12 datacenter2 rack1 Up Normal 14.97 MB 100.00% 113427455640312821154458202477256070484
with strategy_options ={ datacenter1 : 3, datacenter2 : 3 }
- Run the following command to create the Cassandra schema:
[cassandra install dir]/bin/cassandra-cli -h [cassandra host] --file ks-schema-prod_HA.txt
- [cassandra host] is the host name (fully qualified domain name) or IP address of the Cassandra node
End of Procedure
Next Steps
- Creating the Column Families
Creating the Column Families
Complete the following procedure on one node in your Cassandra cluster.
Start of Procedure
- Copy the cf-schema.txt file from [installation_CD]/data to the Cassandra node host.
- Run the following command to create the Cassandra schema:
[cassandra install dir]/bin/cassandra-cli -h [cassandra host] --file cf-schema.txt
- [cassandra host] is the host name (fully qualified domain name) or IP address of the Cassandra node
End of Procedure
Next Steps
Comments or questions about this documentation? Contact us for support!