Skip to content

Commit 7cf37c7

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 837801a + 5f8a75c commit 7cf37c7

1 file changed

Lines changed: 50 additions & 7 deletions

File tree

‎README.md‎

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Introduction
44
---
55

6+
![Screenshot](screenshot.png)
7+
68
This is the sample application codebase for RU102J, [Redis for Java Developers](https://university.redis.com/courses/ru102j/) at [Redis University](https://university.redis.com).
79

810
Solutions to the course programming challenges can be found on the `solutions` branch.
@@ -13,15 +15,55 @@ Prerequisites
1315
In order to start and run this application, you will need:
1416

1517
* Java 8 JDK or higher
16-
* Maven
17-
* Access to a local or remote installation of [Redis](https://redis.io/download) version 5 or newer (local preferred)
18-
* If you want to try the RedisTimeSeries exercises, you'll need to make sure that your Redis installation also has the [RedisTimeSeries Module](https://oss.redis.com/redistimeseries/) installed
18+
* [Maven](https://maven.apache.org/)
19+
* Access to a local or remote installation of [Redis](https://redis.io/download) version 5 or newer (local preferred, Docker is a good option - see instructions below)
20+
* If you want to try the RedisTimeSeries exercises, you'll need to make sure that your Redis installation also has the [RedisTimeSeries Module](https://oss.redis.com/redistimeseries/) installed (or use the provided Docker Compose file which gives you Redis with RedisTimeSeries)
21+
* Optional: [Docker](https://www.docker.com/get-started/)
22+
* Optional but recommended: [RedisInsight](https://redis.com/redis-enterprise/redis-insight/) to visualize the data in Redis. This is a graphical alternative to the `redis-cli` command
1923

2024
If you're using Windows, check out the following resources for help with running Redis:
2125

22-
* [Redis Labs Blog - Running Redis on Windows 10](https://redis.com/blog/redis-on-windows-10/)
26+
* [Redis Blog - Running Redis on Windows 10](https://redis.com/blog/redis-on-windows-10/)
2327
* [Microsoft - Windows Subsystem for Linux Installation Guide for Windows 10](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
2428

29+
Running Redis with Docker
30+
---
31+
32+
We've provided a Docker Compose file as part of this repo, so to start Redis with the RedisTimeSeries module installed, use the following command:
33+
34+
```bash
35+
docker-compose up -d
36+
```
37+
38+
This will start a Redis with RedisTimeSeries container on localhost port 6379 with no password and you should see output similar to the following:
39+
40+
```
41+
Creating network "ru102j_default" with the default driver
42+
Creating redis_ru102j ... done
43+
```
44+
45+
Connect to Redis using either RedisInsight, or the `redis-cli` command. When using `redis-cli` you can invoke it from the Docker container like this:
46+
47+
```bash
48+
docker exec -it redis_ru102j redis-cli
49+
```
50+
51+
When you see this prompt:
52+
53+
```
54+
127.0.0.1:6379>
55+
```
56+
57+
you are connected to Redis. Type `quit` to exit the Redis CLI.
58+
59+
When you are finished working with Redis, shut down the server like so:
60+
61+
```bash
62+
docker-compose down
63+
```
64+
65+
Redis saves your data in an append only file in the `redisdata` folder, and will re-load it next time you start the container.
66+
2567
How to Start the RediSolar Application
2668
---
2769
### Before anything else, start your redis server.
@@ -32,7 +74,7 @@ $sudo service redis-server restart
3274
### When using Redis on localhost, port 6379 with no password:
3375

3476
1. Run `mvn package` to build your application.
35-
2. Load the sample data: `java -jar target/redisolar-1.0.jar load`. If you want to erase everything in Redis before loading the data, use `java -jar target/redisolar-1.0.jar load --flush true`, but be aware that this will delete ALL keys in your Redis database.
77+
2. Load the sample data: `java -jar target/redisolar-1.0.jar load`. If you want to erase everything in Redis before loading the data, use `java -jar target/redisolar-1.0.jar load --flush true`, but be aware that this will delete ALL keys in your Redis database. Note that loading the data may take a few minutes.
3678
3. Start the application with `java -jar target/redisolar-1.0.jar server config.yml`
3779
4. To check that your application is running enter url `http://localhost:8081`, substituting `localhost` for the hostname that you're running the application on if necessary.
3880

@@ -75,9 +117,10 @@ To rebuild the application without running the tests:
75117
mvn package -DskipTests
76118
```
77119

78-
Application Screenshot
120+
Need Help / Join our Community
79121
---
80-
![Screenshot](screenshot.png)
122+
123+
If you need help with the course or want to chat to your fellow students and the wider Redis community, please [join us on our Discord server](https://discord.gg/jucCB8h).
81124

82125
Subscribe to our YouTube Channel / Follow us on Twitch
83126
---

0 commit comments

Comments
 (0)