Service: Valkey - EyevinnOSC/community GitHub Wiki

Getting Started

Valkey is a community driven high-performance key-value store compatible with Redis clients. This tutorial walks you through using Valkey in Eyevinn Open Source Cloud.

Prerequisites

  • If you have not already done so, sign up for an Eyevinn OSC account.

Step 1: Create a Valkey instance

In the web console of Eyevinn Open Source Cloud navigate to the Valkey service page.

Click on the tab "Service Secrets" and create a secret that will contain the password you want to use for allowing access to the store.

Skärmavbild 2025-02-07 kl  10 34 04

Now click on the tab "My valkeys" and the button "Create valkey" to create a new store.

Skärmavbild 2025-02-07 kl  10 46 21

Provide a name of the instance and a reference to the secret containing the password you want to use. When the instance is created the status is Running and the IP and port to access the store is shown on the instance card.

Skärmavbild 2025-02-07 kl  10 47 36

Step 2: Verify access

To verify it works and we can access the store we can use the Redis CLI. Use the IP and port that you obtain in previous step.

% redis-cli -h 172.232.131.169 -p 10523 INCR mycounter
(error) NOAUTH Authentication required.

As we have set a password it requires us to first authenticate. We can provide the password using the REDISCLI_AUTH environment variable.

% export REDISCLI_AUTH=secret
% redis-cli -h 172.232.131.169 -p 10523 INCR mycounter
(integer) 1

Create a store using OSC CLI

You can also create a store using the OSC CLI

% export OSC_ACCESS_TOKEN=<your-personal-access-token>
% npx @osaas/cli create valkey-io-valkey guide -o "Password={{secrets.mypwd}}"
Instance created:
{
  name: 'guide',
  url: 'https://eyevinnlab-guide.valkey-io-valkey.auto.prod.osaas.io',
  resources: {
    license: { url: 'https://api-valkey-io-valkey.auto.prod.osaas.io/license' },
    app: {
      url: 'https://eyevinnlab-guide.valkey-io-valkey.auto.prod.osaas.io/'
    }
  },
  Password: '{{secrets.mypwd}}'
}

To obtain the IP and port we use the command describe to get details for an instance.

% npx @osaas/cli describe valkey-io-valkey guide
name: guide
url: https://eyevinnlab-guide.valkey-io-valkey.auto.prod.osaas.io
Password: '{{secrets.mypwd}}'
172.232.131.169:10523 => 6379