Posts

Showing posts with the label azure

Run Node Scheduler App on Azure

Image
Clash Royale CLAN TAG #URR8PPP Run Node Scheduler App on Azure I've written a Node app that essentially serves as a Task Scheduler (or cron) to run batch processes on set time intervals using node-schedule. When I run this program locally or on a VM, the process will run continuously and execute my jobs until the process is forcibly killed. When I deploy this app to Azure as an Azure App Service, the process is treated more as a "Web App", and after a period of inactivity on the site (ie no web traffic), Azure kills the process. If I access the "site" via a browser, it kicks it back up again. It seems as though Azure is tied to the Node app being an express-based "web app" and as far as I can tell, there's not a way to deploy my command line app in a reliable manner. Am I missing something or is there a better way to deploy this application in Azure either via Web App, or another offering? Would really like to avoid having to maintain a VM just for...

How to reset password of user in Azure AD B2C via Graph API?

Image
Clash Royale CLAN TAG #URR8PPP How to reset password of user in Azure AD B2C via Graph API? How to reset the password of the user using Microsoft Graph API? Is there a way to do it? If yes, I am not able to find a way to do it. Please let me know , How this can be achieved? Thanks! 2 Answers 2 You can reset a user's password by PATCHing the user object: PATCH https://graph.windows.net/myorganization/users/{user_id}?api-version=1.6 { "passwordProfile": { "password": "{password}", "forceChangePasswordNextLogin": false }, "passwordPolicies": "DisablePasswordExpiration" } For more information, see Reset a user's password. Can we do this using client sdk (C#) of Microsoft Graph. I think the example that you have shared above is Microsoft AD Graph API – prateek ...

Logic App : Finding element in Json Object array (like XPath fr XML)

Image
Clash Royale CLAN TAG #URR8PPP Logic App : Finding element in Json Object array (like XPath fr XML) In my logic app, I have a JSON object (parsed from an API response) and it contains an object array. How can I find a specific element based on attribute values... Example below where I want to find the (first) active one { "MyList" : [ { "Descrip" : "This is the first item", "IsActive" : "N" }, { "Descrip" : "This is the second item", "IsActive" : "N" }, { "Descrip" : "This is the third item", "IsActive" : "Y" } ] } By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your...

Could you please help me modify the policy to simply deny anything from Marketplace, that was not published by Microsoft?

Image
Clash Royale CLAN TAG #URR8PPP Could you please help me modify the policy to simply deny anything from Marketplace, that was not published by Microsoft? I tried to figure out how to further restrict the Marketplace, but I was not successful yet :-( Right now I have made simple Policy that denies any VM not published by Microsoft. The code is following: { "if": { "not": { "field": "Microsoft.Compute/imagePublisher", "like": "Microsoft*" } }, "then": { "effect": "deny" } } I would need something more general, that would deny any service not published by Microsoft, but I just can't figure out how to modify the code for anything else than VMs. For example I wanted to deny any service from Marketplace > Networking so I used PowerShell cmdlet Get-AzureRmResourceProvider -ProviderNamespace Microsoft.Network | fl resourcetypes to see if there is anything similar to i...

Running imagemagick on Azure with node.js

Image
Clash Royale CLAN TAG #URR8PPP Running imagemagick on Azure with node.js I have a website on Azure and can't seem to run imagemagick. I have the binaries there, and have changed my javascript files to point to the imagemagick binaries. The binaries seem to be running, but they don't accept any input using stdin. When I try to write to stdin I get an error about the socket being closed Error: This socket is closed. at Socket._write (net.js:635:19) at doWrite (_stream_writable.js:221:10) at writeOrBuffer (_stream_writable.js:211:5) at Socket.Writable.write (_stream_writable.js:180:11) at Socket.write (net.js:613:40) at Duplex.ImageMagick._write (\100.68.148.84volume-9-defaultf9e21fc24431ae1e3688d6a9b08558464073a94176eb39d78b10sitewwwrootnode_modulesimagemagick-streamindex.js:47:17) at Duplex.<anonymous> (\100.68.148.84volume-9-defaultf9e21fc24431ae1e3688d6a9b08558464073a94176eb39d78b10sitewwwrootnode_modulesimagemagick-streamindex.js:52:12) at Duplex.g (events.js:175:14) at...

IoT Edge proxy configuration

Image
Clash Royale CLAN TAG #URR8PPP IoT Edge proxy configuration We are trying to make IoT edge work with specific proxy configuration works over communication having speed of 800kb/s Our proxy configuration only allows HTTP communication only for whitelisted URL or by specific Proxy configuration URL. We have added proxy configuration URL in IoTedge.service, Docker.service HTTP confidence and IoTedge.service HTTP conf but didn't got any success Did anyone has experienced this issue. Any help in this regard is highly appreciated. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Cannot delete an instance of module in Terraform which contains a provider

Image
Clash Royale CLAN TAG #URR8PPP Cannot delete an instance of module in Terraform which contains a provider I have a module which contains resources for: In one of my env directories I can have 0-N .tf files which is an instance of that module and each specify database name etc. So if I add another .tf file with a new name then a new database server with a database will be provisioned. All this works fine. However, if I now delete an existing database module (one of the .tf files in my env directory) I run into issues. Terraform will now try to get the state of all the previously existing resources and since that specific provider (for that postgres server) now is gone terraform cannot get the state of the created postgres role, with the output a provider configuration block is required for all operations . I understand why this happens but I cannot figure out how to solve this. I want to "dynamically" create (and remove) postgres servers with a database on them but this requir...

