Same add-on for multiple Heroku apps - heroku

What are the best practices with Heroku add-ons? I manage multiple Heroku apps. I want them to share a common add-on. how to do that?
For example, first I signed up for Mandrill on their website. When I added Mandrill add-on on Heroku, they created a new Mandril account for me. I wanted to merge them but Mandril support said that they can't merge accounts!
Another example, I added Logentries add-on to one Heroku app. A Logentries account was created. Then I added another Logentries add-on to another Heroku app, then another Logentries account was created.
It's getting messy. Am I doing it right? How to make several Heroku apps share one add-on account?

Sharing add-ons between apps is possible.
Once the add-on is added to one of the apps, an environment variable will be created containing the account information. You can copy the variable to other apps and they will start sharing the same 3rd party resource.
The add-on will remain listed only under the first app, where it was initially added, but this will not prevent the other apps to use it.

In the general case it isn't possible to share add-ons between Heroku apps. However with some specific add-ons this is possible, depending on the add-on.
For example with Logentries you can have one Logentries account and then configure each Heroku app to send its logs to Logentries via a syslog drain.
https://logentries.com/doc/heroku/ (See the "Alternatively: Point your syslog drain to Logentries" section)
To set up syslog drain, you have to create a new log in Logentries UI
with the source type “Syslog TCP, UDP” (select Hosts, then click on a
button in right top corner). Logentries will assign you a port number
PORT and set the log in discovery mode to match your log with source.
Then, let Heroku know where to send you log entries. Add a Heroku
syslog drain and point it at api.logentries.com:PORT:
heroku drains:add syslog://api.logentries.com:PORT

Yes, you're doing it right. Each Heroku app is a separate instance and will get its own add-ons. There is no way to share add-ons across multiple Heroku apps, as far as I know.

Related

Access to heroku logs without access to app itself

Say, i have a team of developers. I want them to have access to production logs, but nothing else. Preferably they shouldn't even know the heroku's internal app name.
How do i do that?
I don't think it's possible (at the moment) with Heroku command line. You have two options:
Use one of the logging addons and give your teammates access to the logging app only
Write yourself a log drain for Heroku logplex route the logs to AWS S3, your own DB or other, then give your teammates some way to view the logs.

Heroku logs cluttered

I just started using Heroku for one of my node apps.
When I run the heroku logs command it is so cluttered that i cant pick out the data I want from all the other information I don't need.
Is there a way to clean up that log output so it's more human friendly?
It's like it just dumps a wall of text at me.
Thanks!
I am using Papertrail add-on on Heroku for viewing the logs.
It has a free plan which is enough for small application. It gives you flexibility for searching your logs by text and time. A browser URL is provided by Papertrail to view the logs, which is convenient to access from mobile also. Adding this add-on to your application is quite simple, no app changes are required. Below filters are available out of the box on its dashboard to view the logs-
All events
Deploys
Dyno state changes
Platform errors
Web app output

How can we change ownership of a Heroku add-on

Is it possible to change ownership of a Heroku add-on? If so, how can we do that? In fact, I want to move an add-on from one Heroku account to another.
Let me elaborate my scenario a bit more to be clear.
I created an add-on with my test provider acount. Is there any way that I can delete the add-on from my test account and create the add-on with the same name with my official provider account? As a matter of fact, there is nothing about deleting the add-on or moving it under a different account in the Provider's documentation.
A Google search lead me to this support page, which says
This currently depends on whether or not the app has any paid resources associated with it.
For an app with no paid resources, you can use "heroku sharing:transfer" from the command line to transfer the app to a new owner.
For an app with paid resources, you have two options.
1) Remove all paid resources, transfer the app like a free app, then have the new owner re-add the paid resources.
2) Both the old and new owners should file a support tickets at http://support.heroku.com authorizing the transfer and with the new owner accepting charges for the app.
Also check out the Transferring apps and Collaborating with Others articles on Heroku's Dev Centre.
Since you're talking about ownership of add-ons as an add-on provider and not just ownership of your heroku app, I would say you should probably contact the heroku add-on support team via email. See this page here for an email address. Hopefully as an add-on provider if you submit a help ticket they'll be able to help you as well.

Restore a Redis To Go DB on Heroku

Has anyone been able to restore a Redis DB on Heroku? They have instructions for regular accounts, but the "Edit" option is not available through the Heroku dashboard.
http://support.redistogo.com/kb/info/restore-from-a-backup
I beleive we worked on this through the Redis To Go support site I will still answer for others. This feature is only for Direct accounts, Redis To Go is working on releasing the same options for heroku add-on accounts, but for now switching to a direct account is fastest. If you are hooked on heroku, making a support request support.redistogo.com to have your back-up uploaded by the support staff is also an option for you!
-Morgan

What affect on our applications will changing the Heroku API Key have?

Our organization has a number of Rails applications (websites) deployed to Heroku. A former devleoper has left the organization, and as good practice we want to change the Heroku API key associated with our account to prevent any modifications to the apps via the Heroku CLI.
I know that the Heroku API Key is used for Heroku CLI access (it gets cached in ~/.heroku/credentials), but not certain what else it is used for. Specifically, do 3rd-party add-ons in the Heroku platform (e.g. New Relic, Hoptoad/Airbrake, Sendgrid, etc) use this, and therefore require reconfiguring if the API Key is changed? Heroku throws up a fairly generic (and non-informative) error message when you click the "regenerate" button to change it.
Because the term "API Key" is so generic, want to be clear that this is the single API Key associated with each Heroku account accessible via "My Account" link. Image (and warning message) below.
Asked Heroku Support. This is what I got back:
"you can safely change your API key at any time, as we don't give it to any add-on providers. That alert is meant to remind you that if you added your API key to any application or service (ie for auto scaling, manually provision workers, etc) it will stop working until you provide it a new key."
I requested that they update the interface/documentation to make this more clear.
Also remove him from being a collaborator on all your projects so he can't push to them via git.
Out of curiousity (i'd never seen reset key in the admin) I tried it. When I then tried to use the CLI against one of my apps I was asked to reauthenticate - but i can't now get back in - doh! The same username/password works via the site. I'll ping support and report back,
UPDATE:
So it appears my problem is entirely due to the Heroku Accounts (https://github.com/ddollar/heroku-accounts) plugin that I'm using which stores a copy of the key in the ~/.heroku/accounts/ file. Support got me to remove the folder and it all works now - just something to be aware of if you reset your API key.

Resources