Exercise 1.
1: Setting Up Lab Environment
In this exercise, you will:
• Setup the virtual machine for this course
• Familiarize yourself with cqlsh
Steps
Access the command line
1. a. If you are doing these exercises from a virtual machine, click on the Terminal
icon to start a terminal window.
b. If you have started up an AWS EC2 instance to do exercises, SSH to the instance
using its assigned IP address.
2. SSH to the cloud instance using the IP address and key provided.
ssh -i <your key filename> ubuntu@<your EC2 ip address>
Run cqlsh
3. Start the Cassandra tool 'cqlsh'. You can run 'cqlsh' or any Cassandra / DSE tool from any
directory because they are in your '$PATH'.
cqlsh
IMPORTANT: If 'cqlsh' is not able to connect to DataStax Enterprise, use the command 'sudo
service dse status' to see if DSE is running. If for some reason DSE is not running, you can start it
with 'sudo service dse start'.
In 'cqlsh', note the prompt header changed to `cqlsh>` indicating further commands are for
'cqlsh' instead of the Linux shell.
4. Execute the following query:
SELECT * FROM system_schema.keyspaces;
'cqlsh' displays the results immediately. Notice the built-in keyspaces. Your cqlsh environment
is working correctly.
5. Type 'exit' to quit 'cqlsh'.