To get started with Redis Enterprise Cloud Essentials, visit https://redislabs.com/try-redis-modules-for-free and fill out the form:
Once you click “Get Started,” we will send you an email with a link to activate your account and complete your signup process.
For the cloud provider, select Amazon AWS
In the Redis Enterprise Cloud service levels, select the Redis Enterprise Cloud Essentials 30MB/1 Database level and click Create:
Once you create a subscription, you are ready to create a database with modules enabled. As shown below, enter a name for the database you want to create:
Move the toggle to select the module you want. You can choose one module at a time under Redis Enterprise Cloud Essentials. Please note that multiple modules capabilities are currently available only in Redis Cloud Pro.
Let’s go ahead and choose “RediSearch” as our first module. Click “Activate”:
The database will remain in “Pending” status until the process of configuring your new Redis database is completed. When the database is created, you will be able to see all the database settings, including:
RedisInsight is an intuitive and efficient GUI for Redis, allowing you to interact with your databases and manage your data—with built-in support for most popular Redis modules. The free non-commercial add-on provides tools to analyze the memory, profile the performance of your database, and guide you toward better Redis usage.
Learn more about RedisInsight here!
RedisInsight provides built-in support for the RedisJSON, RediSearch, RedisGraph, Redis Streams, and RedisTimeSeries modules to make it even easier to query, visualize, and interactively manipulate search indexes, graphs, streams, and time-series data. Used properly, RedisInsight can make the experience of using modules with Redis Enterprise Cloud Essentials even smoother.
A full-featured desktop GUI client, RedisInsight is available for Windows, macOS, and Linux and is fully compatible with Redis Enterprise. It works with any cloud provider as long as you run it on a host with network access to your cloud-based Redis server. RedisInsight makes it easy to discover cloud databases and configure connection details with a single click. It allows you to automatically add Redis Enterprise Software and Redis Enterprise Cloud databases.
Local installation of RedisInsight:
To use RedisInsight on a local machine, download it for Windows, Mac, or Linux from the RedisInsight page on the RedisLabs website:
Click “Download” to open up a form that allows you to select the operating system of your choice. For example, let’s assume that you want to install RedisInsight on your macOS machine. Choose “Mac OS” as a platform as shown here:
Fill out the rest of the form and click “Download.” Please note that the package name is the combination of the platform and version as shown here:
redisinsight-<platform>-<version>
Click on the RedisInsight executable and install it in your system.
Head over to your web browser and go to http://localhost:8001
You can also run RedisInsight inside Docker containers. Visit https://hub.docker.com/r/redislabs/redisinsight/tags to find the latest Docker image available over DockerHub.
$ docker run -v redisinsight:/db -p 8001:8001 redislabs/redisinsight:latest
Head over to your web browser and go to http://localhost:8001
Congratulations! You have successfully installed RedisInsight and are now ready to inspect your Redis data, monitor database health, and perform runtime server configuration with this browser-based management interface for your Redis deployment.
Once you accept the EULA and click “Confirm,” you are ready to add Redis databases, as shown here:
Select “ADD REDIS DATABASE” and then “Add Database”:
Enter the requested details, including Name, Host (endpoint), Port, and Password in the form, as shown below. You can skip username for now. Then click “ADD REDIS DATABASE”:
Click on the pop-up box to see the RedisInsight dashboard:
Finally, although RedisInsight is a great GUI, sometimes you want to work directly in the command-line interface (CLI). To do so, click “CLI” in the menu on the left side of the RedisInsight UI:
Then paste the appropriate Redis commands in the command section, marked with “>>” as shown below, and press Enter.
You can see the output displayed at the top of the screen. If it says “OK,” the command was executed successfully.
Now that RedisInsight is installed, we’re ready to look at individual Redis modules and see how they work with Redis Enterprise Cloud Essentials.
Insert actors
To interact with RedisGraph you will typically use the GRAPH.QUERY command and execute Cypher queries. Let’s start to insert some actors into the graph:movies graph name, which is automatically created using this command:
>> GRAPH.QUERY graph:movies "CREATE (:Actor {name:'Mark Hamill', actor_id:1}), (:Actor {name:'Harrison Ford', actor_id:2}), (:Actor {name:'Carrie Fisher', actor_id:3})" 1) 1) "Labels added: 1" 2) "Nodes created: 3" 3) "Properties set: 6" 4) "Query internal execution time: 0.675400 milliseconds"
This single query creates three actors, along with their names and unique IDs.
Insert a movie
> GRAPH.QUERY graph:movies "CREATE (:Movie {title:'Star Wars: Episode V - The Empire Strikes Back', release_year: 1980 , movie_id:1})" 1) 1) "Labels added: 1" 2) "Nodes created: 1" 3) "Properties set: 3" 4) "Query internal execution time: 0.392300 milliseconds"
This single query creates a movie with a title, the release year, and an ID.
Associate actors and movies
The core of a graph is the relationships between the nodes, allowing the applications to navigate and query them. Let’s create a relationship between the actors and the movies:
> GRAPH.QUERY graph:movies "MATCH (a:Actor),(m:Movie) WHERE a.actor_id = 1 AND m.movie_id = 1 CREATE (a)-[r:Acted_in {role:'Luke Skywalker'}]->(m) RETURN r" 1) 1) "r" 2) 1) 1) 1) 1) "id" 2) (integer) 1 2) 1) "type" 2) "Acted_in" 3) 1) "src_node" 2) (integer) 0 4) 1) "dest_node" 2) (integer) 3 5) 1) "properties" 2) 1) 1) "role" 2) "Luke Skywalker" 3) 1) "Properties set: 1" 2) "Relationships created: 1" 3) "Query internal execution time: 0.664800 milliseconds"
This command created a new relation indicating that the actor Mark Hamill acted in Star Wars: Episode V as Luke Skywalker.
Let’s repeat this process for the other actors:
> GRAPH.QUERY graph:movies "MATCH (a:Actor), (m:Movie) WHERE a.actor_id = 2 AND m.movie_id = 1 CREATE (a)-[r:Acted_in {role:'Han Solo'}]->(m) RETURN r" > GRAPH.QUERY graph:movies "MATCH (a:Actor), (m:Movie) WHERE a.actor_id = 3 AND m.movie_id = 1 CREATE (a)-[r:Acted_in {role:'Princess Leila'}]->(m) RETURN r"
You can also do all of this in a single query, for example:
> GRAPH.QUERY graph:movies "CREATE (:Actor {name:'Marlo Brando', actor_id:4})-[:Acted_in {role:'Don Vito Corleone'}]->(:Movie {title:'The Godfather', release_year: 1972 , movie_id:2})" 1) 1) "Nodes created: 2" 2) "Properties set: 6" 3) "Relationships created: 1" 4) "Query internal execution time: 0.848500 milliseconds"
Now that you have data in your graph, you’re ready to ask some questions, such as:
“What are the titles of all the movies?”
> GRAPH.QUERY graph:movies "MATCH (m:Movie) RETURN m.title" 1) 1) "m.title" 2) 1) 1) "Star Wars: Episode V - The Empire Strikes Back" 2) 1) "The Godfather" 3) 1) "Query internal execution time: 0.349400 milliseconds"
“What is the information for the movie with the ID of 1?”
> GRAPH.QUERY graph:movies "MATCH (m:Movie) WHERE m.movie_id = 1 RETURN m" 1) 1) "m" 2) 1) 1) 1) 1) "id" 2) (integer) 3 2) 1) "labels" 2) 1) "Movie" 3) 1) "properties" 2) 1) 1) "title" 2) "Star Wars: Episode V - The Empire Strikes Back" 2) 1) "release_year" 2) (integer) 1980 3) 1) "movie_id" 2) (integer) 1 3) 1) "Query internal execution time: 0.365800 milliseconds"
“Who are the actors in the movie ‘Star Wars: Episode V – The Empire Strikes Back’ and what roles did they play?”
> GRAPH.QUERY graph:movies "MATCH (a:Actor)-[r:Acted_in]-(m:Movie) WHERE m.movie_id = 1 RETURN a.name,m.title,r.role" 1) 1) "a.name" 2) "m.title" 3) "r.role" 2) 1) 1) "Mark Hamill" 2) "Star Wars: Episode V - The Empire Strikes Back" 3) "Luke Skywalker" 2) 1) "Harrison Ford" 2) "Star Wars: Episode V - The Empire Strikes Back" 3) "Han Solo" 3) 1) "Carrie Fisher" 2) "Star Wars: Episode V - The Empire Strikes Back" 3) "Princess Leila" 3) 1) "Query internal execution time: 0.641200 milliseconds"
Visualizing graph databases with RedisInsight
If you are using RedisInsight, you can visualize and navigate into the nodes and relationships graphically.
MATCH (m:Actor) return m
Learn more about RedisGraph in the Quickstart tutorial.