Azure Web app for containers to on-premises connection - azure

Currently i'm hosting an API in an azure Web App for Containers App Service. Additionally, I have a logging database hosted on an on-premises service which can't be accessed publicly.
For accessing the on-premises service it is possible to create a hybrid connection; however this feature is not available through the Azure portal when using Web App for Containers as opposed to when using just a Web App.
Is it possible to create this Hybrid Connection programmatically or through the CLI?
Are there other methods of connecting to on-premises resources through azure?
The API is using ASP.NET Core.
I have been looking into the Microsoft.Azure.Relay package, but I seem to be unable to actually reach my on-premises endpoint through the samples supplied by the package.
Edit:
I have verified that i can make the Hybrid Connection using a Web App. To do this i have downloaded the Hybrid Connection Manager, installed it on the on-premises network and checked that an application can make HTTP calls to the endpoint at the end of the Hybrid Connection.
All of this is done through the azure portal by going into my Web App, then navigating to Networking, configuring Hybrid Connections and creating a Hybrid Connection, and connecting to the new Hybrid Connection through the Hybrid Connection Manager.
What i'm not capable of is doing the same for my Web App for Containers, as Networking is not a supported tap (yet?). Therefore, i'm looking for a programmatical way of doing this either through the CLI or in the sourcecode.

Related

Connect Azure Logic App to On Premise FTP Server using Azure Hybrid Connection

I am currently exploring a way to connect Azure Logic App to be able to fetch file from on-premise FTP server. What I have found in Azure documentation : https://learn.microsoft.com/en-us/azure/connectors/connectors-create-api-ftp#connect-to-ftp, that it is possible to do so.
If you have an on-premises FTP server, consider creating an
integration service environment (ISE) or using Azure App Service
Hybrid connections, which both let you access on-premises data sources
without using an on-premises data gateway.
So I am interested to use Azure App Service Hybrid connections for this, but what I don't know is how to connect ftp connector in logic apps to Hybrid connections set in Azure App service. The documentation for Azure Hybrid connection didn't mention about how to do this.
If anyone knows how to connect Azure Logic App to on-premise FTP server via Azure App Service Hybrid connections, appreciate your help on this.
Thanks
To create a Hybrid connection to FTP, try the following steps:
In Azure App Service, open Networking tab in the left pane
Go to Configure your Hybrid Connection endpoints
Click on Add hybrid connection
Click on Create new hybrid connection and add following information:
a) Hybrid Connection name
b) Endpoint hostname
c) Endpoint port
d) Service Bus namespace you want to use (Every Hybrid Connection is tied to a Service Bus namespace, and each Service Bus namespace is in an Azure region)
Then you can connect the App Service with the Logic App

How do you connect an Azure Function (not an App Service) to an on-premise SQL server via a VPN?

I have a large SQL server hosted in our infrastructure, and an Azure resource set up with VPN access to our servers.
I want to create an Azure Function that connects to this SQL server. It's going to be a webhook endpoint to save to that DB. I don't need the overhead of an App Service Plan, I want the lightweight Function and the cheaper consumption pricing model.
All the tutorials online refer to App Services and Hybrid Connections that don't appear to be available in to Azure Functions on Consumption Plans.
I also want to keep the connection string configuration in Azure, and not hard-coded in the source or publish (which will ultimately be via CI).
The Azure Function is currently coded in C# in VS2019, but I can change that if it helps.
How do I set this up?
This option is not available on consumption plan. There is a already user voice open for this.
https://feedback.azure.com/forums/355860-azure-functions/suggestions/33398398-add-support-for-hybrid-connections-to-consumption
Yes it is possible. You would need to use something like Hybrid Connection. Does not matter which IDE you used to create the function.Check out the following link.
The Hybrid Connections feature requires a relay agent in the network
that hosts your Hybrid Connection endpoint. That relay agent is called
the Hybrid Connection Manager (HCM). To download HCM, from your app in
the Azure portal, select Networking > Configure your Hybrid Connection
endpoints.
Azure App Service Hybrid Connections

Azure Hybrid Connection to API hosted on Websphere (on premise)

I have an API that is hosted on Websphere Application Server (bound to a specific port), on a Windows 2012 R2 Server (on-prem), that I would like to expose to Azure API Management in the cloud. Ideally, the plan was to use Azure Hybrid Connections. Is that even possible? How could I go about doing this?
You can setup Azure Website and use the Hybrid Connection feature to expose your API via a simple WebApi Controller.
API Management will just talk to the Azure Website. You can limit access to the Azure Website from only the Public IP address of the API Management.

Hosting a web application in Azure that consumes on premise web services and ActiveMQ

I'm looking at ways to host our web site in Azure. The Web application consumes on-premise web services and send/receive messages from ActiveMQ hosted on-premise. Is this possible? Any pointers will be helpful.
Short Answer: Yes, it's possible. Mixing Azure and On-Prem resources is what's called the Hybrid Cloud.
Long Answer:
You can use Azure App Service Environment to setup a Virtual Network with an Azure Web App that will allow for a VPN connection to be setup between your on-premises network and the Azure VNet. If VPN setup isn't an option of you, then you could use the Azure Service Bus Relay service to connect an on-premises WCF Web Service to the Azure Web App. Additionally, a Biztalk Hybrid Connection could be used to tunnel through the firewall between your on-premises resources and the Azure Web App. Hybrid Cloud is fully supported in Microsoft Azure and there are a few options to choose depending on which fits your needs / scenario best.
You can create a VPN on Azure, add the web site to it and then create a site to point VPN connection to add the VM that has the on-premise web service to it.
Another solution, if your web service is developed in WCF, you can use Service Bus Relay with your web service, this will make it accessible from your Azure web site.

Is there way to create HYBRID CONNECTIONS for azure could service or azure VM?

I azure we can create Hybrid connection to local sql server from Web Sites and Mobile Service. But I need to create Hybrid service to My Local SQL server from VM or cloud service. Is there anyway to achieve this one?
You can, actually.
The tool is called the Microsoft Azure Hybrid Connection Client
This runs as a service on your VM, and you add Hybrid Connections to it.
(That is, it = the VM that needs to talk to the on-prem asset.)
When a connection is added, a HOSTS file entry is made for the particular dns name and is routed through Azure to your on-prem Hybrid Connection Manager.
The Connection String you add will be the 'Application' one(s), which you will find in the old portal
According to Microsoft Hybrid connection will support only for WebSite and Mobile Web Services.
So I couldn't directly achieve my requirement. But alternative way is, implement the WCF service which can be hosted as WebSite.Now you can hosted your SQL database locally and create hybrid connection to the database from WCF service.Then you can call your WCF service from VM or cloud service.
Thanks,
Erandika

Resources