Error on EF migration - Azure - MySql on App

Image
Clash Royale CLAN TAG #URR8PPP Error on EF migration - Azure - MySql on App I'm trying to run all pending migrations on my web app asp.net core 2.1 on Azure using MySql on App, free tier (always on not enabled) but I receive an error, as in the log file: "Microsoft.EntityFrameworkCore.Database.Connection: An error occurred using the connection to database '' on server '127.0.0.1:54184'" The mysql package I'm using is Pomelo.EntityFrameworkCore.MySql, version 2.1.1. I'm running this code in the Configure method of the Startup class: using (var serviceScope = app.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope()) { using (var context = serviceScope.ServiceProvider.GetService<SandroDbContext>()) { context.Database.Migrate(); } } It seems to get the correct server and port from the environment variable for MySql in App , but not the database name. UPDATE: It doesn't work even if i remove th...

How to deploy Elasticsearch on Azure blob storage

Image
Clash Royale CLAN TAG #URR8PPP How to deploy Elasticsearch on Azure blob storage To deploy elastic search i followed steps in "Azure Marketplace Elasticsearch offering youtube video https://www.youtube.com/watch?v=6oRIpSXYrC4. Then i copied kibana IP with port no 5601 and entered same credentials which i gave during this steps. But my credentials is not working. I am not sure either my credentials is wrong or is there any prerequisite before deploying elastic search on Azure. If my credentials is wrong then how i can reset it. Thanks. Did you setup external load balancer during setup? – sramalingam24 just now By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continu...

App Gateway path based routing not working with ILB ASE

Image
Clash Royale CLAN TAG #URR8PPP App Gateway path based routing not working with ILB ASE We have an ILB ASE with 2 Web Apps running in it : 2 app1.mydomain.local app2.mydomain.local We have an Application Gateway in front of this to make the apps securely accessible from the Internet. The Application Gateway has the following configurations: Backend pool: myapp-beap - points to the IP of the ILB myapp-beap Health Probe 1: app1-probe - Host = app1.mydomain.local app1-probe app1.mydomain.local Health Probe 2: app2-probe - Host = app2.mydomain.local app2-probe app2.mydomain.local HTTP Setting 1: app1-httpSetting - Custom Probe: app1-probe Host name: app1.mydomain.local app1-httpSetting app1-probe app1.mydomain.local HTTP Setting 2: app2-httpSetting - Custom Probe: app2-probe Host name: app2.mydomain.local app2-httpSetting app2-probe app2.mydomain.local Listener: myapp-listener Frontend port: 80 myapp-listener Path-based rule: myapp-rule myapp-rule myapp-listener myapp-beap...

How to get the key of all the Azure Services in same way through powershell

Image
Clash Royale CLAN TAG #URR8PPP How to get the key of all the Azure Services in same way through powershell I am trying to develop a PowerShell script for getting the key using Invoke-AzureRmResourceAction command of different Azure services, like below Invoke-AzureRmResourceAction $keyValue=Invoke-AzureRmResourceAction -Action listKeys -ResourceId $ResourceId -force The problem is, I am getting the key to different services in a different way. Like for storage account, I have to write $keyValue.keys[0].value for getting the 1st key value. But for cognitive service, I have to write $keyValue.key1 . Is there any way to generalized it so that same thing works for all the services in Azure which has the s key. $keyValue.keys[0].value $keyValue.key1 1 Answer 1 I think you could not access it via the same command. Different azure services have different resource structures, so the result format of ...

Azure Cosmos DB Number of Columns Limit

Image
Clash Royale CLAN TAG #URR8PPP Azure Cosmos DB Number of Columns Limit The Azure Table Service documentation states that entities (rows) must have at most 255 properties, which I understand to mean these tables can have at most 255 columns, which seems highly restrictive. Two questions: first, do the same limits apply to Cosmos DB Table Storage? I can't seem to find any documentation that says one way or another, though the language of "entities" is still used. And second--if the same limit applies in Cosmos DB--is there any useful way around this limit for storage and querying, along the lines of JSON in SQL Server? By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

How do I map an Azure File Share as a volume in a Docker Compose file?

Image
Clash Royale CLAN TAG #URR8PPP How do I map an Azure File Share as a volume in a Docker Compose file? I have so far only found examples on how to create a volume on the host machine, e.g: version: "3.3" services: mysql: image: mysql volumes: - db-data:/var/lib/mysql/data volumes: db-data: So this defines a volume named db-data that will physically be stored on the host machine running the container. Is is possible to makes the db-data volume point to an Azure File Share in an Azure Storage account and how would I specify the needed parameters? 1 Answer 1 From CLI you can create with: docker volume create -d azurefile -o share=myvol --name vol1 docker run -i -t -v vol1:/data busybox In your compose you need to use this skeleton: volumes: myvol: driver: azurefile driver_opts: accountname: ___your__account_name accountkey: ___your_account_key ...

Read Oracle database from Azure Elastic Database Job

Image
Clash Royale CLAN TAG #URR8PPP Read Oracle database from Azure Elastic Database Job In onprem SQL Server you could add a remote database server such as Oracle as a Linked Server, and use in a SQL Server Job Agent job. Is this possible in Azure SQL Database using Elastic Database Jobs? How? By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.