skip to Main Content

Migrating from one service to IBM Cloud for Redis.

I cannot find the correct configuration to connect using TLS. Everything I find on this is related to Heroku. and it ignores verifying the TLS/SSL connection.

I cannot find how to configure our Sidekiq/Redis to connect.

I do have a certificate from the IBM Cloud dashboard and I suspect I have to pass that along somehow.

Configure the Sidekiq.yml like this

:redis:
    :url: "rediss://:< PWD >@< DB Name >:< PORT >/0"
    :namespace: "app"
    :ssl_params:
      ca_file: 'path/to/cert'

I keep getting back the error Redis::CommandError - WRONGPASS invalid username-password pair or user is disabled.: however using these same credentials in the migration script I am able to connect to the DB, so the credentials are ok, I think it is not including the certificate correctly and I cannot find the correct way to do this

2

Answers


  1. The sidekiq.yml configuration looks good to me, just make sure this has correct complete path

    ca_file: ‘path/to/cert’

    and change the redis url to

    :url: "rediss://< PWD >@< DB Name >:< PORT >/0"

    further info you can read from here for TLS secured connection.

    Login or Signup to reply.
  2. I’m not familiar with sidekiq.yml. But I’ve configured redlin with redis using a python script you can find here: https://github.com/IBM-Cloud/vpc-transit/blob/master/py/test_transit.py. Maybe the configuration is similar.

    The relevant code is:

    def vpe_redis_test(fip, resource):
        """execute a command in fip to verify postgresql is accessible"""
        redis = resource["key"]
        credentials = redis["credentials"]
        cert_data = credentials["connection.rediss.certificate.certificate_base64"]
        cli_arguments = credentials["connection.cli.arguments.0.1"]
        command = f""" 
    #!/bin/bash
    set -ex
    if [ -x ./redli ]; then
      echo redli already installed
    else
      curl -LO https://github.com/IBM-Cloud/redli/releases/download/v0.5.2/redli_0.5.2_linux_amd64.tar.gz
      tar zxvf redli_*_linux_amd64.tar.gz
    fi
    ./redli 
      --long 
      -u {cli_arguments} 
      --certb64={cert_data} << TEST > redis.out
      set foo working
    
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search