Notification for Config Variables changes on heroku - heroku

is there a way to setup Heroku to get a notification you when your config variables are updated?
thanks a lot
sorry for the very late reply, but I spoke with Heroku back then, and they said that it wasn't something that they did at the moment.

Very late to the party here, but just to give an updated answer. Heroku has support for webhooks so you can monitor those + more events on your end.
If you rather not build your own consumption pipeline, consider using LightFlare (I'm the creator) that has out of the box support of consuming Webhooks events from many services (heroku included) and notifies you at your choice(s) of destinations (slack / email etc ...).
LightFlare currently supports monitoring on services like:
Infra: GCP, AWS, Azure, heroku
Code/release: GitHub, bitbucket, netlify
Commerce: shopify, gumroad
More integrations based on our customers asks

Related

Question about deploying a Shopify app to Heroku

I have question about Shopify app development and the deployment process.
I've used the getting started guide here, and I have an app that works fine when I use npm run dev and view the app in the store admin.
However, of course, once I stop the server from running, the app is no longer accessible.
I believe I need to deploy the app to Heroku (or something similar) in order to have it work in a non-development environment.
It doesn't seem like there is much guidance online from Shopify about the best way to go about this.
Does anyone know what steps I need to take in order to deploy my app to Heroku, so that I can use the app in by test store on another device?
It seems like every guide online stops JUST BEFORE explaining this process and I can't figure out why! I have tried everything online but nothing has worked:
Adding the code to Github and connecting it to Heroku
Using Docker
Any help is appreciated. Thank you!
You have zero obligations to use Heroku. If you have an IP address dedicated to your house, you could host the App using your house. If you co-locate your own server at an Internet business, and they give you IP addresses you can use that. If you wanted to use Amazon directly, you could use EC2. If you wanted to use Linode, or Azure, or any other cloud service, feel free! It is up to you!
Using Heroku (built on AWS) is traditional only in the sense that it is the original easy peasy hosting in the cloud service. Play with Heroku by reading Heroku-specific documentation or hosting information. This has nothing to do with Shopify. Shopify only mentions Heroku because traditionally, developers used it. No other reason.
If you want to learn how to use Heroku, 100% there are blog posts within easy reach for you to study and learn from.

Azure Pipelines App Slack notification not working

I hope somebody can help me with this issue.
I recently moved my azure pipeline approval release process from slack web hook to Azure pipeline App for slack, because I found that having the approve and reject button directly in slack chat was something really nice to have to make approvals easier.
This is the process I follow:
Install Azure pipeline App in slack workspace
Create a private channel and /invite #azpipelines
I signed in /azpipelines signing
Once those steps has been completed, I started to subscribe my release pipelines selecting the stages I was interesting in. Everything worked just fine for a couple of days, I was receiving the notifications and I was able to approve and reject them without any problem, which is great, but today, out of nowhere I realised that I was receiving the emails from azpipelines that a release has been issued but no notification in channel.
The documentation about azure pipeline is really poor and I have no idea what is going wrong with the configuration.
Did this happen to anyone before and can direct me on the right path of what could be the issue behind it?
Thank you very much for any help you can provide
Sometimes, I also could encounter the similar problems.
And many times, I can fix the issue via the following ways:
Unsubscribe and re-subscribe the notifications.
Log out and then log in again.
Uninstall and re-install the Azure Pipelines App.
May be you also can try this steps to see if the issue can be resolved.

Is there a Heroku webhook for Heroku Postgres credential rotation?

I'm following the instructions in the Heroku Postgres docs for creating an external application that connects to Heroku Postgres for its data layer. The instructions mention that the credentials are automatically rotated and I must handle this myself.
I read more docs to learn about webhooks existing to help notify the rest of your system that changes have happened in your Heroku services. This made sense to me to be an area where the Heroku devs would have implemented this. There must be a webhook that exists that I could use to be notified when the credential rotation happens. I found that there was the api:addon webhook which had the update event. I tested this webhook, expecting this to be what I was looking for, but I found that it was not fired upon credential rotation. It was only fired when I provisioned or deleted more Heroku Postgres add-ons.
Since the webhook I need doesn't exist, I coded a workaround where I expect a PostgreSQL library auth error to be thrown while my AWS Lambda executes. If an error is thrown, I assume it's from the rotation and I have the still running Lambda function fetch new credentials using the Heroku API and try the PostgreSQL query again, at which point it works unless there are other errors. I tested this while manually rotating my credentials and it worked okay, but it's kind of ugly code. See here for a detailed example.
So at this point, I'm wondering if the webhook I'm looking for does exist and I just wasn't able to find it. Or, if it doesn't exist, I would like to request it as a new feature. I understand that the Heroku team may not want people picking their add-ons a la carte, and they want people to use the entire Heroku platform, but I think it would add a lot of value to the Heroku platform. Personally, I've enjoyed getting into more and more cloud services as I learn since I'm usually able to choose them a la carte. For example, AWS doesn't forbid me from only using S3 and nothing else from them. They do as much as they can to make it easy for me to link my applications to it, no matter what other cloud services I use.
I contacted Heroku directly to ask if this type of webhook existed and I received a useful response from them:
There isn't a webhook specifically for credential rotations, although
with a bit of logic you can sort of recreate the same thing. Whenever
you Postgres credentials rotate, it will trigger a new release, which
does trigger a webhook. You can use that to inspect the release via
the API to determine if the values changed.

Same add-on for multiple Heroku apps

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.

Heroku: Testing IronMQ Messaging With Worker Locally Using Foreman

I am new to Heroku and I am trying to bootstrap a local development environment. Using Foreman, or another tool, can someone please point me to docs that illustrate sending and consuming a message with a worker. Key being setting up the MQ and the worker consuming the message configured locally. Thanks!
IronMQ (and IronWorker) are both cloud services and currently do not have local install capability. It's fairly easy to interact with the API from your local machine though including pushing messages, getting them, etc.
If you plan on using Push Queues, do keep in mind that in order to "push" back to your localhost you'll need to setup something like localtunner or ngrok. Here is some information on that: http://dev.iron.io/mq/reference/push_queues/#testing_on_localhost
Please feel free to hit us at support#iron.io or live chat: get.iron.io/chat
Chad

Resources