alnoda-workspaces/workspaces/redis-workspace/removeme_docs/getting-started.md

79 lines
2.5 KiB
Markdown
Raw Normal View History

2022-05-11 20:17:54 +12:00
# Get started
This doc has examples how to use workspace to interact with Redis.
In examples we use local Redis that is running inside the workspace, but the commands apply to any Redis instance.
## Tutorial
2022-05-11 21:04:30 +12:00
Open Quickstart page [localhost:8020](http://localhost:8020/) for quick access to all the tools
2022-05-11 20:17:54 +12:00
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/redis-workspace/img/Redis-wid.png" alt="Redis WID" width="750">
</p>
2022-05-11 21:04:30 +12:00
Use workspace terminal [localhost:8026](http://localhost:8026/) and load some Redis datasets
2022-05-11 20:17:54 +12:00
```
git clone https://github.com/redis-developer/redis-datasets.git /home/project/redis-datasets
cat /home/project/redis-datasets/movie-database/import_actors.redis | redis-cli
cat /home/project/redis-datasets/movie-database/import_movies.redis | redis-cli
```
2022-05-11 21:04:30 +12:00
### GUI
Open Redis Commander UI on [localhost:8029](http://localhost:8029/) and explore Redis databases
2022-05-11 20:17:54 +12:00
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/redis-workspace/img/Rediscommander.png" alt="Redis commander" width="750">
</p>
2022-05-11 21:04:30 +12:00
Alternatively use browser-based VS-code [localhost:8025](http://localhost:8025/) with Redis extension
2022-05-11 20:17:54 +12:00
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/redis-workspace/img/Theia-redis.png" alt="Theia" width="750">
</p>
2022-05-11 21:04:30 +12:00
### CLI tools
If you prefer working in the terminal, explore Redis with [Redis-Tui](https://github.com/mylxsw/redis-tui).
To connect to the internal Redis instance simply execute
```
redis-tui
```
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/redis-workspace/img/redis-tui.png" alt="Redis TUI" width="750">
</p>
To interact with internal Redis, inn the workspace terminal launch iredis CLI, get & set keys
2022-05-11 20:17:54 +12:00
```
iredis
```
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/redis-workspace/img/iredis.png" alt="Iredis" width="400">
</p>
2022-05-11 21:04:30 +12:00
Iredis has autocompletion and hints, which might be handy for administrative tasks
```
iredis --newbie
```
<p align="center">
<img src="https://raw.githubusercontent.com/bluxmit/alnoda-workspaces/main/workspaces/redis-workspace/img/iredis-newbie.png" alt="Iredis-newbie" width="750">
</p>
2022-05-11 20:17:54 +12:00
Create dump of the Redis database
2022-05-11 21:04:30 +12:00
2022-05-11 20:17:54 +12:00
```
redis-dump-go -h localhost > /home/redis-movie-dump.resp
```
2022-05-11 21:04:30 +12:00
Use File Browser [localhost:8021](http://localhost:8021) to get the dump to your PC