0

I'm learning redis and have it working from a java app. I'm trying to use the heroku redis:cli -a myAppName command to connect with it directly but it says "No Redis instances found".

When I do heroku apps it lists myAppName so I know it's valid.

heroku redis:info -a myAppName doesn't return anything.

The heroku docs don't seem to be accurate as they all leave out the -a flag which the cli tells me is required. Outside of that I don't know what I've missed.

helion3
  • 34,737
  • 15
  • 57
  • 100
  • "The heroku docs don't seem to be accurate as they all leave out the `-a` flag which the cli tells me is required"—this is listed in [most of the docs I've seen](https://devcenter.heroku.com/articles/heroku-cli-commands) (look in the options for each subcommand), though it [isn't always required](https://stackoverflow.com/q/55470675/354577). – ChrisGPT was on strike Feb 09 '22 at 22:07
  • "yet I have a redis cloud addon running and usable"—how did you provision this? – ChrisGPT was on strike Feb 09 '22 at 22:08
  • For example https://devcenter.heroku.com/articles/managing-heroku-redis-using-cli#redis-info doesn't work as documented. I have to include an -a argument. As for how I provisioned, I don't know how to answer. I setup a free tier 30MB redis cloud db and named it. I've been able to connect to it and use it successfully from a java app. – helion3 Feb 09 '22 at 22:12
  • "I have to include an -a argument"—only if the CLI can't infer the app to use. I guess they don't always show it, but it often isn't required. See the link in my comment. That argument is sort of a global argument for `heroku`, not specific to any subcommand. – ChrisGPT was on strike Feb 09 '22 at 22:14
  • "I setup a free tier 30MB redis cloud db and named it"—can you say more about this? How did you set it up? Specifically, what do you mean by "redis cloud"? [This](https://redis.com/redis-enterprise-cloud/overview/)? – ChrisGPT was on strike Feb 09 '22 at 22:15
  • Yes, apparently it's the redis enterprise cloud addon. – helion3 Feb 09 '22 at 22:42

1 Answers1

1

You are looking at documentation for Heroku Redis, a hosted Redis service that Heroku itself provides. If you wish to use Heroku Redis, you can provision it for your app using like so:

heroku addons:create heroku-redis:hobby-dev -a your-app-name

Pricing for Heroku Redis can be found here. The Hobby Dev plan used in the previous command is free.

There are also other Redis providers that can be provisioned this way, including Redis Enterprise Cloud. Or you can use existing hosted Redis server. But with these options you won't be able to interact with the service using heroku redis commands. Use whatever tooling those providers offer.

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257