From the webjob's perspective, how to detect that the website stopped? - azure-webjobs

This is for the scheduled webjobs.
When we stop the website in the portal, the webjobs view is disabled (saying that it can only be displayed when the website is started), but the webjobs are still running.
How can I detect programmatically that the website stopped?
Thanks in advance.

Related

Google Cloud API Services Oauth with a Testing App

I have a small personal-use only app that logs into a [throw away] gmail account to pull out an auth-token so it can then run a scheduled job (turning on/off my home cameras). Its dead simple and works, except that the app is in GCP TEST mode and it looks like the gmail auth expires in 7 days.
I highly doubt based on the below requirements that I can promote the app, and I dont want to publish it regardless. I tried GCP Support and wound up here. Im sure Im not the only person that has dealt with the 7 day expiration on a personal project. Any ideas?
If you check the documentation for oauth2#expiration
A Google Cloud Platform project with an OAuth consent screen configured for an external user type and a publishing status of "Testing" is issued a refresh token expiring in 7 days.
The key hear is setting your project into production.
What you are showing in that image are requirements for application verification. You shouldn't have to go though verification for a single user app.
Try just setting it to prodcution and then wait a week and see if it still expires. It shouldn't
I highly doubt based on the below requirements
Unfortunately with the new security restrictions. I wouldn't doubt anything these days. They keep changing the rules.

Unable to set up the sign-in for the Cloud Run instance and unable to roll the changes back, lost the access to my Cloud Run URL

I tried different official tutorials but they all ended up to be misleading.
The last one was this: https://cloud.google.com/iap/docs/cloud-run-sign-in -- it ​says:
Enable external identities, and select the Host a sign-in page for me option during setup.
But there was no such option. No new Cloud Run instance was created and so nothing has happened. Then after a while I've updated the source code of my application, redeployed and the blue login button appeared on the Cloud Run instance URL instead. NO documentation tell that "on this step you'll now see the blue button" so I don't know for sure what it is. When I went through the dialog it said I should add the Cloud Run instance URL to the "allowed origins" in the OAuth app I created a week ago by trying different tutorials I mentioned in the first place. Aha! I add the URL as allowed but this does nothing -- it just loops, the dialog leaves me on the same page with the same blue button instead of my Cloud Run instance response that now I effectively have no access to. I am the GCP Project owner and I want this all to check that it's me to invoke the Cloud Run. How does this specific OAuth app blocks this specific Cloud Run instance at all? I have multiple apps made in months or years and multiple Cloud Run instances but only now this blue button appeared.
Being unable to make it work I decided to roll it all back. I allowed the Unauthenticated calls to my Cloud Run instance, disabled the IAP API, deleted the OAuth app, redeployed several times, but the blue button is still there with dialog saying: "The OAuth client was deleted." And I see nothing like my current problem to be described on https://cloud.google.com/run/docs/troubleshooting
So now not only the whole thing didn't work (the "sign-in page" does not deploy, not even if I disable and enable the IAP API again) but I've lost the access to the Cloud Run instance at all -- it's blocked by the blue button that is nowhere to disable. Even when I deploy new services they are behind this broken thing.
UPD: after a while I've realised that I didn't really lose any access -- the "blue button" was an artifact of the failed tryings to setup the auth, a my own copypasted htm page that didn't work, and I was just visiting the wrong path appended to the service URL. So the question is half-invalid. Though the problem of the "create a sign-in page for me" persists.
Currently, IAP is only supported with App Engine, Compute Engine and HTTPs Load balancers. Cloud Run isn't yet supported. It is planned to be supported in the near future.
As a workaround you can check those two options in order to implement with your application:
1 - A similar stackoverflow post where is stated and answer about how to Google Sign in for Cloud Run
2 - A Cloud Run hosted version of an IAP in Terraform config made by the community
Also you can try to Setup a Load Balancer with Cloud Run and see if that solves the issue you're facing.
Enable external identities, and select the Host a sign-in page for me option during setup.
I believe this is referring to - when you turn on IAP and choose 'use external identities for authorization', there is an option that says - 'Create a sign-in page for me' with a note which says - IAP will create a sign-in page for you using Cloud Run and Firebase UI
2.
I tried following the steps and after checking the option to 'create a sign-in page for me', it showed me a popup window with a message that it was creating a Cloud Run instance for me. After about 3 minutes, it said it was done and showed me url for the Cloud Run instance and a link to the page settings
3.
Regarding access to the Cloud Run instance, I think it's best to just delete it from the UI (Google Cloud Console). Redeploying will then recreate the Cloud Run service and you should no longer have the 'blue button' since you say you have disabled it

I had deployed the test application on Production on Google Cloud via App Engine, But URL still accessible

I had deployed the test application on Production on Google Cloud via App Engine and i could not see the instance is being created as its serverless it could or it could not create the instance.
But I am concerned about the billing since the URL was still running like on :
Example: http://mytestproject-123456.appspot.com/
So I disabled the billing for the project and also the application from the App Engine settings.
Could someone please help or suggest.
Is any action still required to stop the billing if there is any since I had deployed the application on Production and the url was accessible.
1.And If delete the whole project will it work?
If yes please tell the process.
If you want to stop the app from serving requests and running instances, you can disable the application. This way you will not be getting billed for that. Basically, there is no need to delete a billing account or the project to just stop serving requests. Please be aware that you still might be charged for storage, or other GCP services that you are using if applicable.
I would say that you do not need to do anything else. For future reference, before deploying a service, a good practice is to test it locally before deploying and starting to serve requests from users.
I suppose you are talking about the Standard Environment; if i am right, you can see the number of instances by going in the console, choosing your project in the selection control on top of the page. After this, in the left column, select App Engine, and, in the page that shows up, you can see the instances tab. There you will find all the running instances, if any.
If you are using other resources, they will be billed accordingly. If you are not, disabling the application is all you need to protect yourself against unwanted billing.
Hope this helps.

WSO2 Identity Server web console not responding

I installed WSO2 Identity Server on Ubuntu 14, and I could log in to the web console and dashboard. I recently changed some settings with regards to the system not referring back to 'localhost' so that we could access the system remotely. This all seemed to be working ok.
But now I cannot access the console or dashboard any more. I have checked that the WSO2 service is running, but the web console does not display, it just times out.
The question I have is, how can I troubleshoot this issue? As I don't really want to have to re-install from scratch when I have already done so much configuring!
Any help on this would be very much appreciated!

Umbraco Accelerator successfully deployed but wont connect

I have download the umbraco accelerator to try get an azure based CMS up and running, I have managed to change the configuration file and the command prompt log upon running the .bat files does not generate any errors.
I have created the storage and azure database and hosted service but when I look at the hosted service there is no way for me to connect into this as the connect button has been disabled. Has anyone else went through the setup and if so have you encoutnered this issue? The URL displayed in azure http://appname.cloudapp.net/umbraco/default.aspx does not work
Which Umbraco version are you deploying? AFAIK the accelerator is deprecated, but I could be wrong if you're doing something in particular, or something I haven't heard of (could be lots!) with web/hosted services.
I've deployed Umbraco 4-6 CMS through WebMatrix 2-3 to azure as a website with relative ease. I didn't need it to be a hosted service/cloudapp.
Is that url not a generic placeholder, do you have a Domain registered to point at it?
Y'know, the more I type, the more I realise I have only a shaky grasp of what you're talking about. Are you sure you need a cloudapp, will an azure website not do?