(Created Fix blank page For Version: HTCC:8.5.2DRAFT) |
(Update with the copy of version: 8.5.2) |
||
Line 1: | Line 1: | ||
− | <!-- | + | =Installing and Configuring Cassandra= |
+ | __NOTOC__ | ||
+ | Cassandra is mandatory for Workspace Web Edition & Web Services and must be installed and configured prior to starting the installation and configuration of Workspace Web Edition & Web Services. | ||
+ | |||
+ | Currently, Genesys Web Services is using Cassandra version 1.2. | ||
+ | |||
+ | <!-- 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 details about Cassandra, refer to the [http://www.datastax.com/documentation/cassandra/1.2/cassandra/features/featuresTOC.html Cassandra documentation for version 1.2].}} | ||
+ | |||
+ | The following steps are intended to serve as a quick guide to installing and configuring Cassandra: | ||
+ | |||
+ | * [[InstallingAndDeployingCassandra#Installing_Cassandra|Installing Cassandra]] | ||
+ | * [[InstallingAndDeployingCassandra#Configuring_Cassandra|Configuring Cassandra]] | ||
+ | * [[InstallingAndDeployingCassandra#Verifying_the_Cassandra_Installation|Verifying the Cassandra Installation]] | ||
+ | |||
+ | ===Installing Cassandra=== | ||
+ | Complete this procedure for each Cassandra node. | ||
+ | |||
+ | '''Prerequisites''' | ||
+ | *You have installed the latest [http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html Java 1.7 JDK 64bit for Linux]. For more information, refer to the [http://docs.oracle.com/javase/7/docs/webnotes/install/linux/linux-jdk.html Java documentation]. | ||
+ | |||
+ | '''Start of Procedure'''<br/> | ||
+ | |||
+ | #[http://cassandra.apache.org/download/ Download the latest 1.2.x version of Cassandra].<br/> | ||
+ | #Copy the Cassandra archive to the installation directory. For example, <tt>/usr/local</tt><br/> | ||
+ | #Use a tar utility to extract the files. For example, <tt>tar -zxvf apache-cassandra-1.2.15-bin.tar.gz</tt><br/> | ||
+ | #Add directories for data, commitlog, and saved_caches. You can create these directories anywhere or in the default locations configured in the <tt>cassandra.yaml</tt>. For example: | ||
+ | #* /var/lib/cassandra/data | ||
+ | #* /var/lib/cassandra/commitlog | ||
+ | #* /var/lib/cassandra/saved_caches | ||
+ | #Add a directory for logging. You can create this directory anywhere, such as <tt>/var/log/cassandra/</tt>. | ||
+ | '''End of Procedure'''<br/><br/> | ||
+ | '''Next Steps'''<br/> | ||
+ | *[[InstallingAndDeployingCassandra#Configuring_Cassandra|Configuring Cassandra]] | ||
+ | |||
+ | ===Configuring Cassandra=== | ||
+ | This procedure shows you how to configure a three-node Cassandra cluster in a single datacenter. | ||
+ | <!-- Available styles: (default)-Important, 2-Tip, 3-Warning --> | ||
+ | <!-- Important: equal signs (=) will not work in a note. Use the equivalent HTML code (=) instead.--> | ||
+ | {{NoteFormat|The files modified in this procedure are typically found in the <tt>[Cassandra install dir]/conf</tt> directory.}} | ||
+ | |||
+ | '''Start of Procedure'''<br/> | ||
+ | Complete the following steps for each Cassandra node: | ||
+ | <ol> | ||
+ | <li>Modify the <tt>cassandra.yaml</tt> file:</li> | ||
+ | <ol type="a"> | ||
+ | <li>Set the <tt>cluster_name</tt>. It must be the same name on all nodes.</li> | ||
+ | <li>Set the <tt>initial_token</tt> according to the node's place in ring. It must be one of the following: </li> | ||
+ | |||
+ | <nowiki>Node #1: 0 | ||
+ | Node #2: 56713727820156410577229101238628035242 | ||
+ | Node #3: 113427455640312821154458202477256070484 | ||
+ | </nowiki> | ||
+ | <!-- Available styles: (default)-Important, 2-Tip, 3-Warning --> | ||
+ | <!-- Important: equal signs (=) will not work in a note. Use the equivalent HTML code (=) instead.--> | ||
+ | {{NoteFormat|The tokens shown here can be used for a three-node Cassandra cluster in a single datacenter. If you are using a different topology or cluster size, [http://www.datastax.com/docs/1.1/install/cluster_init#token-gen-cassandra consult the Cassandra documentation].}} | ||
+ | <li>Set <tt>seeds</tt> to the list of host names of all nodes. For example: <tt>-seeds: “node1, node2, node3”</tt></li> | ||
+ | <li>Set <tt>listen_address</tt> and <tt>rpc_address</tt> to the host name.</li> | ||
+ | <li>Set <tt>data_file_directories</tt>, <tt>commitlog_directory</tt>, and <tt>saved_caches_directory</tt> to the directories you created in Step 4 of the [[Prerequisites#Installing_Cassandra|Installing Cassandra]] procedure.</li> | ||
+ | <li>Change <tt>endpoint_snitch</tt> to <tt>PropertyFileSnitch</tt>. </li> | ||
+ | <li>Save your changes and close the file.</li> | ||
+ | </ol> | ||
+ | <li>Open the <tt>log4j-server.properties</tt> file and set the <tt>log4j.appender.R.File</tt> property to the directory you created in Step 5 of the [[Prerequisites#Installing_Cassandra|Installing Cassandra]] procedure.</li> | ||
+ | <li>Save your changes and close the file.</li> | ||
+ | <li>Open the <tt>cassandra-topology.properties</tt> file and update for you cluster topology. For each node in your cluster, add the following line: </li> | ||
+ | <nowiki>[node]=[datacenter]:[rack]</nowiki> | ||
+ | *<tt>[node]</tt> — The IP address of the node | ||
+ | *<tt>[datacenter]</tt> — The name of the datacenter for this node. | ||
+ | *<tt>[rack]</tt> — The name of the rack for this node. | ||
+ | |||
+ | The following is a sample <tt>cassandra-topology.properties</tt> file for a Single Datacenter scenario: | ||
+ | <nowiki>192.0.2.10=datacenter1:rack1 | ||
+ | 192.0.2.11=datacenter1:rack1 | ||
+ | 192.0.2.12=datacenter1:rack1 | ||
+ | </nowiki> | ||
+ | <li>Save your changes and close the file.</li> | ||
+ | </ol> | ||
+ | '''End of Procedure'''<br/><br/> | ||
+ | '''Next Steps'''<br/> | ||
+ | *[[InstallingAndDeployingCassandra#Verifying_the_Cassandra_Installation|Verifying the Cassandra Installation]] | ||
+ | |||
+ | ===Verifying the Cassandra Installation=== | ||
+ | '''Start of Procedure'''<br/> | ||
+ | <ol> | ||
+ | <li>Start all Cassandra nodes using the following command:</li> | ||
+ | <pre>[cassandra install dir]/bin/cassandra</pre> | ||
+ | <li>Use the nodetool utility to verify that all nodes have connected by entering the following command:</li> | ||
+ | <pre>[cassandra install dir]/bin/nodetool -h [cassandra host] ring</pre> | ||
+ | |||
+ | The following is sample output for a Single Datacenter scenario: | ||
+ | |||
+ | <pre> | ||
+ | /genesys/apache-cassandra-2.0.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 | ||
+ | 192.0.2.11 datacenter1 rack1 Up Normal 14.97 MB 100.00% 56713727820156410577229101238628035242 | ||
+ | 192.0.2.12 datacenter1 rack1 Up Normal 14.97 MB 100.00% 113427455640312821154458202477256070484 | ||
+ | </pre> | ||
+ | |||
+ | '''End of Procedure'''<br/><br/> | ||
+ | '''Next Steps''' | ||
+ | *[[InstallationProcedures|Install Workspace Web Edition & Web Services]] | ||
+ | |||
+ | |||
+ | |||
+ | [[Category:V:HTCC:8.5.2DRAFT]] |
Revision as of 18:42, April 22, 2014
Installing and Configuring Cassandra
Cassandra is mandatory for Workspace Web Edition & Web Services and must be installed and configured prior to starting the installation and configuration of Workspace Web Edition & Web Services.
Currently, Genesys Web Services is using Cassandra version 1.2.
The following steps are intended to serve as a quick guide to installing and configuring Cassandra:
Installing Cassandra
Complete this procedure for each Cassandra node.
Prerequisites
- You have installed the latest Java 1.7 JDK 64bit for Linux. For more information, refer to the Java documentation.
Start of Procedure
- Download the latest 1.2.x version of Cassandra.
- Copy the Cassandra archive to the installation directory. For example, /usr/local
- Use a tar utility to extract the files. For example, tar -zxvf apache-cassandra-1.2.15-bin.tar.gz
- Add directories for data, commitlog, and saved_caches. You can create these directories anywhere or in the default locations configured in the cassandra.yaml. For example:
- /var/lib/cassandra/data
- /var/lib/cassandra/commitlog
- /var/lib/cassandra/saved_caches
- Add a directory for logging. You can create this directory anywhere, such as /var/log/cassandra/.
End of Procedure
Next Steps
Configuring Cassandra
This procedure shows you how to configure a three-node Cassandra cluster in a single datacenter.
Start of Procedure
Complete the following steps for each Cassandra node:
- Modify the cassandra.yaml file:
- Set the cluster_name. It must be the same name on all nodes.
- Set the initial_token according to the node's place in ring. It must be one of the following:
- Set seeds to the list of host names of all nodes. For example: -seeds: “node1, node2, node3”
- Set listen_address and rpc_address to the host name.
- Set data_file_directories, commitlog_directory, and saved_caches_directory to the directories you created in Step 4 of the Installing Cassandra procedure.
- Change endpoint_snitch to PropertyFileSnitch.
- Save your changes and close the file.
- Open the log4j-server.properties file and set the log4j.appender.R.File property to the directory you created in Step 5 of the Installing Cassandra procedure.
- Save your changes and close the file.
- Open the cassandra-topology.properties file and update for you cluster topology. For each node in your cluster, add the following line:
Node #1: 0 Node #2: 56713727820156410577229101238628035242 Node #3: 113427455640312821154458202477256070484
[node]=[datacenter]:[rack]
- [node] — The IP address of the node
- [datacenter] — The name of the datacenter for this node.
- [rack] — The name of the rack for this node.
The following is a sample cassandra-topology.properties file for a Single Datacenter scenario:
192.0.2.10=datacenter1:rack1 192.0.2.11=datacenter1:rack1 192.0.2.12=datacenter1:rack1
End of Procedure
Next Steps
Verifying the Cassandra Installation
Start of Procedure
- Start all Cassandra nodes using the following command:
- Use the nodetool utility to verify that all nodes have connected by entering the following command:
[cassandra install dir]/bin/cassandra
[cassandra install dir]/bin/nodetool -h [cassandra host] ring
The following is sample output for a Single Datacenter scenario:
/genesys/apache-cassandra-2.0.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 192.0.2.11 datacenter1 rack1 Up Normal 14.97 MB 100.00% 56713727820156410577229101238628035242 192.0.2.12 datacenter1 rack1 Up Normal 14.97 MB 100.00% 113427455640312821154458202477256070484
End of Procedure
Next Steps