mpous / redis-balena

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Run Redis Stack on a balena device

This is a guide to get started with Redis Stack on a balena IoT device. Deploy it, run and experiment with the Redis server process and add it on your own fleet.

Run it as a block

We maintain images for this block on balenaHub Container Registry. The images can be accessed using:

bh.cr/marc6/redis<arch> at the moment only available on aarch64 and x86.

For details on how to select a specific version or commit version of the image see our documentation.

Getting started

Hardware

  • Raspberry Pi 4 or x86 device
  • SD card or USB stick
  • Power supply and (optionally) ethernet cable

Software

Deploy as a balena Block

docker-compose file

To use this image, create a container in your docker-compose.yml file as shown below:

version: '2.1'
volumes:
  redis-data:
services:
    redis:
      image: redis/redis-stack:latest
      ports:
        - "8001:8001"
        - "6379:6379"                                                            
      volumes:                                                                               
        - redis-data:/data                                                                        
      restart: always    

Deploy the code

Running this project is as simple as deploying it to a balenaCloud application. You can do it in just one click by using the button below:

Follow instructions, click Add a Device and flash an SD card with that OS image dowloaded from balenaCloud. Enjoy the magic 🌟Over-The-Air🌟!

If you are a balena CLI expert, feel free to use balena CLI.

  • Sign up on balena.io
  • Create a new application on balenaCloud.
  • Clone this repository to your local workspace.
  • Using Balena CLI, push the code with balena push <application-name>
  • See the magic happening, your device is getting updated 🌟Over-The-Air🌟!

Run Redis on your Raspberry Pi

If Redis deployed properly you should see this on the balenaCloud logs.

redis-balena-logs

Get into the Redis CLI

Get into the redis container through the balenaCloud Terminal and type

redis-cli

redis-balena-terminal-cli

The CLI from Redis might appear and from there you would be able to start working with Redis. Read more here.

Access to the Redis Stack UI

Type your local IP address with the port 8001.

Captura de pantalla 2023-07-19 a les 19 23 55

Troubleshooting

If you detect any issue using this block, feel free to contact us at the forums.balena.io.

Attribution

About